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]
Message-ID: <20130828224538.GJ27079@thunk.org>
Date:	Wed, 28 Aug 2013 18:45:38 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	"Darrick J. Wong" <darrick.wong@...cle.com>,
	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 4/5] ext4: Mark block group as corrupt on inode bitmap
 error

On Wed, Jul 24, 2013 at 03:22:52PM +0800, Zheng Liu wrote:
> On Fri, Jul 19, 2013 at 04:55:59PM -0700, Darrick J. Wong wrote:
> > If we detect either a discrepancy between the inode bitmap and the inode counts
> > or the inode bitmap fails to pass validation checks, mark the block group
> > corrupt and refuse to allocate or deallocate inodes from the group.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>

Thanks, applied.

> > @@ -266,7 +270,9 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
> >  	block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb);
> >  	bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb);
> >  	bitmap_bh = ext4_read_inode_bitmap(sb, block_group);
> > -	if (!bitmap_bh)
> > +	/* Don't bother if the inode bitmap is corrupt. */
> > +	grp = ext4_get_group_info(sb, block_group);
> > +	if (unlikely(EXT4_MB_GRP_IBITMAP_CORRUPT(grp)) || !bitmap_bh)
> >  		goto error_return;
> 
> It seems that this is a duplicated check.  If we encounters a currupted
> inode bitmap, ext4_read_inode_bitmap() will return null.

If an already released inode is freed, the IBITMAP_CORRUPT bit can be
set even though the checksum is valid and ext4_read_inode_bitmap()
returns a non-null bh pointer.

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