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

namespace: remove the fsnotify marks of a mount namespace in process context

mnt_ns_release() drops the last passive reference of a mount namespace
and removes its fanotify marks via fsnotify_mntns_delete(). That takes
the mutex of every group with a mark on the namespace and the spinlock
of the connector. Fine from process context. But mnt_ns_tree_remove()
hands the reference the namespace was allocated with to call_rcu() and
so the marks are removed from the RCU softirq:

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:623
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/3
__mutex_lock+0x113/0x24b0
fsnotify_destroy_marks+0x11b/0x3d0
mnt_ns_release_rcu+0x57/0xa0
rcu_core+0x6b6/0x1e40

and lockdep complains about the connector lock being taken from softirq
context. A fanotify group with a FAN_MARK_MNTNS mark on the mount
namespace of another task is all that's needed. Root in a user
namespace can do that for a mount namespace it owns. The task exits and
the namespace is freed with the mark still on it.

Remove the marks in free_mnt_ns() before the namespace is handed to RCU.
That runs in process context once the last active reference is gone. A
mark is added through a file descriptor to the namespace which holds an
active reference so no mark can show up after that.
Published: 2026-10-23
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Kernel Crash (Denial of Service)
Action: Patch Kernel
AI Analysis

Impact

In the Linux kernel, removing fsnotify marks from a mount namespace while the kernel is in an RCU softirq context causes the code to acquire a mutex that is only safe in process context. This mismatch triggers a BUG and can lead to a kernel panic, effectively denying service. An attacker with root privileges inside a user namespace can create a fanotify group that sets a FAN_MARK_MNTNS mark on another task’s mount namespace. When that task exits, the residual mark is deleted during an RCU softirq, satisfying the crash condition. The flaw does not grant elevated privileges beyond what is already available to the attacker. The issue corresponds to CWE‑821, a deadlock or context misuse weakness, whereby synchronization primitives are used in an inappropriate execution context. A kernel panic caused by this bug results in an immediate loss of operating system services; data in memory may be lost or corrupted.

Affected Systems

All Linux kernel releases are potentially impacted because the vulnerability resides in core kernel code and the supplied CPE string covers the entire Linux kernel family. No specific version constraints are provided, so every kernel distribution could be affected until the fix is applied.

Risk and Exploitability

The CVSS score of 5.5 denotes moderate severity, while the EPSS score of less than 1% suggests a low likelihood of exploitation. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires root privileges within a user namespace, limiting the attack surface to privileged users. An attacker who can execute as root in a user namespace can trigger the kernel panic and cause a denial‑of‑service event.

Generated by OpenCVE AI on October 29, 2026 at 22:35 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel update that incorporates the commit removing fsnotify marks before RCU release; this patch eliminates the deadlock condition identified by CWE‑821 and prevents the kernel BUG.
  • Restrict fanotify usage by revoking CAP_SYS_ADMIN or configuring the kernel to deny the creation of FAN_MARK_MNTNS marks for non‑privileged processes. This limits the attacker’s ability to place the vulnerable mark on a mount namespace.
  • Disable or restrict unprivileged user namespaces if they are not required. Set kernel.unprivileged_userns_clone=0 via sysctl or modify systemd user namespace settings to lower the attack surface.

Generated by OpenCVE AI on October 29, 2026 at 22:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 29 Oct 2026 20:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-82

Thu, 29 Oct 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-821
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


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

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux

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

Type Values Removed Values Added
Weaknesses CWE-82

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: remove the fsnotify marks of a mount namespace in process context mnt_ns_release() drops the last passive reference of a mount namespace and removes its fanotify marks via fsnotify_mntns_delete(). That takes the mutex of every group with a mark on the namespace and the spinlock of the connector. Fine from process context. But mnt_ns_tree_remove() hands the reference the namespace was allocated with to call_rcu() and so the marks are removed from the RCU softirq: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:623 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/3 __mutex_lock+0x113/0x24b0 fsnotify_destroy_marks+0x11b/0x3d0 mnt_ns_release_rcu+0x57/0xa0 rcu_core+0x6b6/0x1e40 and lockdep complains about the connector lock being taken from softirq context. A fanotify group with a FAN_MARK_MNTNS mark on the mount namespace of another task is all that's needed. Root in a user namespace can do that for a mount namespace it owns. The task exits and the namespace is freed with the mark still on it. Remove the marks in free_mnt_ns() before the namespace is handed to RCU. That runs in process context once the last active reference is gone. A mark is added through a file descriptor to the namespace which holds an active reference so no mark can show up after that.
Title namespace: remove the fsnotify marks of a mount namespace in process context
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 Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

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

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

Link: CVE-2026-98986

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-98986

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-23T00:00:00Z

Links: CVE-2026-98986 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-29T22:45:03Z

Weaknesses
  • CWE-821

    Incorrect Synchronization