Skip to main content

CVE-2025-21874: Vulnerability in Linux Linux

High
VulnerabilityCVE-2025-21874cvecve-2025-21874
Published: Thu Mar 27 2025 (03/27/2025, 14:57:05 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: dm-integrity: Avoid divide by zero in table status in Inline mode In Inline mode, the journal is unused, and journal_sectors is zero. Calculating the journal watermark requires dividing by journal_sectors, which should be done only if the journal is configured. Otherwise, a simple table query (dmsetup table) can cause OOPS. This bug did not show on some systems, perhaps only due to compiler optimization. On my 32-bit testing machine, this reliably crashes with the following: : Oops: divide error: 0000 [#1] PREEMPT SMP : CPU: 0 UID: 0 PID: 2450 Comm: dmsetup Not tainted 6.14.0-rc2+ #959 : EIP: dm_integrity_status+0x2f8/0xab0 [dm_integrity] ...

AI-Powered Analysis

AILast updated: 06/30/2025, 10:11:45 UTC

Technical Analysis

CVE-2025-21874 is a vulnerability identified in the Linux kernel's device-mapper integrity (dm-integrity) module. The flaw arises specifically in the Inline mode of dm-integrity, where the journal feature is disabled and journal_sectors is set to zero. The vulnerability is due to improper handling of the journal_sectors variable during the calculation of the journal watermark. The code attempts to divide by journal_sectors without verifying if the journal is configured, leading to a divide-by-zero error. This results in a kernel OOPS (crash) when a simple table query command such as 'dmsetup table' is executed. The issue manifests reliably on certain systems, notably observed on a 32-bit testing machine running Linux kernel version 6.14.0-rc2+, causing a divide error and kernel panic. The vulnerability is rooted in a logic error that fails to conditionally check the presence of the journal before performing division, and it may be influenced by compiler optimizations that mask or expose the bug on different architectures. This vulnerability can cause denial of service (DoS) by crashing the kernel, impacting system stability and availability. There are no known exploits in the wild at the time of publication, and no CVSS score has been assigned yet. The vulnerability affects Linux kernel versions containing the specified commit hash fb0987682c629c1d2c476f35f6fde405a5e304a4, indicating a specific code revision rather than a broad version range. The flaw is technical and low-level, affecting systems that utilize dm-integrity in Inline mode, which is typically used for data integrity verification in storage devices. The vulnerability does not appear to allow privilege escalation or data corruption directly but can disrupt system operations through kernel crashes.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with the affected dm-integrity module in Inline mode. Many enterprises, cloud providers, and data centers in Europe rely heavily on Linux-based infrastructure for critical services, including storage solutions that may use dm-integrity for ensuring data integrity. A kernel crash caused by this vulnerability can lead to denial of service, resulting in downtime, loss of availability of critical applications, and potential disruption of business operations. In environments where high availability and data integrity are paramount, such as financial institutions, healthcare providers, and government agencies, this vulnerability could cause significant operational impact. Although no direct data breach or privilege escalation is indicated, repeated crashes could lead to system instability and increased maintenance overhead. Additionally, organizations using automated monitoring or orchestration tools that query device-mapper tables might inadvertently trigger the vulnerability, amplifying the risk of outages. The lack of known exploits reduces immediate threat but does not eliminate the risk, especially if attackers develop proof-of-concept exploits. The impact is thus mainly on availability and operational continuity rather than confidentiality or integrity of data.

Mitigation Recommendations

To mitigate CVE-2025-21874, European organizations should: 1) Apply the official Linux kernel patches as soon as they become available from trusted sources or Linux distribution vendors to fix the divide-by-zero error in dm-integrity. 2) Audit and identify systems using dm-integrity in Inline mode, especially those running affected kernel versions, to prioritize patching and monitoring. 3) Temporarily avoid running commands that query dm-integrity tables (e.g., 'dmsetup table') on vulnerable systems until patched. 4) Implement robust monitoring to detect kernel OOPS or crashes related to device-mapper operations to enable rapid incident response. 5) For critical systems, consider fallback or redundancy mechanisms to maintain availability during patching or if crashes occur. 6) Engage with Linux distribution security advisories and subscribe to relevant mailing lists to stay informed about updates and exploit developments. 7) Test patches in staging environments to ensure compatibility and stability before deployment in production. 8) Review compiler optimization settings if custom kernel builds are used, as these may influence the manifestation of the bug. These steps go beyond generic advice by focusing on the specific module, usage mode, and operational commands that trigger the vulnerability.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9832c4522896dcbe8aa9

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

Last enriched: 6/30/2025, 10:11:45 AM

Last updated: 8/8/2025, 8:52:40 AM

Views: 12

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