Skip to main content

CVE-2025-21853: Vulnerability in Linux Linux

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

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: avoid holding freeze_mutex during mmap operation We use map->freeze_mutex to prevent races between map_freeze() and memory mapping BPF map contents with writable permissions. The way we naively do this means we'll hold freeze_mutex for entire duration of all the mm and VMA manipulations, which is completely unnecessary. This can potentially also lead to deadlocks, as reported by syzbot in [0]. So, instead, hold freeze_mutex only during writeability checks, bump (proactively) "write active" count for the map, unlock the mutex and proceed with mmap logic. And only if something went wrong during mmap logic, then undo that "write active" counter increment. [0] https://lore.kernel.org/bpf/678dcbc9.050a0220.303755.0066.GAE@google.com/

AI-Powered Analysis

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

Technical Analysis

CVE-2025-21853 is a vulnerability identified in the Linux kernel's Berkeley Packet Filter (BPF) subsystem, specifically related to the handling of the freeze_mutex during memory mapping (mmap) operations on BPF maps. The freeze_mutex is used to prevent race conditions between the map_freeze() function and mmap operations that map BPF map contents with writable permissions. The vulnerability arises because the freeze_mutex was held for the entire duration of all memory management (mm) and virtual memory area (VMA) manipulations during mmap, which is unnecessary and can lead to deadlocks. This was reported by syzbot, an automated kernel bug-finding tool. The fix involves holding the freeze_mutex only during the writeability checks, proactively incrementing the "write active" count for the map, then releasing the mutex before proceeding with the mmap logic. If mmap logic fails, the increment is undone. This change reduces the risk of deadlocks and improves concurrency in BPF map memory operations. While no known exploits are reported in the wild, the vulnerability could potentially cause system hangs or deadlocks if exploited, impacting system stability and availability. The affected versions are specific Linux kernel commits identified by the hash fc9702273e2edb90400a34b3be76f7b08fa3344b. No CVSS score has been assigned yet, and no public patches are linked in the provided information.

Potential Impact

For European organizations, this vulnerability primarily threatens system availability and stability on Linux systems that utilize BPF maps with writable mmap operations. Since BPF is widely used for networking, security monitoring, and performance tracing in modern Linux environments, including cloud infrastructure, container orchestration platforms, and network appliances, a deadlock or system hang could disrupt critical services. This could affect data centers, cloud service providers, telecom operators, and enterprises relying on Linux-based infrastructure. Although no direct confidentiality or integrity compromise is indicated, the potential for denial of service through deadlocks could impact business continuity, especially in high-availability environments. Organizations using Linux kernels with the affected commits or versions should be aware of the risk of system instability, which could cascade into service outages or degraded performance. The absence of known exploits reduces immediate risk, but the vulnerability's nature suggests it could be triggered by local processes or privileged users attempting mmap operations on BPF maps, which may be relevant in multi-tenant or shared environments.

Mitigation Recommendations

European organizations should take the following specific actions: 1) Identify Linux systems running kernel versions containing the affected commits (fc9702273e2edb90400a34b3be76f7b08fa3344b) by checking kernel version hashes or release notes. 2) Apply the official Linux kernel patches that address this vulnerability as soon as they become available, or upgrade to a kernel version that includes the fix. 3) Until patches are applied, limit or monitor the use of writable mmap operations on BPF maps, especially from untrusted or less privileged users, to reduce the risk of triggering deadlocks. 4) Implement system monitoring to detect unusual system hangs, deadlocks, or performance degradation related to BPF operations. 5) Review and restrict capabilities or permissions related to BPF map manipulations in containerized or multi-tenant environments to minimize attack surface. 6) Engage with Linux distribution vendors for timely updates and advisories. 7) Test kernel updates in staging environments to ensure stability before production deployment.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9832c4522896dcbe89f7

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

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

Last updated: 7/31/2025, 3:40:33 PM

Views: 16

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