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:	Wed, 27 Jul 2011 20:34:22 -0400
From:	Ted Ts'o <tytso@....edu>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] ext4: fix races in ext4_sync_parent()

On Wed, Jul 27, 2011 at 02:15:54AM +0100, Al Viro wrote:
> On Tue, Jul 26, 2011 at 09:13:12PM -0400, Theodore Ts'o wrote:
> > +	inode = igrab(inode);
> > +	while (ext4_test_inode_state(inode, EXT4_STATE_NEWENTRY)) {
> >  		ext4_clear_inode_state(inode, EXT4_STATE_NEWENTRY);
> > -		dentry = list_entry(inode->i_dentry.next,
> > -				    struct dentry, d_alias);
> > -		if (!dentry || !dentry->d_parent || !dentry->d_parent->d_inode)
> > +		dentry = list_first_entry(&inode->i_dentry,
> > +					  struct dentry, d_alias);
> 
> ... and what if you don't have a dentry for that inode anymore?

I thought you were complaining that dentry could never be NULL
earlier?  We earlier checked for NULL, but I figured you knew
something I didn't....

> > +		next = igrab(dentry->d_parent->d_inode);
> 
> what protects you against rename() (OK, d_mode()) here?

Does it matter?  We'll get either the old or the new parent directory,
but either way it will be a valid inode, right?  Or am I missing
something?

						- 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