PT-2026-166627
CVE-2026-142890
·
Published
2026-12-03
·
Updated
2026-12-03
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
namei: don't assert S ISDIR on a stale rcu-walk inode
lookup inode permission may exec() asserts that it is only ever handed a
directory, on the grounds that link path walk() has already checked
d can lookup(). In rcu-walk that does not follow. step into() samples
->d inode and validates it against ->d seq, but link path walk() loads
->d flags again afterwards, and nothing orders that load against changes
of the dentry:
CPU0 (rcu-walk of "x/y") CPU1
step into(x)
inode = x->d inode // regular file
read seqcount retry(&x->d seq) == 0
nd->inode = inode
unlink("x")
d delete() // x goes negative
mkdir("x")
d instantiate() // same dentry
d can lookup(x) // true now
may lookup()
VFS BUG ON INODE(!S ISDIR(nd->inode->i mode))
With CONFIG PREEMPT RCU the walker can be preempted in that window, so it
is not limited to a few instructions. mkdir() only gets the same dentry
back if the filesystem keeps negative dentries around. tmpfs doesn't,
ext4 does.
Apart from the assertion the stale inode is harmless, and has been there
since before the assertion was added: nd->seq no longer matches x->d seq,
so lookup fast(), follow dotdot rcu() and try to unlazy() all fail with
-ECHILD and the walk is redone in ref-walk, whatever the permission check
on the old inode said.
Keep the assertion for ref-walk, where the dentry is pinned and can't
change type, and skip it for rcu-walk. No change for kernels without
CONFIG DEBUG VFS.
Found an issue in the description? Have something to add? Feel free to write us 👾