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:	Thu, 12 Jun 2008 04:59:45 -0600
From:	Andreas Dilger <adilger@....com>
To:	Frédéric Bohé <frederic.bohe@...l.net>
Cc:	tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: fix online resize group descriptors corruption

On Jun 12, 2008  11:42 +0200, Fr�d�ric Boh� wrote:
> From: Frederic Bohe <frederic.bohe@...l.net>
> 
> This is the patch for the group descriptor table corruption during
> online resize pointed out by Theodore Tso.
> The issue was due to the ext4 group descriptor which can be either
> 32 or 64 bytes long.
> Only the 64 bytes structure was taken into account.
> 
> diff -rup a/fs/ext4/resize.c b/fs/ext4/resize.c
> --- a/fs/ext4/resize.c
> +++ b/fs/ext4/resize.c
> @@ -855,7 +855,8 @@ int ext4_group_add(struct super_block *s
>  	 */
>  
>  	/* Update group descriptor block for new group */
> -	gdp = (struct ext4_group_desc *)primary->b_data + gdb_off;
> +	gdp = (struct ext4_group_desc *)(
> +	       (__u8 *)primary->b_data + gdb_off * EXT4_DESC_SIZE(sb));

Normally pointer arithmetic is done by casting to (char *)...
Otherwise, patch looks sensible, though it could be reformatted to 
match the normal coding style a bit better:

	gdp = (struct ext4_group_desc *)((char *)primary->b_data +
					 gdb_off * EXT4_DESC_SIZE(sb));

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ