CVE-2024-46801
published high CVSS 3.1 · 7.8libfs: fix get_stashed_dentry()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux07fd7c329839cf0b8c7766883d830a1a0d12d1dd to < 03e2a1209a83a380df34a72f7d6d1bc6c74132c7 · 07fd7c329839cf0b8c7766883d830a1a0d12d1dd to < 4e32c25b58b945f976435bbe51f39b32d714052e · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.9 (affected) · 0 to < 6.9 (unaffected · semver) · 6.10.10 through 6.10.* (unaffected · semver) · 6.11 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: libfs: fix get_stashed_dentry() get_stashed_dentry() tries to optimistically retrieve a stashed dentry from a provided location. It needs to ensure to hold rcu lock before it dereference the stashed location to prevent UAF issues. Use rcu_dereference() instead of READ_ONCE() it's effectively equivalent with some lockdep bells and whistles and it communicates clearly that this expects rcu protection.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The vulnerable path is reached only through local syscalls — pidfd_open()/clone(CLONE_PIDFD) into pidfs_alloc_file(), or open/readlink of /proc/<pid>/ns/* and the NS_GET_PARENT/NS_GET_USERNS ioctls into nsfs. No remote or adjacent-network input reaches path_from_stashed(). AC:L - The attacker controls both sides of the race — one thread repeatedly calls path_from_stashed() while another drops the last reference on the same stashed dentry (always_delete_dentry forces immediate kill), and the sequence can be retried indefinitely at high frequency with slab grooming to control the reallocated object. PR:L - Any unprivileged local user can trigger this; pidfd_open() on its own pid, clone(CLONE_PIDFD), and opening /proc/self/ns/* require no capabilities, and the only gate (ptrace_may_access) is trivially satisfied for the attacker's own task. UI:N - The attacker drives both racing threads entirely from its own process; no victim action, mount, or file access by another user is needed. S:U - The use-after-free corrupts kernel memory within the same security authority as the attacking task; no VM, IOMMU, or hypervisor boundary is crossed. C:H - The stale pointer is read from freed memory and, once the dentry_cache slot is resprayed, is returned as path->dentry and passed to dentry_open(), giving the attacker a file descriptor over a foreign dentry/inode and read access to kernel objects and data it does not own. I:H - lockref_get_not_dead() performs a cmpxchg64 read-modify-write into the freed (and attacker-reallocated) object, and the returned foreign dentry causes type confusion where i_private is treated as struct ns_common — including the indirect ns->ops->put(ns) call in nsfs_evict() — a classic path to control-flow hijack and privilege escalation. A:H - The use-after-free reliably produces a KASAN-detected corruption/oops, and the non-cmpxchg fallback takes spin_lock() on freed memory, which can hang the CPU; the resulting refcount imbalance also causes later premature frees and panics.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 07fd7c329839cf0b8c7766883d830a1a0d12d1dd to < 03e2a1209a83a380df34a72f7d6d1bc6c74132c7 (affected · git)07fd7c329839cf0b8c7766883d830a1a0d12d1dd to < 4e32c25b58b945f976435bbe51f39b32d714052e (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.9 (affected)0 to < 6.9 (unaffected · semver)6.10.10 through 6.10.* (unaffected · semver)6.11 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
2Linux · cna
libfs: fix get_stashed_dentry()
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 2260954b3ab057266de23fe0d4c0c91cd112c1a26ff5a28cfc5d085bcdfb014d
- Ingested
- 23 Sep 2026, 08:28:03 UTC
- Source record
- Official CVE record