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 02:15:54 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] ext4: fix races in ext4_sync_parent()

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?

> +		next = igrab(dentry->d_parent->d_inode);

what protects you against rename() (OK, d_mode()) here?
--
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