CVE-2023-52935
mm/khugepaged: fix ->anon_vma race
Reported by linux · Published March 27, 2025
In the Linux kernel, the following vulnerability has been resolved: mm/khugepaged: fix ->anon_vma race If an ->anon_vma is attached to the VMA, collapse_and_free_pmd() requires it to be locked. Page table traversal is allowed under any one of the mmap lock, the anon_vma lock (if the VMA is associated with an anon_vma), and the mapping lock (if the VMA is associated with a mapping); and so to be able to remove page tables, we must hold all three of them. retract_page_tables() bails out if an ->anon_vma is attached, but does this check before holding the mmap lock (as the comment above the check explains). If we racily merged an existing ->anon_vma (shared with a child process) from a neighboring VMA, subsequent rmap traversals on pages belonging to the child will be able to see the page tables that we are concurrently removing while assuming that nothing else can access them. Repeat the ->anon_vma check once we hold the mmap lock to ensure that there really is no concurrent page table access. Hitting this bug causes a lockdep warning in collapse_and_free_pmd(), in the line "lockdep_assert_held_write(&vma->anon_vma->root->rwsem)". It can also lead to use-after-free access.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-tools-devel | Amazon Linux | 6.1.12-17.42.amzn2023 |
| kernel-tools | Amazon Linux | 6.1.12-17.42.amzn2023, 4.14.355-280.684.amzn2 |
| kernel-libbpf-devel | Amazon Linux | 6.1.12-17.42.amzn2023 |
| kernel | Amazon Linux | 6.1.12-17.42.amzn2023 |
| kernel-livepatch-6.1.12-17.42 | Amazon Linux | 1.0-0.amzn2023 |
| kernel-libbpf | Amazon Linux | 6.1.12-17.42.amzn2023 |
| python-perf | Amazon Linux | 4.14.355-280.684.amzn2 |
| kernel-headers | Amazon Linux | 6.1.12-17.42.amzn2023, 4.14.355-280.684.amzn2 |
| bpftool | Amazon Linux | 6.1.12-17.42.amzn2023 |
| python3-perf | Amazon Linux | 6.1.12-17.42.amzn2023 |
| Linux | Linux | acb08187b5a83cdb9ac4112fae9e18cf983b0128, abdf3c33918185c3e8ffeb09ed3e334b3d7df47c, 023f47a8250c6bdb4aebe744db4bf7f73414028b |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | f3f0e1d2150b2b99da2cbdfaad000089efe9bf30, f3f0e1d2150b2b99da2cbdfaad000089efe9bf30, f3f0e1d2150b2b99da2cbdfaad000089efe9bf30 |
| Linux | Linux | 4.8, 0, 5.4.299 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2 | kernel-tools | 0 |
| amazon:2023 | kernel-livepatch-6.1.12-17.42 | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2 | python-perf | 0 |
| amazon:2 | kernel-headers | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-headers | 0 |
| Linux | Linux | *, *, * |
| amazon:2 | kernel-devel | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2 | kernel-livepatch-4.14.355-280.684 | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2 | kernel-tools-devel | 0 |
…and 4 more
Timeline
- Mar 27, 2025 CVE Published
- Mar 28, 2025 EPSS Score (30 in total, the first dated here)
- Mar 28, 2025 Coalition ESS Score (19 in total, the first dated here)
- Jan 14, 2026 PoC Published
- Jan 25, 2026 Security Advisory (153 in total, the first dated here)
- Apr 20, 2026 Distribution Patch (145 in total, the first dated here)
- Jun 17, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2023-52935
vulnetix vdb fixes CVE-2023-52935
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-52935/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart