---
id: "CVE-2026-98979"
kind: "vulnerability"
aliases: ["CVE-2026-98979"]
title: "Linux kernel: automount under a detached mount crashes the kernel"
severity: "high"
cvss: null
epss: 0.00209
exploited: false
status: "open"
category: "infrastructure"
products: []
ecosystems: []
tags: ["containers", "infrastructure", "linux-kernel", "overlayfs", "self-hosted"]
not_affected_if: ["default-config"]
published_at: "2026-10-23T13:17:19+00:00"
first_seen_at: "2026-10-23T21:57:33+00:00"
updated_at: "2026-10-25T12:38:50+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-98979", "first_seen_at": "2026-10-23T21:57:33+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-98979", "first_seen_at": "2026-10-25T12:38:50+00:00"}]
---

# Linux kernel: automount under a detached mount crashes the kernel

A flaw in the Linux kernel's mount handling lets an automount be attached below a mount that is in no namespace, which dereferences an error pointer and crashes the kernel. The reported trigger is opening a path reported by fanotify on an overlay's lower filesystem, after which all mount operations on the system block.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `uname -r` and compare against the fixed kernel versions listed in the NVD entry (unknown in the sources).
- Check whether the kernel build includes the commit that changes `attach_recursive_mnt` / `is_mounted()` in fs/namespace.c (unknown in the sources).

## Fix

- Update the Linux kernel to a release that includes the upstream fix for CVE-2026-98979 (exact version unknown in the sources).
- Reboot into the patched kernel; the fix is in the kernel, not in userspace packages.

## Timeline

- 2026-10-23T21:57:33+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-98979
- 2026-10-25T12:38:50+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-98979

## From the sources

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

namespace: refuse an automount below a mount that is in no namespace

It's possible to add autmounts even when the parent mount isn't in the
mount namespace of the caller. The only requirement we have is that the
parent mount namespace must not be NULL, i.e., unmounted.

Problem is that clone_private_mount() has MNT_NS_INTERNAL which makes
that trivially true. So that passes the test and attach_recursive_mnt()
accepts that as a mount point and funny enough, count_mounts()
dereferences MNT_NS_INTERNAL. The problem is it is an error pointer...

So we can reach this in userspace via fanotify. A filesystem mark on the
lower filesystem of an overlay reports paths on the layer clone and
reading the event hands out a descriptor on it. For example with debugfs
as the lower layer it goes kaboom:

  openat(evfd, "tracing", O_DIRECTORY)

  Oops: general protection fault
  KASAN: null-ptr-deref in range [0x1d0-0x1d7]
  RIP: 0010:count_mounts+0x35/0x200
   attach_recursive_mnt
   finish_automount

And since that sleeping beauty happens under namespace_sem held for
writing every mount operation on the system blocks from then on.
Congrats.

Use is_mounted() instead which rejects unmounted and internal mounts
alike. The open fails with EINVAL just as it did before
clone_private_mount() used MNT_NS_INTERNAL.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
