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
| ||
|
Date: Sat, 11 Oct 2014 22:55:10 -0500 From: Eric Biggers <ebiggers3@...il.com> To: Al Viro <viro@...IV.linux.org.uk> Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: fs/namei.c: Misuse of sequence counts? On Sun, Oct 12, 2014 at 12:46:35AM +0100, Al Viro wrote: > > Nope. What we do is > * pick parent inode and seqcount (in whatever order) > * THEN check that child is still unchanged. > The second part guarantees that parent dentry had been the parent of > child all along, since the moment we'd first fetched _child's_ seqcount. > And since a pinned positive dentry can't have its ->d_inode changed, > we know that the value of parent's inode we'd fetched remained valid > at least until we'd checked the child's seqcount and found it unchanged. > Which means that we had it valid at some point after we'd fetched parent's > seqcount. Ah, very tricky. And I take it that the other two fetches of d_inode in follow_dotdot_rcu() can likewise be unordered with respect to read_seqcount_begin(), because the underlying dentries are pinned as either mnt_mountpoint or mnt_root --- which in RCU mode, is only guaranteed because of the call to synchronize_rcu() in namespace_unlock() prior to dropping references? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists