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:	Mon, 24 Jun 2013 15:51:26 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, Andrew Morton <akpm@...l.org>,
	Jens Axboe <axboe@...nel.dk>,
	Kiyoshi Ueda <k-ueda@...jp.nec.com>,
	Lin Ming <ming.m.lin@...el.com>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] block:Remove extra condition in end of disk check

On Mon, Jun 24, 2013 at 07:20:12PM +0530, Raghavendra K T wrote:
> >@@ -1656,7 +1656,7 @@ static inline int bio_check_eod(struct bio *bio, unsigned int nr_sectors)
> >  	if (maxsector) {
> >  		sector_t sector = bio->bi_sector;
> >
> >-		if (maxsector < nr_sectors || maxsector - nr_sectors < sector) {
> >+		if (maxsector - nr_sectors < sector) {

If maxsector < nr_sectors, the subtraction will underflow making it a
very large number and fail to detect the invalid condition, no?

Thanks.

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