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  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:	Thu, 13 Nov 2008 21:34:43 -0500
From:	Valerie Aurora Henson <vaurora@...hat.com>
To:	Andreas Dilger <adilger@....com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [RFC PATCH 11/17] Fix overflow in calculation of total file	system blocks

On Thu, Nov 13, 2008 at 01:04:02PM -0700, Andreas Dilger wrote:
> On Nov 11, 2008  19:43 -0800, Valerie Aurora Henson wrote:
> > Blocks per group and group desc count are both 32-bit; multiplied they
> > produce a 32-bit quantity which overflowed.
> > 
> > @@ -92,8 +92,8 @@ errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs,
> > -	real_end = (EXT2_BLOCKS_PER_GROUP(fs->super)
> > -		    * fs->group_desc_count)-1 + start;
> > +	real_end = ((__u64) EXT2_BLOCKS_PER_GROUP(fs->super)
> > +		    * (__u64) fs->group_desc_count)-1 + start;
> 
> Casting the first value to __u64 should be enough.

My approach with this kind of thing is to not make the reader try to
remember the exact type conversion rules, but I'll take it out if it's
just too much.

> This should really be part of patch 05/17 because that is where "real_end"
> is turned into a 64-bit value.

Okay, I'll fold it back.

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