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:   Thu, 27 Apr 2017 11:48:48 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     herbert@...dor.apana.org.au
Cc:     fw@...len.de, netdev@...r.kernel.org, tgraf@...g.ch
Subject: Re: rhashtable - Cap total number of entries to 2^31

From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Thu, 27 Apr 2017 13:44:51 +0800

> When max_size is not set or if it set to a sufficiently large
> value, the nelems counter can overflow.  This would cause havoc
> with the automatic shrinking as it would then attempt to fit a
> huge number of entries into a tiny hash table.
> 
> This patch fixes this by adding max_elems to struct rhashtable
> to cap the number of elements.  This is set to 2^31 as nelems is
> not a precise count.  This is sufficiently smaller than UINT_MAX
> that it should be safe.
> 
> When max_size is set max_elems will be lowered to at most twice
> max_size as is the status quo.
> 
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>

Applied to net-next, thanks Herbert.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ