CVE-2024-26956·Kernel vulnerability
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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.8.3
- Published
- 2024-05-01
Affected versions
From: 6.8
Until: 6.8.3
Fixed in: 6.8.3
How to fix this CVE
Update your Linux kernel to version 6.8.3 or later to fix a critical metadata corruption handling bug in the nilfs2 file system. This vulnerability affects kernel versions 6.8 through 6.8.2 and can trigger kernel panics when writing to corrupted nilfs2 partitions. Systems using nilfs2 should prioritize this update to prevent data integrity issues and system crashes.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r (should be 6.8.3 or later if patched)
- Verify nilfs2 module is loaded: lsmod | grep nilfs2 (indicates if nilfs2 is in use on the system)
- List nilfs2 mounted filesystems: mount | grep nilfs2 (identifies systems actively using vulnerable code)
- Confirm kernel vulnerability status: grep 'CONFIG_NILFS2' /boot/config-$(uname -r) (checks if nilfs2 support is compiled in)
FAQ
What is CVE-2024-26956?
This vulnerability in nilfs2 causes the kernel to mishandle corrupted disk address translation (DAT) metadata, leading to kernel panics when the filesystem attempts to write data. The bug prevents proper error detection when metadata corruption occurs, causing submit_bh_wbc() to fail with a BUG_ON assertion.
Is CVE-2024-26956 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are available. However, it can be triggered by corrupted nilfs2 filesystems, whether from hardware failure or malicious corruption.
What versions of Kernel are affected by CVE-2024-26956?
Linux kernel versions 6.8 through 6.8.2 are affected. The fix was introduced in version 6.8.3.
How do I check if my server is vulnerable to CVE-2024-26956?
Run 'uname -r' to check your kernel version. If it shows 6.8.0, 6.8.1, or 6.8.2, your system is vulnerable. Additionally, check if nilfs2 is in use with 'mount | grep nilfs2'—vulnerable only if nilfs2 partitions are present.
Does Defensia detect CVE-2024-26956?
Yes — Defensia's CVE advisory scanner compares installed kernel versions against the NVD database. If a vulnerable kernel version is detected on a monitored server, CVE-2024-26956 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/2e2619ff5d0def4bb6c2037a32a6eaa28dd95c84
- https://git.kernel.org/stable/c/46b832e09d43b394ac0f6d9485d2b1a06593f0b7
- https://git.kernel.org/stable/c/82827ca21e7c8a91384c5baa656f78a5adfa4ab4
- https://git.kernel.org/stable/c/9cbe1ad5f4354f4df1445e5f4883983328cd6d8e
- https://git.kernel.org/stable/c/a8e4d098de1c0f4c5c1f2ed4633a860f0da6d713
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-26956. Free for 1 server.
Get started free