Skip to main content

CVE-2025-21671: Vulnerability in Linux Linux

High
VulnerabilityCVE-2025-21671cvecve-2025-21671
Published: Fri Jan 31 2025 (01/31/2025, 11:25:34 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: zram: fix potential UAF of zram table If zram_meta_alloc failed early, it frees allocated zram->table without setting it NULL. Which will potentially cause zram_meta_free to access the table if user reset an failed and uninitialized device.

AI-Powered Analysis

AILast updated: 07/03/2025, 05:41:10 UTC

Technical Analysis

CVE-2025-21671 is a high-severity use-after-free (UAF) vulnerability identified in the Linux kernel's zram subsystem. Zram is a kernel module that provides compressed RAM-based block devices, commonly used for swap or temporary storage to improve performance on systems with limited physical memory. The vulnerability arises from improper handling of memory allocation failures in the zram_meta_alloc function. Specifically, if zram_meta_alloc fails early during initialization, it frees the allocated zram->table memory without setting the pointer to NULL. Consequently, if a user resets a failed and uninitialized zram device, the zram_meta_free function may attempt to access this freed memory, leading to a use-after-free condition (CWE-416). This flaw can result in undefined behavior, including potential kernel crashes (denial of service) or exploitation to execute arbitrary code with kernel privileges. The CVSS v3.1 score of 7.8 reflects a high severity, with an attack vector requiring local access (AV:L), low attack complexity (AC:L), and requiring privileges (PR:L) but no user interaction (UI:N). The impact affects confidentiality, integrity, and availability, as exploitation could allow privilege escalation or system compromise. No known exploits are currently reported in the wild, but the vulnerability is critical enough to warrant prompt patching. The affected versions correspond to specific Linux kernel commits, indicating that this issue is present in recent kernel versions prior to the fix.

Potential Impact

For European organizations, this vulnerability poses a significant risk, especially for enterprises and service providers relying on Linux-based infrastructure, including servers, cloud environments, and embedded systems that utilize zram for memory optimization. Exploitation could lead to kernel-level compromise, allowing attackers with local access to escalate privileges, execute arbitrary code, or cause denial of service by crashing the kernel. This can disrupt critical services, lead to data breaches, and compromise system integrity. Given the widespread use of Linux in European data centers, telecommunications, and industrial control systems, the impact could extend to critical infrastructure and sensitive data environments. Organizations with multi-tenant cloud deployments or those providing managed services are particularly at risk if attackers gain local access through other means. The absence of known exploits in the wild provides a window for proactive mitigation, but the high severity score underscores the urgency of addressing this vulnerability.

Mitigation Recommendations

European organizations should implement the following specific mitigation steps: 1) Immediately identify and inventory Linux systems running kernel versions affected by this vulnerability, focusing on those utilizing zram modules. 2) Apply the official Linux kernel patches or upgrade to a fixed kernel version as soon as they become available from trusted sources or Linux distributions. 3) Restrict local access to systems by enforcing strict access controls, including limiting shell access, using multi-factor authentication, and monitoring for unauthorized local logins. 4) Employ kernel hardening techniques such as enabling Kernel Address Space Layout Randomization (KASLR) and Kernel Page Table Isolation (KPTI) to reduce exploitability. 5) Monitor system logs and kernel messages for unusual activity related to zram devices or memory errors that could indicate attempted exploitation. 6) For environments where immediate patching is not feasible, consider disabling the zram module temporarily if it is not critical to operations, to eliminate the attack surface. 7) Incorporate this vulnerability into vulnerability management and incident response plans, ensuring rapid detection and remediation workflows. 8) Engage with Linux distribution vendors and security communities for updates and advisories to stay informed about exploit developments.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T08:45:45.735Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9834c4522896dcbe97ac

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

Last enriched: 7/3/2025, 5:41:10 AM

Last updated: 8/17/2025, 6:53:51 PM

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