Skip to main content

CVE-2025-37922: Vulnerability in Linux Linux

High
VulnerabilityCVE-2025-37922cvecve-2025-37922
Published: Tue May 20 2025 (05/20/2025, 15:21:51 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: book3s64/radix : Align section vmemmap start address to PAGE_SIZE A vmemmap altmap is a device-provided region used to provide backing storage for struct pages. For each namespace, the altmap should belong to that same namespace. If the namespaces are created unaligned, there is a chance that the section vmemmap start address could also be unaligned. If the section vmemmap start address is unaligned, the altmap page allocated from the current namespace might be used by the previous namespace also. During the free operation, since the altmap is shared between two namespaces, the previous namespace may detect that the page does not belong to its altmap and incorrectly assume that the page is a normal page. It then attempts to free the normal page, which leads to a kernel crash. Kernel attempted to read user page (18) - exploit attempt? (uid: 0) BUG: Kernel NULL pointer dereference on read at 0x00000018 Faulting instruction address: 0xc000000000530c7c Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries CPU: 32 PID: 2104 Comm: ndctl Kdump: loaded Tainted: G W NIP: c000000000530c7c LR: c000000000530e00 CTR: 0000000000007ffe REGS: c000000015e57040 TRAP: 0300 Tainted: G W MSR: 800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 84482404 CFAR: c000000000530dfc DAR: 0000000000000018 DSISR: 40000000 IRQMASK: 0 GPR00: c000000000530e00 c000000015e572e0 c000000002c5cb00 c00c000101008040 GPR04: 0000000000000000 0000000000000007 0000000000000001 000000000000001f GPR08: 0000000000000005 0000000000000000 0000000000000018 0000000000002000 GPR12: c0000000001d2fb0 c0000060de6b0080 0000000000000000 c0000060dbf90020 GPR16: c00c000101008000 0000000000000001 0000000000000000 c000000125b20f00 GPR20: 0000000000000001 0000000000000000 ffffffffffffffff c00c000101007fff GPR24: 0000000000000001 0000000000000000 0000000000000000 0000000000000000 GPR28: 0000000004040201 0000000000000001 0000000000000000 c00c000101008040 NIP [c000000000530c7c] get_pfnblock_flags_mask+0x7c/0xd0 LR [c000000000530e00] free_unref_page_prepare+0x130/0x4f0 Call Trace: free_unref_page+0x50/0x1e0 free_reserved_page+0x40/0x68 free_vmemmap_pages+0x98/0xe0 remove_pte_table+0x164/0x1e8 remove_pmd_table+0x204/0x2c8 remove_pud_table+0x1c4/0x288 remove_pagetable+0x1c8/0x310 vmemmap_free+0x24/0x50 section_deactivate+0x28c/0x2a0 __remove_pages+0x84/0x110 arch_remove_memory+0x38/0x60 memunmap_pages+0x18c/0x3d0 devm_action_release+0x30/0x50 release_nodes+0x68/0x140 devres_release_group+0x100/0x190 dax_pmem_compat_release+0x44/0x80 [dax_pmem_compat] device_for_each_child+0x8c/0x100 [dax_pmem_compat_remove+0x2c/0x50 [dax_pmem_compat] nvdimm_bus_remove+0x78/0x140 [libnvdimm] device_remove+0x70/0xd0 Another issue is that if there is no altmap, a PMD-sized vmemmap page will be allocated from RAM, regardless of the alignment of the section start address. If the section start address is not aligned to the PMD size, a VM_BUG_ON will be triggered when setting the PMD-sized page to page table. In this patch, we are aligning the section vmemmap start address to PAGE_SIZE. After alignment, the start address will not be part of the current namespace, and a normal page will be allocated for the vmemmap mapping of the current section. For the remaining sections, altmaps will be allocated. During the free operation, the normal page will be correctly freed. In the same way, a PMD_SIZE vmemmap page will be allocated only if the section start address is PMD_SIZE-aligned; otherwise, it will fall back to a PAGE-sized vmemmap allocation. Without this patch ================== NS1 start NS2 start _________________________________________________________ | NS1 | NS2 | --------------------------------------------------------- | Altmap| Altmap | .....|Altmap| Altmap | ........... | NS1 | NS1 ---truncated---

AI-Powered Analysis

AILast updated: 07/04/2025, 01:40:31 UTC

Technical Analysis

CVE-2025-37922 is a vulnerability in the Linux kernel related to the handling of the virtual memory map (vmemmap) for struct pages within namespaces, specifically in the book3s64/radix architecture. The issue arises from improper alignment of the vmemmap section start address to PAGE_SIZE, which can cause the altmap page allocated for one namespace to be incorrectly shared with a previous namespace. This misalignment leads to a scenario where, during the free operation, the previous namespace may mistakenly treat the shared altmap page as a normal page and attempt to free it. This results in a kernel crash due to double freeing or invalid memory operations. Additionally, if no altmap is present, a PMD-sized vmemmap page may be allocated without proper alignment, triggering a VM_BUG_ON error when setting the page table. The vulnerability manifests as a NULL pointer dereference and kernel panic, as evidenced by the kernel oops logs showing a crash in get_pfnblock_flags_mask and related memory management functions. The root cause is the lack of alignment of the vmemmap start address, which the patch addresses by enforcing PAGE_SIZE alignment. This ensures that the start address does not belong to the current namespace, allowing normal pages to be allocated and freed correctly, preventing cross-namespace altmap sharing and associated crashes. The vulnerability affects Linux kernel versions identified by the commit hash 368a0590d954a659b16ab945328ada0cc10f93a0 and is specific to systems using the radix MMU with large PAGE_SIZE (64K) configurations, typical in pSeries architectures. No known exploits are reported in the wild as of publication, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability poses a significant risk primarily to servers and infrastructure running affected Linux kernel versions on hardware architectures using radix MMU with large page sizes, such as IBM pSeries systems. The impact includes potential denial of service (DoS) due to kernel crashes, which can disrupt critical services and applications. Organizations relying on virtualization or containerization that use namespaces extensively may experience instability or crashes, leading to downtime and potential data loss. Although the vulnerability does not directly enable privilege escalation or arbitrary code execution, the kernel panic can be triggered by local users or processes with sufficient privileges, potentially allowing attackers to cause service interruptions. This is particularly concerning for data centers, cloud providers, and enterprises with high availability requirements. The lack of known exploits reduces immediate risk, but the complexity of the issue and kernel-level impact necessitate prompt attention. The vulnerability also complicates memory management and may affect system reliability and performance if unpatched.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the patch aligning the vmemmap start address to PAGE_SIZE, as this directly addresses the root cause. Specifically, kernel versions incorporating commit 368a0590d954a659b16ab945328ada0cc10f93a0 or later should be deployed. For environments where immediate patching is not feasible, organizations should restrict access to systems running affected kernels, especially limiting local user privileges to prevent exploitation attempts. Monitoring kernel logs for oops or NULL pointer dereference messages related to vmemmap or memory management can help detect attempted exploitation or instability. Additionally, organizations should review their use of namespaces and memory management configurations on affected architectures, possibly disabling or limiting features that rely heavily on altmap allocations until patched. Implementing robust backup and recovery procedures will mitigate the impact of potential crashes. Collaboration with hardware vendors and Linux distribution maintainers to obtain timely patches and guidance is also recommended.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-04-16T04:51:23.969Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682cd0f71484d88663aeaf8e

Added to database: 5/20/2025, 6:59:03 PM

Last enriched: 7/4/2025, 1:40:31 AM

Last updated: 8/5/2025, 7:05:50 AM

Views: 13

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats