CVE-2026-98993 in Linux
Summary
by MITRE • 10/23/2026
In the Linux kernel, the following vulnerability has been resolved:
namespace: don't inherit MNT_UMOUNT in clone_mnt()
MNT_UMOUNT gets raised on a mount that umount_tree() or umount_one() has taken out of its namespace. It's never cleared. __detach_mounts() unhooks a mount that carries it instead of unmounting it.
disconnect_mount() lets an unmounted child stay attached only if its parent carries it. propagate_umount() takes it as the sign that a mount is going to be unmounted when it decides what else can be unmounted, where a chain of locked mounts ends and where a for reparenting an overmount.
clone_mnt() copies the flags of the source and only masks MNT_INTERNAL_FLAGS which doesn't include MNT_UMOUNT. A mount that was lazily unmounted but is kept alive by a file descriptor can still be copied when its root is an nsfs or pidfs file because may_copy_tree() accepts those before checking whether the source is mounted at all:
mount --bind /proc/self/ns/net /tmp/x exec 3< /tmp/x umount -l /tmp/x mount --bind /proc/self/fd/3 /tmp/y
The mount on /tmp/y is attached to the caller's namespace with MNT_UMOUNT already set and every copy of it inherits the flag again.
That causes a number of bugs:
- Unlink its mountpoint from a mount namespace where it isn't one. __detach_mounts() takes it for a mount that was unmounted earlier, unhooks it from its parent and drops the reference the namespace holds on it. It stays in the namespace with one reference too few and as its own parent, so it can't be unmounted through the file descriptor anymore and the namespace never finds it again. When the namespace goes away it's leaked and points to a freed struct mnt_namespace that may_change_propagation() and anon_ns_root() read on the next propagation change or mount_setattr() through the file descriptor.
- Make it shared and unmount a peer. trace_transfers() follows the flag from the peer into it and strips it from its peer group.
- Let a propagated umount reach it. gather_candidates() marks it with T_UMOUNT_CANDIDATE but never puts it on the candidate list, so the mark is never cleared and every later propagated umount skips it. If it's the parent of a locked mount handle_locked() takes it as the cutoff and commits the locked child that should have stayed and disconnect_mount() leaves that child attached to it, unmounted under a mounted parent, which is what disconnect_mount() exists to prevent. When the namespace goes away umount_tree() visits the child a second time. And once __detach_mounts() has made it its own parent reparent() never finds the end of the chain of unmounted parents.
A clone is a new mount that has never been unmounted. Add MNT_UMOUNT to MNT_INTERNAL_FLAGS so clone_mnt() never copies it. And warn when umount_tree() reaches a mount that already has it set.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 10/23/2026
The Linux kernel contains a critical flaw in the virtual file system layer related to how mount flags are handled during namespace operations, specifically within the clone_mnt function. The vulnerability stems from the fact that MNT_UMOUNT is not masked out when cloning mounts. This flag indicates that a mount has been unmounted but remains accessible via an open file descriptor, often referred to as a lazy unmount scenario. When such a mount serves as the source for another bind mount operation through namespaces like nsfs or pidfs, the MNT_UMOUNT flag is incorrectly copied to the new clone. This behavior violates the semantic expectation that a cloned mount represents a fresh attachment point and should not inherit state flags indicating prior removal from its original namespace context.
This incorrect inheritance of the unmount flag leads to several severe operational failures within the kernel's mount management logic. One primary consequence involves the __detach_mounts function, which is designed to unlink mounts during cleanup or propagation changes. When it encounters a cloned mount carrying MNT_UMOUNT, it misinterprets this as an already detached entity and proceeds to unhook it from its parent while dropping namespace references incorrectly. This results in reference count mismatches where the mount becomes orphaned within the namespace structure. Consequently, the mount cannot be properly cleaned up through standard file descriptor mechanisms, leading to memory leaks of struct mnt_namespace objects that may point to freed memory regions if accessed again during subsequent propagation changes or attribute modifications via mount_setattr calls.
Furthermore, the presence of MNT_UMOUNT on cloned mounts disrupts peer group management and propagation logic. The trace_transfers function relies on this flag to identify unmounted peers within a shared subtree; when it encounters an incorrectly flagged clone, it strips the flag from legitimate peers in the same group, causing inconsistent state across related mount points. In scenarios involving propagated umount operations, gather_candidates marks affected mounts with T_UMOUNT_CANDIDATE but fails to add them to the active candidate list due to their anomalous status. This prevents proper cleanup of propagation chains and can cause locked child mounts to be incorrectly committed or left attached under mounted parents, violating core invariants maintained by disconnect_mount. These issues compound when namespaces are destroyed, potentially leading to use-after-free conditions as functions like may_change_propagation read stale pointers from leaked namespace structures.
From a classification perspective, this vulnerability aligns with CWE-20 Improper Input Validation and CWE-416 Use After Free, as the kernel fails to validate that cloned mounts should not retain unmount state flags, leading to memory safety issues upon subsequent access. In terms of ATT&CK mapping, while primarily an internal stability issue rather than a direct exploitation vector for external attackers, it relates to Taint Analysis and Defense Evasion concepts where improper handling of object states allows the system to enter inconsistent configurations that could potentially be leveraged in complex privilege escalation chains involving namespace manipulation. The root cause is fundamentally a logic error in flag propagation during mount cloning operations within Linux namespaces.
To mitigate this vulnerability, developers have implemented a fix by adding MNT_UMOUNT to the set of internal flags masked out during clone_mnt execution. This ensures that any newly cloned mount starts with a clean state regarding unmount status, preventing the inheritance of stale umount indicators from lazily unmounted sources. Additionally, warning mechanisms are introduced in umount_tree to detect and flag instances where an already flagged mount is encountered unexpectedly, aiding in future debugging and ensuring stricter adherence to expected mount lifecycle states. System administrators should ensure their kernels are updated with patches addressing this specific namespace handling logic error to prevent potential memory leaks and stability issues associated with complex bind mount operations across namespaces.