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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 02 Dec 2015 23:36:28 -0500 (EST)
From:	David Miller <>
Subject: Re: [PATCH net] bpf: fix allocation warnings in bpf maps and
 integer overflow

From: Alexei Starovoitov <>
Date: Sun, 29 Nov 2015 16:59:35 -0800

> From: Alexei Starovoitov <>
> For large map->value_size the user space can trigger memory allocation warnings like:
> To avoid never succeeding kmalloc with order >= MAX_ORDER check that
> elem->value_size and computed elem_size are within limits for both hash and
> array type maps.
> Also add __GFP_NOWARN to kmalloc(value_size | elem_size) to avoid OOM warnings.
> Note kmalloc(key_size) is highly unlikely to trigger OOM, since key_size <= 512,
> so keep those kmalloc-s as-is.
> Large value_size can cause integer overflows in elem_size and map.pages
> formulas, so check for that as well.
> Fixes: aaac3ba95e4c ("bpf: charge user for creation of BPF maps and programs")
> Reported-by: Dmitry Vyukov <>
> Signed-off-by: Alexei Starovoitov <>

Applied and queued up for -stable, thanks.
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists