Junglewise Threat Intelligence

CVE-2025-40245: Linux Kernel paging failure in nios2 architecture

CVE-2025-40245 · Severity: high · CVSS 7.8 · Published 2025-12-04

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's support for the Nios II processor architecture could lead to system instability or crashes. The issue occurs during the system startup process when memory limits are incorrectly calculated, potentially allowing the system to attempt to access memory addresses that do not exist. This can result in a kernel panic, effectively shutting down the system and impacting service availability.

Technical details

In the Linux kernel's nios2 architecture implementation, when CONFIG_FLATMEM is enabled, the system relies on memblock_get_current_limit() to determine mem_map limits during boot. Because memblock.current_limit is default-initialized to MEMBLOCK_ALLOC_ANYWHERE, the max_low_pfn value can erroneously exceed the actual max_pfn (the physical DRAM range). This mismatch leads to kernel-level paging failures and 'Unable to handle kernel paging request' errors, resulting in a kernel panic. The fix introduces adjust_lowmem_bounds to pre-calculate the current_limit based on available memory ranges before PFN limits are set. Patches are available in various stable branches including 5.15.196, 6.1.158, 6.6.115, 6.12.56, and 6.17.6.

Affected products

  • Linux Linux Kernel 5.12 to 6.17.6

Timeline

  • 2025-08-21: patched: Initial fix authored
  • 2025-12-04: disclosed: CVE-2025-40245 published

References

Related threats