CVE-2026-98992 in Linuxinfo

Summary

by MITRE • 10/23/2026

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

namespace: don't copy an unmounted mount tree

may_copy_tree() accepts a mount whose root is an nsfs or pidfs file before it checks whether that mount is mounted. This exception exists for nsfs and pidfs mounts. They are part of no mount namespace so neither check_mnt() nor is_mounted() would let them through and bind-mounting a nsfsfd or a pidfd wouldn't work.

Problem is that exception also admits a bind mount of such a file when it was lazily unmounted and is only kept alive by a file descriptor:

mount --bind /proc/self/ns/net /tmp/x exec 3< /tmp/x umount -l /tmp/x mount --rbind /proc/self/fd/3 /tmp/y

With MS_REC or AT_RECURSIVE copy_tree() doesn't stop at the unmounted mount. It copies every mount that stayed attached to it as well. So if you have a bunch of overmounts over the nsfsfd or the pidfd the whole unmounted stack is copied. That's a bug.

So refuse to walk an unmounted tree. Copying its root alone stays possible. So a bind mount of a namespace that is gone can still be recreated from a file descriptor on the old one. The file descriptor pins that mount and its root and __has_locked_children() only reads the direct children which don't leave the parent's list without namespace_sem. The internal mounts carry MNT_NS_INTERNAL instead of NULL and are still walked. Copying an unmounted tree recursively fails with EINVAL.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 10/23/2026

The Linux kernel contains a logic flaw within the mount management subsystem that allows for the incorrect handling of unmount operations involving special file system namespaces, specifically nsfs and pidfs mounts. This vulnerability stems from the implementation of the may_copy_tree function, which is responsible for validating whether a specific mount tree can be copied or bind-mounted into another location in the filesystem hierarchy. The core issue arises because this validation routine accepts mounts rooted at namespace files before verifying if those mounts are currently active within the system's mount table. This exception was originally designed to facilitate operations on nsfs and pidfs mounts, which reside outside of standard mount namespaces and would otherwise be rejected by checks such as check_mnt or is_mounted due to their unique structural properties.

The practical consequence of this design oversight is that an attacker can exploit the interaction between lazy unmounts and file descriptor retention to copy entire trees of overmounted filesystems even after they have been logically removed from the active namespace. When a mount point associated with a nsfs or pidfd is lazily unmounted, it remains in memory as long as there are open file descriptors referencing it. By opening such a file descriptor before performing a lazy unmount, an actor can subsequently use recursive bind mounting operations to duplicate not just the root mount but all attached child mounts that remain physically present despite being logically detached. This behavior violates the expected isolation boundaries of namespace management and allows for the duplication of filesystem states that should have been effectively discarded or isolated from new copies.

From a security perspective, this flaw represents an improper check before copying resources, which can lead to unintended state replication in containerized environments where mount namespaces are heavily utilized for isolation. The ability to recursively copy unmounted trees means that sensitive namespace configurations or mounted filesystems could be duplicated and potentially accessed by processes that should not have visibility into them. This undermines the integrity of namespace boundaries and could facilitate privilege escalation scenarios if combined with other vulnerabilities, as it allows an entity to recreate a view of the filesystem hierarchy based on stale data structures that are no longer actively managed by the kernel's mount tree logic.

To mitigate this risk, the Linux kernel has been updated to refuse walking through unmounted trees during recursive copy operations while still permitting single-mount bind mounts from file descriptors. This change ensures that copying an entire unmounted subtree fails with a permission or invalid argument error, thereby preventing the duplication of complex overmount stacks. However, the fix preserves the ability to recreate specific namespace configurations by binding mount individual roots via their associated file descriptors, as these operations are safely pinned and do not traverse potentially stale child mounts. This adjustment aligns kernel behavior with strict security principles regarding resource lifecycle management and ensures that unmounted resources cannot be inadvertently propagated through recursive filesystem operations.

Responsible

Linux

Reservation

09/25/2026

Disclosure

10/23/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!