HIGH Introduced in 7.0
namespace CoveredMount Bypass
CVE-2026-98988
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
KernelScan AI6.3MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: namespace: keep covered mounts covered in OPEN_TREE_NAMESPACE open_tree(OPEN_TREE_NAMESPACE) creates a new mount namespace from a copy of the tree at the given path. The caller needs to be privileged over its current user namespace because the new mount namespace will be owned by it. It doesn't need to be privileged over the mount namespace the tree is copied from. An unprivileged user just needs to create a user namespace first. The copy follows the rules of a detached bind mount. Without AT_RECURSIVE only the mount itself is cloned and its children are left out. With AT_RECURSIVE unbindable mounts are skipped. Both is fine when the caller has privileges over the source mount namespace because it could unmount those mounts anyway. Not so for an unprivileged user in that mount namespace. For them a mount namespace copy is what unshare() does. copy_mnt_ns() copies everything including unbindable mounts and lock_mnt_tree() makes sure nothing can be unmounted in the copy. Nothing that was covered gets revealed. create_new_namespace() only does the locking and so the covered content is right there in the new mount namespace: # mount -t tmpfs none /tmp/otn; mkdir /tmp/otn/covered # echo hidden > /tmp/otn/covered/under.txt # mount -t tmpfs none /tmp/otn/covered uid 1000, after unshare(CLONE_NEWUSER): fd = open_tree(AT_FDCWD, "/tmp/otn", OPEN_TREE_NAMESPACE); setns(fd, CLONE_NEWNS); open("/covered/under.txt", O_RDONLY) -> "hidden" Covering paths with mounts is how container runtimes mask parts of /proc and /sys and how admins hide things. When the caller's user namespace doesn't own the source mount namespace copy the way unshare() does and refuse a non-recursive copy of a mount that has anything mounted below the requested directory and copy unbindable mounts in a recursive copy. A caller that is privileged over the source mount namespace sees no change.
02KernelScan AI Analysis
Risk summary
An unprivileged local user who can create a user namespace can exploit a flaw in the OPEN_TREE_NAMESPACE feature to reveal files that were intentionally hidden by overmounting. Container runtimes and administrators commonly use mount covering to mask sensitive paths in /proc and /sys; this bug allows a user to bypass that protection and read the concealed data.
Vulnerability analysis
When open_tree() is called with OPEN_TREE_NAMESPACE by a process whose user namespace does not own the source mount namespace, the kernel previously copied the mount tree using detached-bind-mount semantics: non-recursive copies omitted child mounts and recursive copies skipped unbindable mounts. This differs from unshare(CLONE_NEWNS), which copies all mounts (including unbindable ones) and locks the tree so covered content stays hidden. The fix makes create_new_namespace() emulate unshare() for such callers by adding CL_COPY_UNBINDABLE to the copy flags and rejecting non-recursive copies when the target mount has children, ensuring covered paths remain covered in the new namespace. The vulnerability is reachable by any local user who can create a user namespace (unshare(CLONE_NEWUSER)), which is permitted by default on most distributions.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 7.2 | 7.0 | 7.2.11 | b8a94a405ddc |
| mainline | 7.0 | 7.3 | 0febe278ec45 |