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:	Tue, 21 Feb 2012 08:55:57 -0500
From:	Xi Wang <xi.wang@...il.com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	Haogang Chen <haogangchen@...il.com>, Theodore Tso <tytso@....edu>,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
	Yongqiang Yang <xiaoqiangnk@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] FS: ext4: fix integer overflow in alloc_flex_gd()

On Feb 20, 2012, at 6:47 PM, Eric Sandeen wrote:
> Hm this raises a few questions I think.
> 
> On the one hand, making sure the kmalloc arg doesn't overflow here is
> certainly a good thing and probably the right thing to do in the short term.
> 
> So I guess:
> 
> Reviewed-by: Eric Sandeen <sandeen@...hat.com>
> 
> for that, to close the hole.

Another possibility is to wait for knalloc/kmalloc_array in the -mm
tree, which is basically the non-zeroing version of kcalloc that
performs overflow checking.

> Doesn't this also mean that a valid s_log_groups_per_flex (i.e. 31)
> will fail in this resize code?  That would be an unexpected outcome.
> 2^31 groups per flex is a little crazy, but still technically valid
> according to the limits in the code.

Or we could limit s_log_groups_per_flex/groups_per_flex to a
reasonable upper bound in ext4_fill_flex_info(), right?

- xi

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" 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