Description
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.
Published: 2026-10-23
Score: n/a
EPSS: n/a
KEV: No
Impact: Potential denial of service or unintended mount propagation
Action: Assess Impact
AI Analysis

Impact

In the Linux kernel, a bug in the copy_tree handling of mount namespaces allows the recursive copying of mounts that are lazily unmounted but still kept alive by an open file descriptor. This is a CWE-20 weakness, where the code fails to properly validate input (mount state) before copying. The may_copy_tree function does not verify that a mount is still active before copying, causing the entire unmounted stack to be duplicated when AT_RANK or MS_REC options are used. This flaw could result in duplicated mounts, stale namespace references, or an EINVAL error if the operation fails. The practical effect is that an attacker with the ability to manipulate mounts might disrupt kernel operations or unintentionally expose duplicate namespace mounts within the system.

Affected Systems

The failure occurs within the Linux kernel and affects all kernel configurations that support NSFS or PIDFS mount namespaces. No specific kernel versions or sub-release information is disclosed in the advisory, so any kernel utilizing these namespaces could be impacted until patched.

Risk and Exploitability

The CVSS score and EPSS values are not provided and the vulnerability is not listed in the CISA KEV catalog, indicating a lower publicly known exploitation potential. Exploitation would require local access with permission to create and manipulate mount namespaces, typically requiring root or the CAP_SYS_ADMIN capability. While the exploitability is constrained to systems where lazy unmounts of namespace mounts are performed, the impact of unintentional propagation could lead to resource exhaustion or inconsistent namespace state, warranting careful evaluation.

Generated by OpenCVE AI on October 23, 2026 at 15:30 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version where this issue is fixed.
  • Avoid performing lazy unmounts of namespace or PID namespace mounts that have active file descriptors.
  • Check scripts or policies to prevent mounting of stale namespace mounts to avoid unintended propagation.

Generated by OpenCVE AI on October 23, 2026 at 15:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 23 Oct 2026 15:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Fri, 23 Oct 2026 12:45:00 +0000

Type Values Removed Values Added
Description 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.
Title namespace: don't copy an unmounted mount tree
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-23T12:20:11.256Z

Reserved: 2026-09-25T10:25:14.384Z

Link: CVE-2026-98992

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-23T13:17:21.283

Modified: 2026-10-23T13:17:21.283

Link: CVE-2026-98992

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T15:30:14Z

Weaknesses
  • CWE-20

    Improper Input Validation