CVE-2024-38610
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
19/06/2024
Last modified:
17/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map()<br />
<br />
Patch series "mm: follow_pte() improvements and acrn follow_pte() fixes".<br />
<br />
Patch #1 fixes a bunch of issues I spotted in the acrn driver. It<br />
compiles, that&#39;s all I know. I&#39;ll appreciate some review and testing from<br />
acrn folks.<br />
<br />
Patch #2+#3 improve follow_pte(), passing a VMA instead of the MM, adding<br />
more sanity checks, and improving the documentation. Gave it a quick test<br />
on x86-64 using VM_PAT that ends up using follow_pte().<br />
<br />
<br />
This patch (of 3):<br />
<br />
We currently miss handling various cases, resulting in a dangerous<br />
follow_pte() (previously follow_pfn()) usage.<br />
<br />
(1) We&#39;re not checking PTE write permissions.<br />
<br />
Maybe we should simply always require pte_write() like we do for<br />
pin_user_pages_fast(FOLL_WRITE)? Hard to tell, so let&#39;s check for<br />
ACRN_MEM_ACCESS_WRITE for now.<br />
<br />
(2) We&#39;re not rejecting refcounted pages.<br />
<br />
As we are not using MMU notifiers, messing with refcounted pages is<br />
dangerous and can result in use-after-free. Let&#39;s make sure to reject them.<br />
<br />
(3) We are only looking at the first PTE of a bigger range.<br />
<br />
We only lookup a single PTE, but memmap->len may span a larger area.<br />
Let&#39;s loop over all involved PTEs and make sure the PFN range is<br />
actually contiguous. Reject everything else: it couldn&#39;t have worked<br />
either way, and rather made use access PFNs we shouldn&#39;t be accessing.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.33 (including) | 5.15.161 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16.19 (including) | 5.17 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.17.2 (including) | 6.1.93 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.33 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.8.12 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.9 (including) | 6.9.3 (excluding) |
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/2c8d6e24930b8ef7d4a81787627c559ae0e0d3bb
- https://git.kernel.org/stable/c/3d6586008f7b638f91f3332602592caa8b00b559
- https://git.kernel.org/stable/c/4c4ba3cf3a15ccfbaf787d0296fa42cdb00da9b4
- https://git.kernel.org/stable/c/5c6705aa47b5b78d7ad36fea832bb69caa5bf49a
- https://git.kernel.org/stable/c/afeb0e69627695f759fc73c39c1640dbf8649b32
- https://git.kernel.org/stable/c/e873f36ec890bece26ecce850e969917bceebbb6
- https://git.kernel.org/stable/c/2c8d6e24930b8ef7d4a81787627c559ae0e0d3bb
- https://git.kernel.org/stable/c/3d6586008f7b638f91f3332602592caa8b00b559
- https://git.kernel.org/stable/c/4c4ba3cf3a15ccfbaf787d0296fa42cdb00da9b4
- https://git.kernel.org/stable/c/5c6705aa47b5b78d7ad36fea832bb69caa5bf49a
- https://git.kernel.org/stable/c/afeb0e69627695f759fc73c39c1640dbf8649b32
- https://git.kernel.org/stable/c/e873f36ec890bece26ecce850e969917bceebbb6



