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]
Message-ID: <CAOJsxLEzFKHkxSUh7jwQRmudtYzBRLFo3VdJpVjNOEgSCh3ehg@mail.gmail.com>
Date:	Fri, 30 Sep 2011 09:59:41 +0300
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Josh Zimmerman <jzimmerm@...rew.cmu.edu>,
	akpm@...ux-foundation.org, serge.hallyn@...onical.com,
	ebiederm@...ssion.com, dhowells@...hat.com, daniel.lezcano@...e.fr,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel/groups.c: Minor bugfix for overflow in binary search

On Thu, Sep 29, 2011 at 9:39 PM, Josh Zimmerman <jzimmerm@...rew.cmu.edu> wrote:
>> Fixed possible unsigned int overflow bug. (2 + 2^(32) - 1)/2 results in overflow; 2 + (2^(32)-1-2)/2 does not.

On Fri, Sep 30, 2011 at 8:44 AM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> We can't have that many groups anyway, so the overflow is pretty theoretical.
>
> The max should be NGROUPS_MAX, afaik (65536) and other places have
> lower limits (ie sunrpc/nfs). And if some place doesn't limit it
> correctly, we have bigger problems than this (the whole allocation and
> CPU use issues)

The code site could be converted to lib/bsearch.c::bsearch(), AFAICT. That'd
take care of the theoretical overflow too.

                        Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ