CVE-2026-142890: namei: don't assert S_ISDIR on a stale rcu-walk inode

Published Dec 3, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

namei: don't assert SISDIR on a stale rcu-walk inode

lookupinodepermissionmayexec() asserts that it is only ever handed a directory, on the grounds that linkpathwalk() has already checked dcanlookup(). In rcu-walk that does not follow. stepinto() samples ->dinode and validates it against ->dseq, but linkpathwalk() loads ->dflags again afterwards, and nothing orders that load against changes of the dentry:

CPU0 (rcu-walk of "x/y") CPU1 stepinto(x) inode = x->dinode // regular file readseqcountretry(&x->dseq) == 0 nd->inode = inode unlink("x") ddelete() // x goes negative mkdir("x") dinstantiate() // same dentry dcanlookup(x) // true now maylookup() VFSBUGONINODE(!SISDIR(nd->inode->imode))

With CONFIGPREEMPTRCU 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->dseq, so lookupfast(), followdotdotrcu() and trytounlazy() 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 CONFIGDEBUGVFS.

Affected Software

2 affected componentsFixes available
Linux Linux kernel
linux/kernel>=6.19.0<7.3.6
7.3.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.6

Event History

Dec 3, 2026
CVE Published
via MITRE·03:25 AM
Data Sourced
via MITRE·03:25 AM
Description
Data Sourced
via OSV·03:25 AM
DescriptionAffected Software
Data Sourced
via NVD·04:18 AM
Description

Frequently Asked Questions

1

What conditions are required to trigger the issue?

A path walk of "x/y" must race with removal of x followed by creation of a directory at x using the same dentry. The affected walk is an RCU walk, and CONFIG_PREEMPT_RCU can widen the race window by allowing the walker to be preempted.

2

Which filesystems are implicated by the described race?

The filesystem must retain negative dentries so that mkdir() can reuse the dentry. The description identifies ext4 as doing this and states that tmpfs does not.

3

What happens if the stale inode is encountered?

The stale inode itself is described as harmless because the path sequence no longer matches the dentry sequence. The problematic effect is the directory-mode assertion, which can be reached after the dentry has changed from a regular file to a directory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203