Skip to main content

CVE-2025-21851: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2025-21851cvecve-2025-21851
Published: Wed Mar 12 2025 (03/12/2025, 09:42:06 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix softlockup in arena_map_free on 64k page kernel On an aarch64 kernel with CONFIG_PAGE_SIZE_64KB=y, arena_htab tests cause a segmentation fault and soft lockup. The same failure is not observed with 4k pages on aarch64. It turns out arena_map_free() is calling apply_to_existing_page_range() with the address returned by bpf_arena_get_kern_vm_start(). If this address is not page-aligned the code ends up calling apply_to_pte_range() with that unaligned address causing soft lockup. Fix it by round up GUARD_SZ to PAGE_SIZE << 1 so that the division by 2 in bpf_arena_get_kern_vm_start() returns a page-aligned value.

AI-Powered Analysis

AILast updated: 06/30/2025, 09:56:23 UTC

Technical Analysis

CVE-2025-21851 is a vulnerability identified in the Linux kernel specifically affecting systems running on the aarch64 architecture with the kernel configured to use 64KB pages (CONFIG_PAGE_SIZE_64KB=y). The issue arises in the BPF (Berkeley Packet Filter) subsystem, particularly within the memory management routines related to arena_map_free(). The vulnerability manifests as a soft lockup and segmentation fault triggered by arena_htab tests due to improper handling of page alignment. The root cause is that arena_map_free() calls apply_to_existing_page_range() with an address obtained from bpf_arena_get_kern_vm_start() that is not properly page-aligned. This leads to apply_to_pte_range() being invoked with an unaligned address, causing the kernel to hang (soft lockup) or crash (segmentation fault). The fix involves rounding up the GUARD_SZ constant to twice the PAGE_SIZE, ensuring that the division by 2 in bpf_arena_get_kern_vm_start() yields a page-aligned address, preventing the erroneous calls with unaligned addresses. This vulnerability is specific to the Linux kernel on aarch64 platforms using 64KB pages and does not affect systems using the standard 4KB page size on the same architecture. No known exploits are reported in the wild as of now, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability could lead to system instability or denial of service on affected Linux systems running on aarch64 hardware with 64KB page size configuration. The soft lockup and segmentation faults can disrupt critical services, especially in environments relying on Linux-based servers, embedded systems, or cloud infrastructure using ARM64 processors. This is particularly relevant for sectors such as telecommunications, cloud service providers, and enterprises adopting ARM-based servers for energy efficiency and performance. The impact is primarily on availability, as the vulnerability causes kernel hangs and crashes rather than direct data breaches or privilege escalations. However, repeated crashes or lockups could lead to operational downtime, affecting business continuity and service reliability. Since no known exploits exist yet, the immediate risk is moderate, but the vulnerability should be addressed promptly to prevent potential future exploitation as attackers may develop techniques to trigger these kernel faults maliciously.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions where this vulnerability is patched. Specifically, kernel maintainers have fixed the issue by adjusting the page alignment logic in the BPF subsystem. Systems running on aarch64 architecture with 64KB page size enabled must be identified through inventory and configuration management tools. For environments where immediate patching is not feasible, temporary mitigations include disabling BPF features if possible or reverting to 4KB page size configurations, though the latter may not be practical for all deployments. Monitoring kernel logs for signs of soft lockups or segmentation faults related to BPF operations can help detect attempts to trigger this vulnerability. Additionally, organizations should ensure robust backup and recovery procedures to minimize downtime impact. Collaboration with Linux distribution vendors to receive timely security updates and applying them promptly is essential. Finally, testing patches in staging environments before production deployment will help avoid regressions.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T08:45:45.779Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9832c4522896dcbe89ef

Added to database: 5/21/2025, 9:09:06 AM

Last enriched: 6/30/2025, 9:56:23 AM

Last updated: 7/27/2025, 1:16:00 AM

Views: 9

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