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:	Mon, 15 Mar 2010 13:08:32 +0100
From:	Jan Kara <jack@...e.cz>
To:	Dan Carpenter <error27@...il.com>
Cc:	Jan Kara <jack@...e.cz>, Pekka Enberg <penberg@...helsinki.fi>,
	Hannes Eder <hannes@...neseder.net>,
	Akinobu Mita <akinobu.mita@...il.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] udf: potential integer overflow

On Mon 15-03-10 11:21:13, Dan Carpenter wrote:
> bloc->logicalBlockNum is unsigned so it's never less than zero.
> 
> When I saw that, it made me worry that "bloc->logicalBlockNum + count"
> could overflow.  That's why I changed the check for less than zero
> to an overflow check.  (The test works because "count" is also 
> unsigned.)
> 
> Signed-off-by: Dan Carpenter <error27@...il.com>
  Thanks. Merged.

> ---
> GCC 4.1 apparently optimizes overflow checks like this away, but it should
> work for other versions of gcc.  I tested with GCC 4.3.
> http://www.fefe.de/intof.html
  It should only optimize them out for signed types (moreover kernel has
this optimization turned off so it's a non-issue for us anyway). 

								Honza

-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
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