namespace: refuse an automount below a mount that is in no namespace
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.
CVE-2026-98979
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-98979
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "df820f8de4e481222b17f9bcee7b909ae8167529",
"lessThan": "95fb7c259b86f5521f04973040ad492f2bef6f82",
"versionType": "git"
},
{
"status": "affected",
"version": "df820f8de4e481222b17f9bcee7b909ae8167529",
"lessThan": "35f2013f83ef16f9f0331c4c3a8e8d161580d574",
"versionType": "git"
},
{
"status": "affected",
"version": "df820f8de4e481222b17f9bcee7b909ae8167529",
"lessThan": "494c57572d2d5bc2839553ed41aabe92ed0f587c",
"versionType": "git"
},
{
"status": "affected",
"version": "df820f8de4e481222b17f9bcee7b909ae8167529",
"lessThan": "776e20e4fdc23c23687b511ffdc80047878049d3",
"versionType": "git"
},
{
"status": "affected",
"version": "df820f8de4e481222b17f9bcee7b909ae8167529",
"lessThan": "ba985ce08471c555af2a2fbe217c1bc2e72a6d8c",
"versionType": "git"
}
],
"programFiles": [
"fs/namespace.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "5.8"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "5.8",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.6.160",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.12.113",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.18.57",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "7.2.11",
"versionType": "semver",
"lessThanOrEqual": "7.2.*"
},
{
"status": "unaffected",
"version": "7.3",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"fs/namespace.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-98979
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #52831 · Revision 1
- Added to Heist Feed
- Publisher date