In the Linux kernel, the following vulnerability has been resolved: nios2: ensure that memblock.current_limit is set when setting pfn limits On… (CVE-2025-40245)
A vulnerability in the Linux kernel on the nios2 architecture with CONFIG_FLATMEM set could cause kernel-level paging failures and panics due to incorrect memory limit calculations. The issue arises because memblock.current_limit is not properly initialized during boot, potentially allowing max_low_pfn to exceed valid memory ranges. This has been resolved by ensuring memblock.current_limit is correctly set based on available memory limits.
AI Analysis
Technical Summary
The Linux kernel vulnerability (CVE-2025-40245) affects the nios2 architecture when CONFIG_FLATMEM is enabled. The kernel relies on memblock_get_current_limit() to set memory map limits, but memblock.current_limit was only default initialized to MEMBLOCK_ALLOC_ANYWHERE early in boot. This could cause max_low_pfn to exceed max_pfn, leading to invalid memory range usage and kernel paging failures, resulting in kernel panics. The patch fixes this by pre-calculating memblock.current_limit using adjust_lowmem_bounds, aligning with similar fixes in other architectures.
Potential Impact
This vulnerability can cause kernel paging failures and panics on affected systems, leading to denial of service. It impacts system stability by allowing the kernel to access invalid memory ranges due to incorrect memory limit calculations.
Mitigation Recommendations
A fix has been implemented in the Linux kernel to correctly initialize memblock.current_limit during boot on nios2 with CONFIG_FLATMEM. Users should apply the official kernel patch or update to a fixed kernel version once available. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
In the Linux kernel, the following vulnerability has been resolved: nios2: ensure that memblock.current_limit is set when setting pfn limits On… (CVE-2025-40245)
Description
A vulnerability in the Linux kernel on the nios2 architecture with CONFIG_FLATMEM set could cause kernel-level paging failures and panics due to incorrect memory limit calculations. The issue arises because memblock.current_limit is not properly initialized during boot, potentially allowing max_low_pfn to exceed valid memory ranges. This has been resolved by ensuring memblock.current_limit is correctly set based on available memory limits.
CVSS v3.1
Score 7.8high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel vulnerability (CVE-2025-40245) affects the nios2 architecture when CONFIG_FLATMEM is enabled. The kernel relies on memblock_get_current_limit() to set memory map limits, but memblock.current_limit was only default initialized to MEMBLOCK_ALLOC_ANYWHERE early in boot. This could cause max_low_pfn to exceed max_pfn, leading to invalid memory range usage and kernel paging failures, resulting in kernel panics. The patch fixes this by pre-calculating memblock.current_limit using adjust_lowmem_bounds, aligning with similar fixes in other architectures.
Potential Impact
This vulnerability can cause kernel paging failures and panics on affected systems, leading to denial of service. It impacts system stability by allowing the kernel to access invalid memory ranges due to incorrect memory limit calculations.
Mitigation Recommendations
A fix has been implemented in the Linux kernel to correctly initialize memblock.current_limit during boot on nios2 with CONFIG_FLATMEM. Users should apply the official kernel patch or update to a fixed kernel version once available. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-56rc-pfj3-9mx3
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-40245"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a6b72d59c2644c7f8479c68
Added to database: 07/30/2026, 15:50:45 UTC
Last enriched: 07/30/2026, 17:23:19 UTC
Last updated: 09/10/2026, 19:38:44 UTC
Views: 17
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.