CVE-2025-40245

Source
https://cve.org/CVERecord?id=CVE-2025-40245
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40245.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40245
Downstream
Published
2025-12-04T15:31:34.142Z
Modified
2026-05-15T04:13:47.886173044Z
Summary
nios2: ensure that memblock.current_limit is set when setting pfn limits
Details

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

nios2: ensure that memblock.current_limit is set when setting pfn limits

On nios2, with CONFIGFLATMEM set, the kernel relies on memblockgetcurrentlimit() to determine the limits of memmap, in particular for maxlowpfn. Unfortunately, memblock.currentlimit is only default initialized to MEMBLOCKALLOCANYWHERE at this point of the bootup, potentially leading to situations where maxlowpfn can erroneously exceed the value of max_pfn and, thus, the valid range of available DRAM.

This can in turn cause kernel-level paging failures, e.g.:

[ 76.900000] Unable to handle kernel paging request at virtual address 20303000 [ 76.900000] ea = c0080890, ra = c000462c, cause = 14 [ 76.900000] Kernel panic - not syncing: Oops [ 76.900000] ---[ end Kernel panic - not syncing: Oops ]---

This patch fixes this by pre-calculating memblock.currentlimit based on the upper limits of the available memory ranges via adjustlowmem_bounds, a simplified version of the equivalent implementation within the arm architecture.

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

Affected packages

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.12.0
Fixed
5.15.196
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.158
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.115
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.56
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.6

Database specific

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