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-03-20T12:43:14.378340Z
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
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40245.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae
Fixed
25f09699edd360b534ccae16bc276c3b52c471f3
Fixed
5c3e38a367822f036227dd52bac82dc4a05157e2
Fixed
b1ec9faef7e36269ca3ec890972a78effbaeb975
Fixed
90f5f715550e07cd6a51f80fc3f062d832c8c997
Fixed
8912814f14e298b83df072fecc1f7ed1b63b1b2c
Fixed
a20b83cf45be2057f3d073506779e52c7fa17f94

Database specific

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

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"