CVE-2025-40245
nios2: ensure that memblock.current_limit is set when setting pfn limits
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 25f09699edd360b534ccae16bc276c3b52c471f3; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 5c3e38a367822f036227dd52bac82dc4a05157e2; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < b1ec9faef7e36269ca3ec890972a78effbaeb975; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 90f5f715550e07cd6a51f80fc3f062d832c8c997; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 8912814f14e298b83df072fecc1f7ed1b63b1b2c; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < a20b83cf45be2057f3d073506779e52c7fa17f94
- Anyone running Linux 5.12
Vulnerability facts
- Affected
- Linux >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 25f09699edd360b534ccae16bc276c3b52c471f3; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 5c3e38a367822f036227dd52bac82dc4a05157e2; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < b1ec9faef7e36269ca3ec890972a78effbaeb975; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 90f5f715550e07cd6a51f80fc3f062d832c8c997; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 8912814f14e298b83df072fecc1f7ed1b63b1b2c; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < a20b83cf45be2057f3d073506779e52c7fa17f94; Linux 5.12
- Fixed in
- Linux 25f09699edd360b534ccae16bc276c3b52c471f3, Linux 5c3e38a367822f036227dd52bac82dc4a05157e2, Linux 90f5f715550e07cd6a51f80fc3f062d832c8c997, Linux 8912814f14e298b83df072fecc1f7ed1b63b1b2c
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.23% chance of exploitation in 30 days (percentile 9, 2026-11-26)
- Modified
Description
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 CONFIG_FLATMEM set, the kernel relies on memblock_get_current_limit() to determine the limits of mem_map, in particular for max_low_pfn. Unfortunately, memblock.current_limit is only default initialized to MEMBLOCK_ALLOC_ANYWHERE at this point of the bootup, potentially leading to situations where max_low_pfn 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.current_limit based on the upper limits of the available memory ranges via adjust_lowmem_bounds, a simplified version of the equivalent implementation within the arm architecture.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 25f09699edd360b534ccae16bc276c3b52c471f3; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 5c3e38a367822f036227dd52bac82dc4a05157e2; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < b1ec9faef7e36269ca3ec890972a78effbaeb975; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 90f5f715550e07cd6a51f80fc3f062d832c8c997; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 8912814f14e298b83df072fecc1f7ed1b63b1b2c; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < a20b83cf45be2057f3d073506779e52c7fa17f94 | — | cvelist |
| Linux | 5.12 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-40245. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-40245.md Affected: Linux >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 25f09699edd360b534ccae16bc276c3b52c471f3; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 5c3e38a367822f036227dd52bac82dc4a05157e2; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < b1ec9faef7e36269ca3ec890972a78effbaeb975; >= 7f7bc20bc41a4fbcd2db75b… Fixed in: Linux 25f09699edd360b534ccae16bc276c3b52c471f3, Linux 5c3e38a367822f036227dd52bac82dc4a05157e2, Linux 90f5f715550e07cd6a51f80fc3f062d832c8c997, Linux 8912814f14e298b83df072fecc1f7ed1b63b1b2c Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Other
- https://git.kernel.org/stable/c/25f09699edd360b534ccae16bc276c3b52c471f3
- https://git.kernel.org/stable/c/5c3e38a367822f036227dd52bac82dc4a05157e2
- https://git.kernel.org/stable/c/b1ec9faef7e36269ca3ec890972a78effbaeb975
- https://git.kernel.org/stable/c/90f5f715550e07cd6a51f80fc3f062d832c8c997
- https://git.kernel.org/stable/c/8912814f14e298b83df072fecc1f7ed1b63b1b2c
- https://git.kernel.org/stable/c/a20b83cf45be2057f3d073506779e52c7fa17f94
FAQ
Is CVE-2025-40245 being exploited?
There is no confirmed exploitation: CVE-2025-40245 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-40245?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-40245?
Linux >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 25f09699edd360b534ccae16bc276c3b52c471f3; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 5c3e38a367822f036227dd52bac82dc4a05157e2; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < b1ec9faef7e36269ca3ec890972a78effbaeb975; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 90f5f715550e07cd6a51f80fc3f062d832c8c997; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < 8912814f14e298b83df072fecc1f7ed1b63b1b2c; >= 7f7bc20bc41a4fbcd2db75b375ac95e5faf958ae, < a20b83cf45be2057f3d073506779e52c7fa17f94; Linux 5.12.
Is there a fix for CVE-2025-40245?
Yes. Fixed in Linux 25f09699edd360b534ccae16bc276c3b52c471f3, Linux 5c3e38a367822f036227dd52bac82dc4a05157e2, Linux 90f5f715550e07cd6a51f80fc3f062d832c8c997, Linux 8912814f14e298b83df072fecc1f7ed1b63b1b2c. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2025-40245?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.