lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Jun 2017 14:21:54 +0200
From:   Andrey Konovalov <andreyknvl@...gle.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     netdev <netdev@...r.kernel.org>
Subject: Re: [Patch net] sit: use __GFP_NOWARN for user controlled allocation

On Fri, Jun 23, 2017 at 12:29 AM, Cong Wang <xiyou.wangcong@...il.com> wrote:
> The memory allocation size is controlled by user-space,
> if it is too large just fail silently and return NULL,
> not to mention there is a fallback allocation later.

Thanks!

Tested-by: Andrey Konovalov <andreyknvl.com>

>
> Reported-by: Andrey Konovalov <andreyknvl@...gle.com>
> Cc: Andrey Konovalov <andreyknvl@...gle.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
> ---
>  net/ipv6/sit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
> index 2378503..f8ad158 100644
> --- a/net/ipv6/sit.c
> +++ b/net/ipv6/sit.c
> @@ -305,7 +305,7 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t,
>          * we try harder to allocate.
>          */
>         kp = (cmax <= 1 || capable(CAP_NET_ADMIN)) ?
> -               kcalloc(cmax, sizeof(*kp), GFP_KERNEL) :
> +               kcalloc(cmax, sizeof(*kp), GFP_KERNEL | __GFP_NOWARN) :
>                 NULL;
>
>         rcu_read_lock();
> --
> 2.5.5
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ