Vulnerability · Published Jan 21, 2025 · Assigned by Linux
CVE-2024-57945riscv: mm: Fix the out of bound issue of vmemmap address
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: riscv: mm: Fix the out of bound issue of vmemmap address In sparse vmemmap model, the virtual address of vmemmap is calculated as: ((struct page *)VMEMMAP_START - (phys_ram_base >> PAGE_SHIFT)). And the struct page's va can be calculated with an offset: (vmemmap + (pfn)). However, when initializing struct pages, kernel actually starts from the first page from the same section that phys_ram_base belongs to. If the first page's physical address is not (phys_ram_base >> PAGE_SHIFT), then we get an va below VMEMMAP_START when calculating va for it's struct page. For example, if phys_ram_base starts from 0x82000000 with pfn 0x82000, the first page in the same section is actually pfn 0x80000. During init_unavailable_range(), we will initialize struct page for pfn 0x80000 with virtual address ((struct page *)VMEMMAP_START - 0x2000), which is below VMEMMAP_START as well as PCI_IO_END. This commit fixes this bug by introducing a new variable 'vmemmap_start_pfn' which is aligned with memory section size and using it to calculate vmemmap address instead of phys_ram_base.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.140-1 | DSA-5925-1 |
| Debian:12 | linux | 6.1.140-1 | DEBIAN-CVE-2024-57945 |
| Debian:13 | linux | 6.12.10-1 | DEBIAN-CVE-2024-57945 |
| Debian:14 | linux | 6.12.10-1 | DEBIAN-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux | 5.15.0-202.212 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-60.63 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1119.126 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1119.126 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1029.31 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1029.31~22.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1125.134 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1125.134 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1029.34 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1029.34~22.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1124.133 | USN-8962-1 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1124.133 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1016.17 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1120.130 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1120.130 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1030.32 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1030.32~22.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1115.121 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1115.121 | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1025.29 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1102.110 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1102.110 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1012.14 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-21.21~24.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-60.63~22.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1113.117 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1113.117 | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1026.26 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1026.26~22.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1114.120 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1114.120 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1111.116 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1111.116 | USN-8961-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-197.207 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-197.207 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-60.63.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-60.63.1~22.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1114.115 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1114.115 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1028.31 | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1028.31~22.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1028.31.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1070.72 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1070.72 | USN-8963-1 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1059.59 | USN-8963-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1059.59 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1017.17 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1028.28 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1116.122 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1116.122 | USN-8961-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1026.27 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1026.27~22.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-60.63.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-62.65~22.04.1 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-57945 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-57945 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2024-57945 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 8af1c121b0102041809bc137ec600d1865eaeedd – before 04350304428063da6a55a8a4597d409dc69148b28310080799b40fd9f2a8b808c657269678c149af – before 92f08673d3f1893191323572f60e3c62f2e57c2fa278d5c60f21aa15d540abb2f2da6e6d795c3e6e – before a4a7ac3d266008018f05fae53060fcb331151a14a11dd49dcb9376776193e15641f84fcc1e5980c9 – before d2bd51954ac8377c2f1eb1813e694788998add66a11dd49dcb9376776193e15641f84fcc1e5980c9 – before f754f27e98f88428aaf6be6e00f5cbce97f62d4b5941a90c55d3bfba732b32208d58d997600b44ef2a1728c15ec4f45ed9248ae22f626541c179bfbe5.10.212 – before 5.10.258 |
| Linux | Linux | 6.8 |
References
- https://git.kernel.org/stable/c/04350304428063da6a55a8a4597d409dc69148b2
- https://git.kernel.org/stable/c/92f08673d3f1893191323572f60e3c62f2e57c2f
- https://git.kernel.org/stable/c/a4a7ac3d266008018f05fae53060fcb331151a14
- https://git.kernel.org/stable/c/d2bd51954ac8377c2f1eb1813e694788998add66
- https://git.kernel.org/stable/c/f754f27e98f88428aaf6be6e00f5cbce97f62d4b
- https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html