riscv: mm: Fix the out of bound issue of vmemmap address
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 5.10.212 to before 5.10.258; 6.1.81 to before 6.1.140; 6.6.21 to before 6.6.72; 5.15.151 to before 5.16; 6.7.9 to before 6.8 | 5.10.258, 6.1.140, 6.6.72, 5.16, 6.8 | Patch available | CNA |
| Linux | Linux | 6.8 and later | 5.10.258, 6.1.140, 6.6.72, 6.12.10, 6.13 | Patch available | CNA |
- Linux VendorLinux Affected 5.10.212 to before 5.10.258; 6.1.81 to before 6.1.140; 6.6.21 to before 6.6.72; 5.15.151 to before 5.16; 6.7.9 to before 6.8 Fixed in 5.10.258, 6.1.140, 6.6.72, 5.16, 6.8 Patch available CNA
- Linux VendorLinux Affected 6.8 and later Fixed in 5.10.258, 6.1.140, 6.6.72, 6.12.10, 6.13 Patch available CNA
CPE configurations NVD · 9
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.10.212 to before 5.11; 5.15.151 to before 5.16; 6.1.81 to before 6.1.140; 6.6.21 to before 6.6.72; 6.7.9 to before 6.8; 6.8.1 to before 6.12.10 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.8:-:*:*:*:*:*:* | 6.8 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.8:rc7:*:*:*:*:*:* | 6.8 rc7 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:* | 6.13 rc1 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:* | 6.13 rc2 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:* | 6.13 rc3 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:* | 6.13 rc4 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:* | 6.13 rc5 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:* | 6.13 rc6 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 5.10.212 to before 5.11; 5.15.151 to before 5.16; 6.1.81 to before 6.1.140; 6.6.21 to before 6.6.72; 6.7.9 to before 6.8; 6.8.1 to before 6.12.10 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.8:-:*:*:*:*:*:* Versions 6.8 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.8:rc7:*:*:*:*:*:* Versions 6.8 rc7 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:* Versions 6.13 rc1 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:* Versions 6.13 rc2 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:* Versions 6.13 rc3 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:* Versions 6.13 rc4 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:* Versions 6.13 rc5 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:* Versions 6.13 rc6 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 5.10.258, 6.1.140, 6.6.72, 5.16, 6.8
- Fix · CNA Linux (Linux) Fixed in 5.10.258, 6.1.140, 6.6.72, 6.12.10, 6.13
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
Not affected: 5 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2024-57945
- 2026-10-03 Alias added: GHSA-743f-m6p2-83h6
- 2026-11-07 Affected versions changed · Red Hat
References
Patch 4
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2024-57945 · CVE Program
- CVE-2024-57945 · NVD
- FIRST EPSS
- GHSA-743f-m6p2-83h6 · GitHub Advisory Database · CC BY 4.0
- CVE-2024-57945 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences