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, 25 Jun 2014 21:17:51 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Fabian Frederick <fabf@...net.be>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jan Kara <jack@...e.cz>
Subject: Re: [PATCH 1/1] FS/JBD:replace count*size kmalloc by kmalloc_array

On Wed, Jun 25, 2014 at 08:49:06PM +0200, Fabian Frederick wrote:
> kmalloc_array manages count*sizeof overflow.

Except in these call sites, overflow is impossible.

kmalloc_array() is useful when count is coming from an unvalidated
source.  But in this case, the count is either a fixed, hard-coded
value (256), or the size of n*count is *guaranteed* to be less than
the page size.

So this just adds some extra code which is pointless (assuming the
compiler isn't smart enough to optimize it out).

	       	     	       		   - Ted
--
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