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
| ||
|
Date: Sat, 17 Jan 2015 20:32:28 +1100 From: Herbert Xu <herbert@...dor.apana.org.au> To: Patrick McHardy <kaber@...sh.net> Cc: Thomas Graf <tgraf@...g.ch>, David Laight <David.Laight@...LAB.COM>, "davem@...emloft.net" <davem@...emloft.net>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>, "edumazet@...gle.com" <edumazet@...gle.com>, "john.r.fastabend@...el.com" <john.r.fastabend@...el.com>, "josh@...htriplett.org" <josh@...htriplett.org>, "netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org> Subject: Re: [PATCH 7/9] rhashtable: Per bucket locks & deferred expansion/shrinking On Sat, Jan 17, 2015 at 08:06:21AM +0000, Patrick McHardy wrote: > > Resizing might also fail because of memory allocation problems, but > I'd argue that its better to continue with a non-optimal sized table > and retry later than to completely fail, at least unless the API > user has explicitly requested this behaviour. > > As for the element counter, yeah, it should prevent overflow. In that > case I agree that failing insertion is the easiest solution. Well you have to consider the security aspect. These days root- only is no longer an acceptable excuse given things like namespaces. If you don't fail the insertions while the expansion is ongoing, and assuming a dump can postpone expansions, then you can essentially insert entries into the hash table at will which is an easy DoS attack. Note that you don't have to fail the insertion right away. I think waiting until you reach max * 2 would be fine. Cheers, -- Email: Herbert Xu <herbert@...dor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists