CVE-2026-98982 in Linuxinfo

Summary

by MITRE • 10/23/2026

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

namespace: don't let a pseudo dentry become the root of a mount

d_alloc_pseudo() hands out dentries for pipes, sockets and other files that are never anyone's child or parent. They carry DCACHE_NORCU and dentry_free() frees them right away because no lockless path walk can ever reach them. That holds as long as such a dentry isn't the root of a mount. But bind mounting /proc/self/fd/<fd> of such a file does exactly that.

Most callers of alloc_file_pseudo() put their files on kernel-internal mounts and may_copy_tree() refuses those. bpf_token_create() doesn't. It places the token file on the bpffs mount the caller handed it and that mount is in the caller's mount namespace so the clone goes through:

mount --bind /proc/self/fd/<token> <file> open_tree(tokfd, "", AT_EMPTY_PATH | OPEN_TREE_CLONE) + move_mount()

__follow_mount_rcu() then loads ->mnt_root of that mount, reads d_seq and d_flags of the dentry and only then checks mount_lock. The dentry can be gone by then. The final mntput() of an unmounted parent unhooks a child that stayed attached to it under mount_lock alone. When the child's holder does the final put right after that the root is dput() and freed immediately while a walker that found the mount hashed still looks at it.

Refuse to clone a mount with a DCACHE_NORCU dentry as its root. Nothing sensible can be done with a bind mount of a bpf token anyway.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 10/23/2026

The Linux kernel vulnerability described involves a race condition and use-after-free issue within the namespace management subsystem, specifically affecting how pseudo dentries are handled during bind mounts involving BPF tokens. Pseudo dentries are special directory entries allocated for virtual filesystem objects such as pipes, sockets, and file descriptors that do not exist in the traditional sense on disk. These entities carry the DCACHE_NORCU flag, indicating they should be freed immediately upon release because no lockless path walk is expected to reach them under normal circumstances. The core flaw arises when a pseudo dentry becomes the root of a mount point through bind mounting operations, particularly those initiated by BPF token creation processes.

The technical mechanism of exploitation centers on the interaction between alloc_file_pseudo(), which creates these special file structures, and the subsequent mount cloning process. While most callers correctly place such files on kernel-internal mounts that are protected from tree copying via may_copy_tree() checks, bpf_token_create() operates differently. It places the token file onto a BPF filesystem mount provided by the caller, which resides in the caller's mount namespace. This configuration allows the clone operation to proceed through open_tree with AT_EMPTY_PATH and OPEN_TREE_CLONE flags, followed by move_mount(). During this sequence, __follow_mount_rcu() attempts to load the mounted root dentry, reading its sequence number and flags before acquiring the necessary mount_lock for validation.

This timing gap creates a critical window where the dentry can be freed while still being accessed. Specifically, when an unmounted parent performs its final mntput(), it unhooks child mounts that remained attached under only the protection of mount_lock without proper synchronization with other concurrent operations. If the holder of such a child then executes a final put operation immediately after this unhooking event, the root dentry is subject to immediate deallocation via dput(). However, a path walker that had previously found the mount hashed continues to reference and access this now-freed memory region, leading to use-after-free conditions.

The operational impact of this vulnerability includes potential kernel crashes, privilege escalation, or information disclosure depending on how an attacker exploits the corrupted memory state. By manipulating BPF token mounts, a local user could trigger the race condition to dereference freed kernel memory, potentially gaining unauthorized access to sensitive data or executing arbitrary code within the kernel context. This represents a significant security risk as it undermines the integrity of namespace isolation and mount management subsystems that are fundamental to containerization and process separation mechanisms in Linux.

Mitigation strategies involve preventing the cloning of mounts where the root dentry carries the DCACHE_NORCU flag, effectively blocking bind mounts of BPF tokens from being cloned into new namespaces. This restriction aligns with security best practices by ensuring that pseudo-dentries intended for ephemeral virtual objects are not exposed to complex mount namespace manipulations that could lead to lifecycle management errors. The fix ensures that such operations fail gracefully rather than proceeding through the vulnerable code path, thereby eliminating the race condition entirely.

This vulnerability maps to CWE-416 Use After Free in common weakness enumerations and relates to ATT&CK technique T1059 Command and Scripting Interpreter if leveraged for further exploitation within compromised systems. The issue highlights the importance of rigorous validation checks during mount namespace operations, particularly when dealing with virtual filesystem objects that have non-standard lifecycle requirements compared to regular file system entries.

Responsible

Linux

Reservation

09/25/2026

Disclosure

10/23/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!