CVE-2024-57945 Details
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.
A vulnerability in the Linux kernel's RISC-V architecture has been addressed, concerning an out-of-bounds issue in the vmemmap address calculation. In the sparse vmemmap model, the virtual address for vmemmap is derived from the VMEMMAP_START and the physical RAM base. However, the kernel initializes struct pages starting from the first page in the same section as the physical RAM base. If this first page's physical address does not align with the expected value, the calculated virtual address can fall below VMEMMAP_START, leading to an out-of-bounds condition. This vulnerability could cause issues during the initialization of unavailable memory ranges by misaligning the virtual addresses of certain struct pages.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 5.10.212, < 5.11 >= 5.15.151, < 5.16 >= 6.1.81, < 6.1.140 >= 6.6.21, < 6.6.72 >= 6.7.9, < 6.8 >= 6.8.1, < 6.12.10 6.8 - 6.8 rc7 6.13 rc1 6.13 rc2 6.13 rc3 6.13 rc4 6.13 rc5 6.13 rc6 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 4, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 1, 2026 | CVE Modified | kernel.org |
| Nov 3, 2025 | CVE Modified | CVE |
| Sep 26, 2025 | Initial Analysis | [email protected] |
| May 22, 2025 | CVE Modified | kernel.org |
| Jan 21, 2025 | New CVE Received | kernel.org |