CVE-2024-42233
published high CVSS 3.1 · 7.8filemap: replace pte_offset_map() with pte_offset_map_nolock()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux58f327f2ce80f9c7b4a70e9cf017ae8810d44a20 to < 6a6c2aec1a89506595801b4cf7e8eef035f33748 · 58f327f2ce80f9c7b4a70e9cf017ae8810d44a20 to < 24be02a42181f0707be0498045c4c4b13273b16d · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.9 (affected) · 0 to < 6.9 (unaffected · semver) · 6.9.10 through 6.9.* (unaffected · semver) · 6.10 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: filemap: replace pte_offset_map() with pte_offset_map_nolock() The vmf->ptl in filemap_fault_recheck_pte_none() is still set from handle_pte_fault(). But at the same time, we did a pte_unmap(vmf->pte). After a pte_unmap(vmf->pte) unmap and rcu_read_unlock(), the page table may be racily changed and vmf->ptl maybe fails to protect the actual page table. Fix this by replacing pte_offset_map() with pte_offset_map_nolock(). As David said, the PTL pointer might be stale so if we continue to use it infilemap_fault_recheck_pte_none(), it might trigger UAF. Also, if the PTL fails, the issue fixed by commit 58f327f2ce80 ("filemap: avoid unnecessary major faults in filemap_fault()") might reappear.
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 vulnerability is triggered by a normal page fault on a locally mmap'ed file, reached through mmap/mlock2/madvise syscalls by a process on the machine. There is no network-facing path to `filemap_fault()`. AC:L - Although a race is involved, the attacker owns both sides of it: one thread faults on its own mlocked, page-cache-cold file mapping while another unprivileged thread issues `MADV_COLLAPSE`, and both only need `mmap_lock` read so they run concurrently. All preconditions (VM_LOCKED, pte_none, page-cache miss, page-table collapse) are set up deterministically by the attacker and the attempt can be retried in a tight loop. PR:L - Only an ordinary unprivileged local user account is required — `can_do_mlock()` passes on the default nonzero RLIMIT_MEMLOCK with no capability, and `MADV_COLLAPSE` requires no privilege. No root, no CAP_* and no namespace tricks are needed. UI:N - The attacker's own threads perform every step — mapping and locking a file, faulting on it, and collapsing the page table. No victim action or interaction is involved. S:U - The use-after-free corrupts kernel memory within the same kernel security authority; there is no crossing of a VM, IOMMU, or other security-authority boundary. C:H - This is a use-after-free on the split page-table lock: `spin_lock()`/`spin_unlock()` read a freed object that the attacker can have reallocated with sprayed content, and the resulting slab/`struct page` metadata corruption (overlapping allocations) is a well-known route to arbitrary kernel memory disclosure. I:H - Taking the stale lock writes into freed memory — either a reallocated `kmem_cache` object (ALLOC_SPLIT_PTLOCKS) or word 5 of a reused `struct page`, which aliases `struct slab::counters` (inuse/objects/frozen) and `page->private`. Corrupting slab metadata yields overlapping object allocations and a path to arbitrary write and control-flow hijack. A:H - A use-after-free on a spinlock reliably produces oopses, slab corruption panics, and deadlocks/hangs when the freed lock word is reused and never released. Any unprivileged user can trigger it repeatedly to crash the system.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 58f327f2ce80f9c7b4a70e9cf017ae8810d44a20 to < 6a6c2aec1a89506595801b4cf7e8eef035f33748 (affected · git)58f327f2ce80f9c7b4a70e9cf017ae8810d44a20 to < 24be02a42181f0707be0498045c4c4b13273b16d (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 6.9 (affected)0 to < 6.9 (unaffected · semver)6.9.10 through 6.9.* (unaffected · semver)6.10 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
2Linux · cna
filemap: replace pte_offset_map() with pte_offset_map_nolock()
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- aa031a1e2207b22152c0304a335940a80aa88df50cb347f254025973c61439b7
- Ingested
- 23 Sep 2026, 08:26:31 UTC
- Source record
- Official CVE record