CVE-2024-38610

Source
https://cve.org/CVERecord?id=CVE-2024-38610
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-38610.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-38610
Downstream
Related
Published
2024-06-19T13:56:12.083Z
Modified
2026-03-13T07:56:55.867843Z
Summary
drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map()
Details

In the Linux kernel, the following vulnerability has been resolved:

drivers/virt/acrn: fix PFNMAP PTE checks in acrnvmram_map()

Patch series "mm: followpte() improvements and acrn followpte() fixes".

Patch #1 fixes a bunch of issues I spotted in the acrn driver. It compiles, that's all I know. I'll appreciate some review and testing from acrn folks.

Patch #2+#3 improve followpte(), passing a VMA instead of the MM, adding more sanity checks, and improving the documentation. Gave it a quick test on x86-64 using VMPAT that ends up using follow_pte().

This patch (of 3):

We currently miss handling various cases, resulting in a dangerous followpte() (previously followpfn()) usage.

(1) We're not checking PTE write permissions.

Maybe we should simply always require ptewrite() like we do for pinuserpagesfast(FOLLWRITE)? Hard to tell, so let's check for ACRNMEMACCESSWRITE for now.

(2) We're not rejecting refcounted pages.

As we are not using MMU notifiers, messing with refcounted pages is dangerous and can result in use-after-free. Let's make sure to reject them.

(3) We are only looking at the first PTE of a bigger range.

We only lookup a single PTE, but memmap->len may span a larger area. Let's loop over all involved PTEs and make sure the PFN range is actually contiguous. Reject everything else: it couldn't have worked either way, and rather made use access PFNs we shouldn't be accessing.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/38xxx/CVE-2024-38610.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
b9c43aa0b18da5619aac347d54cb67fe30d1f884
Fixed
5c6705aa47b5b78d7ad36fea832bb69caa5bf49a
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
8a6e85f75a83d16a71077e41f2720c691f432002
Fixed
afeb0e69627695f759fc73c39c1640dbf8649b32
Fixed
e873f36ec890bece26ecce850e969917bceebbb6
Fixed
4c4ba3cf3a15ccfbaf787d0296fa42cdb00da9b4
Fixed
2c8d6e24930b8ef7d4a81787627c559ae0e0d3bb
Fixed
3d6586008f7b638f91f3332602592caa8b00b559
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
149d5fb7e0124c3763e92edd1fde19417f4d2d09
Last affected
02098ac42b7ff055ec72cd083ee1eb0a23481a19

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-38610.json"