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] [day] [month] [year] [list]
Date:   Wed, 08 Feb 2017 14:40:38 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     daniel@...earbox.net
Cc:     ast@...nel.org, daniel@...que.org, dh.herrmann@...il.com,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next] bpf, lpm: fix overflows in trie_alloc checks

From: Daniel Borkmann <daniel@...earbox.net>
Date: Wed,  8 Feb 2017 01:19:43 +0100

> Cap the maximum (total) value size and bail out if larger than KMALLOC_MAX_SIZE
> as otherwise it doesn't make any sense to proceed further, since we're
> guaranteed to fail to allocate elements anyway in lpm_trie_node_alloc();
> likleyhood of failure is still high for large values, though, similarly
> as with htab case in non-prealloc.
> 
> Next, make sure that cost vars are really u64 instead of size_t, so that we
> don't overflow on 32 bit and charge only tiny map.pages against memlock while
> allowing huge max_entries; cap also the max cost like we do with other map
> types.
> 
> Fixes: b95a5c4db09b ("bpf: add a longest prefix match trie map implementation")
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Acked-by: Alexei Starovoitov <ast@...nel.org>

Applied, thanks Daniel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ