Skip to main content

CVE-2024-26956: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-26956cvecve-2024-26956
Published: Wed May 01 2024 (05/01/2024, 05:18:56 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix failure to detect DAT corruption in btree and direct mappings Patch series "nilfs2: fix kernel bug at submit_bh_wbc()". This resolves a kernel BUG reported by syzbot. Since there are two flaws involved, I've made each one a separate patch. The first patch alone resolves the syzbot-reported bug, but I think both fixes should be sent to stable, so I've tagged them as such. This patch (of 2): Syzbot has reported a kernel bug in submit_bh_wbc() when writing file data to a nilfs2 file system whose metadata is corrupted. There are two flaws involved in this issue. The first flaw is that when nilfs_get_block() locates a data block using btree or direct mapping, if the disk address translation routine nilfs_dat_translate() fails with internal code -ENOENT due to DAT metadata corruption, it can be passed back to nilfs_get_block(). This causes nilfs_get_block() to misidentify an existing block as non-existent, causing both data block lookup and insertion to fail inconsistently. The second flaw is that nilfs_get_block() returns a successful status in this inconsistent state. This causes the caller __block_write_begin_int() or others to request a read even though the buffer is not mapped, resulting in a BUG_ON check for the BH_Mapped flag in submit_bh_wbc() failing. This fixes the first issue by changing the return value to code -EINVAL when a conversion using DAT fails with code -ENOENT, avoiding the conflicting condition that leads to the kernel bug described above. Here, code -EINVAL indicates that metadata corruption was detected during the block lookup, which will be properly handled as a file system error and converted to -EIO when passing through the nilfs2 bmap layer.

AI-Powered Analysis

AILast updated: 06/29/2025, 13:39:53 UTC

Technical Analysis

CVE-2024-26956 is a medium-severity vulnerability affecting the Linux kernel's implementation of the NILFS2 (New Implementation of a Log-structured File System) file system. The vulnerability arises from two related flaws in the handling of corrupted metadata within the NILFS2 file system, specifically in the functions nilfs_get_block() and submit_bh_wbc(). The first flaw occurs when nilfs_get_block() attempts to locate a data block via btree or direct mapping, and the disk address translation routine nilfs_dat_translate() fails with an internal error code (-ENOENT) due to corrupted DAT metadata. This failure is incorrectly propagated back to nilfs_get_block(), causing it to misidentify an existing block as non-existent. Consequently, data block lookup and insertion operations fail inconsistently. The second flaw is that nilfs_get_block() returns a success status despite this inconsistent state, leading the caller function __block_write_begin_int() or others to request a read operation on an unmapped buffer. This triggers a kernel BUG in submit_bh_wbc() due to a failed BH_Mapped flag check, resulting in a kernel panic or crash. The patch fixes these issues by changing the return value from -ENOENT to -EINVAL when DAT metadata corruption is detected, signaling a file system error that is properly handled and converted to an I/O error (-EIO) downstream. This prevents the kernel from entering the inconsistent state that causes the crash. The vulnerability was reported by syzbot, an automated kernel bug detection tool, and affects Linux kernel versions containing the specified commit hashes. Exploitation requires local privileges with at least low-level permissions (PR:L) and does not require user interaction. The vulnerability impacts availability by causing kernel crashes but does not affect confidentiality or integrity. There are no known exploits in the wild at this time.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with NILFS2 file systems, which are less common but may be used in specialized environments requiring log-structured file systems. The main impact is on system availability due to potential kernel panics triggered by corrupted file system metadata, which could lead to denial of service conditions. This can disrupt critical services, especially in environments where uptime is essential such as financial institutions, telecommunications, and public sector infrastructure. Since exploitation requires local privileges, the threat is higher in multi-user systems or where attackers can gain limited access. The absence of confidentiality or integrity impact reduces the risk of data breaches, but availability disruptions can still have significant operational and reputational consequences. Organizations relying on Linux servers with NILFS2 should prioritize patching to avoid unexpected crashes and service interruptions.

Mitigation Recommendations

1. Apply the official Linux kernel patches that address CVE-2024-26956 as soon as they become available for your distribution. Monitor vendor advisories for updated kernel packages. 2. Audit systems to identify any use of the NILFS2 file system and assess the necessity of its use; consider migrating critical data to more widely supported and tested file systems if feasible. 3. Implement strict access controls and monitoring to limit local user privileges and detect suspicious activities that could lead to exploitation attempts. 4. Regularly check file system integrity using tools compatible with NILFS2 to detect early signs of metadata corruption and prevent triggering the vulnerability. 5. Employ kernel crash dump and monitoring solutions to quickly identify and respond to kernel panics related to this issue. 6. In environments where NILFS2 is essential, consider deploying redundancy and failover mechanisms to mitigate availability impacts from potential crashes.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-19T14:20:24.200Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9829c4522896dcbe2f1e

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

Last enriched: 6/29/2025, 1:39:53 PM

Last updated: 8/18/2025, 4:46:07 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