KernelScan.io

HIGH Introduced in 6.15

namespace NotifyList UAF

CVE-2026-98991

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.1HIGH

01

In the Linux kernel, the following vulnerability has been resolved: namespace: queue a mount only once for mount notifications mnt_notify_add() puts a mount on notify_list. It doesn't check whether the mount is on the list already. That's fine as long as every mount is queued at most once per namespace_sem hold. It isn't. propagate_umount() moves a surviving overmount off a stack of mounts that are going away and queues it as moved. shrink_submounts() and mark_mounts_for_expiry() call umount_tree() for several mounts under a single namespace_sem hold. So the second umount_tree() can take down exactly the mount the first one reparented, reparent it once more and so end up queueing it a second time. The second list_add_tail() cuts the mounts queued in between out of the list while the head still points at the last of them. notify_mnt_list() then only visits that one mount and the others are freed after the grace period with notify_list still pointing at them. Every later mount operation on the host walks freed memory: BUG: KASAN: slab-use-after-free in __list_add_valid_or_report Read of size 8 at addr ffff8881003d57e0 by task notify_dq/162 __list_add_valid_or_report+0x15c/0x1a0 mnt_add_to_ns+0x322/0x890 attach_recursive_mnt.isra.0+0xf2a/0x1a00 path_mount+0x139c/0x1d40 This needs a mount with MNT_SHRINKABLE to bind from. That's what finish_automount() creates (submounts of NFS, AFS and CIFS and the tracefs mount below debugfs). Bind mounts inherit the flag. A mount namespace with a FAN_MARK_MNTNS mark does the rest and root in a user namespace can have both. Initialize to_notify in alloc_vfsmnt() and leave a mount alone that is queued already. mnt_notify() looks at the state the mount has when the list is drained so a single entry per mount is enough. The move event for a mount that is unmounted under the same hold is lost. That's fine. The detach is what matters.

02

Engine v0.9.0

Risk summary

A local attacker with access to a user namespace can trigger a use-after-free in the kernel's mount notification list by orchestrating a sequence of bind mounts and unmounts involving shrinkable filesystems (NFS, AFS, CIFS, tracefs) and a fanotify mount namespace mark. This leads to kernel memory corruption, enabling privilege escalation to root on the host and container escape. Systems running untrusted workloads in containers or multi-tenant environments are at highest risk.

Affectedfs/namespace.c, fs/mount.h (VFS mount namespace)

Vulnerability analysis

The kernel's mount notification subsystem adds mounts to a per-namespace notification list when they are attached or detached. A logic error allowed the same mount to be queued twice during a single namespace_sem hold when multiple umount operations raced through propagate_umount(). The second list insertion corrupted the list pointers, causing the notification drainer to skip intermediate mounts. Those skipped mounts were later freed while the list head still referenced them, leaving dangering pointers. Subsequent mount operations by any process on the host then walked freed slab memory, resulting in a use-after-free. The fix adds a guard in mnt_notify_add() to skip mounts already on the notification list and initializes the list head at mount allocation time. The bug is reachable by an unprivileged user who can create a user namespace (gaining CAP_SYS_ADMIN inside it), set up a fanotify mount namespace mark, and trigger the vulnerable umount sequence via shrinkable automounts from network filesystems or tracefs.

03

BranchIntroducedFixed inPatch commit
6.186.156.18.57acbe9e4418e2
7.26.157.2.11702ff3fe4998
mainline6.157.3bd2feb7796b6