CVE-2023-52935
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
27/03/2025
Last modified:
25/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
mm/khugepaged: fix ->anon_vma race<br />
<br />
If an ->anon_vma is attached to the VMA, collapse_and_free_pmd() requires<br />
it to be locked.<br />
<br />
Page table traversal is allowed under any one of the mmap lock, the<br />
anon_vma lock (if the VMA is associated with an anon_vma), and the<br />
mapping lock (if the VMA is associated with a mapping); and so to be<br />
able to remove page tables, we must hold all three of them. <br />
retract_page_tables() bails out if an ->anon_vma is attached, but does<br />
this check before holding the mmap lock (as the comment above the check<br />
explains).<br />
<br />
If we racily merged an existing ->anon_vma (shared with a child<br />
process) from a neighboring VMA, subsequent rmap traversals on pages<br />
belonging to the child will be able to see the page tables that we are<br />
concurrently removing while assuming that nothing else can access them.<br />
<br />
Repeat the ->anon_vma check once we hold the mmap lock to ensure that<br />
there really is no concurrent page table access.<br />
<br />
Hitting this bug causes a lockdep warning in collapse_and_free_pmd(),<br />
in the line "lockdep_assert_held_write(&vma->anon_vma->root->rwsem)". <br />
It can also lead to use-after-free access.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.8 (including) | 5.4.299 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.243 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.192 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.11 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.2:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.2:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.2:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.2:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.2:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.2:rc6:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/023f47a8250c6bdb4aebe744db4bf7f73414028b
- https://git.kernel.org/stable/c/352fbf61ce776fef18dca6a68680a6cd943dac95
- https://git.kernel.org/stable/c/abdf3c33918185c3e8ffeb09ed3e334b3d7df47c
- https://git.kernel.org/stable/c/acb08187b5a83cdb9ac4112fae9e18cf983b0128
- https://git.kernel.org/stable/c/cee956ab1efbd858b4ca61c8b474af5aa24b29a6
- https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html



