Vulnerability · Published Jun 19, 2024 · Assigned by Linux
CVE-2024-38610drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map()
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 12% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: drivers/virt/acrn: fix PFNMAP PTE checks in acrn_vm_ram_map() Patch series "mm: follow_pte() improvements and acrn follow_pte() 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 follow_pte(), passing a VMA instead of the MM, adding more sanity checks, and improving the documentation. Gave it a quick test on x86-64 using VM_PAT that ends up using follow_pte(). This patch (of 3): We currently miss handling various cases, resulting in a dangerous follow_pte() (previously follow_pfn()) usage. (1) We're not checking PTE write permissions. Maybe we should simply always require pte_write() like we do for pin_user_pages_fast(FOLL_WRITE)? Hard to tell, so let's check for ACRN_MEM_ACCESS_WRITE 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.94-1 | DEBIAN-CVE-2024-38610 |
| Debian:13 | linux | 6.8.12-1 | DEBIAN-CVE-2024-38610 |
| Debian:14 | linux | 6.8.12-1 | DEBIAN-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux | 5.15.0-121.131 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux | 6.8.0-40.40 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1069.75 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1013.14 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1072.81 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1012.14 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1012.14~22.04.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1072.81.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1068.76 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1012.13 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1012.13~22.04.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1066.72 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1008.11 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1052.59 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-40.40~22.04.3 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1062.65 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1010.10 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1064.70 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1066.71 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-121.131 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-40.40.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-40.40.1~22.04.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1064.65 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1011.11 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1011.11~22.04.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1011.11.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1028.28 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1016.16 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1010.10 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1067.73 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1010.10 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1062.65 | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1009.10 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-40.40.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-40.40.1~22.04.1 | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-38610 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1035.39 | UBUNTU-CVE-2024-38610 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | b9c43aa0b18da5619aac347d54cb67fe30d1f884 – before 5c6705aa47b5b78d7ad36fea832bb69caa5bf49a8a6e85f75a83d16a71077e41f2720c691f432002 – before afeb0e69627695f759fc73c39c1640dbf8649b328a6e85f75a83d16a71077e41f2720c691f432002 – before e873f36ec890bece26ecce850e969917bceebbb68a6e85f75a83d16a71077e41f2720c691f432002 – before 4c4ba3cf3a15ccfbaf787d0296fa42cdb00da9b48a6e85f75a83d16a71077e41f2720c691f432002 – before 2c8d6e24930b8ef7d4a81787627c559ae0e0d3bb8a6e85f75a83d16a71077e41f2720c691f432002 – before 3d6586008f7b638f91f3332602592caa8b00b559149d5fb7e0124c3763e92edd1fde19417f4d2d0902098ac42b7ff055ec72cd083ee1eb0a23481a19 |
| Linux | Linux | 5.18 |
References
- 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/4c4ba3cf3a15ccfbaf787d0296fa42cdb00da9b4
- https://git.kernel.org/stable/c/2c8d6e24930b8ef7d4a81787627c559ae0e0d3bb
- https://git.kernel.org/stable/c/3d6586008f7b638f91f3332602592caa8b00b559