CVE-2026-43118·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix zero size inode with non-zero size after log replay When logging that an inode exists, as part of logging a new name or logging new dir entries for a directory, we always set the generation of the logged inode item to 0. This is to signal during log replay (in overwrite_item()), that we should not set the i_size since we only logged that an inode exists, so the i_size of the inode in the subvolume tree must be preserved (as when we log new names or that an inode exists, we don't log extents). This works fine except when we have already logged an inode in full mode or it's the first time we are logging an inode created in a past transaction, that inode has a new i_size of 0 and then we log a new name for the inode (due to a new hardlink or a rename), in which case we log an i_size of 0 for the inode and a generation of 0, which causes the log replay code to not update the inode's i_size to 0 (in overwrite_item()). An example scenario: mkdir /mnt/dir xfs_io -f -c "pwrite 0 64K" /mnt/dir/foo sync xfs_io -c "truncate 0" -c "fsync" /mnt/dir/foo ln /mnt/dir/foo /mnt/dir/bar xfs_io -c "fsync" /mnt/dir <power fail> After log replay the file remains with a size of 64K. This is because when we first log the inode, when we fsync file foo, we log its current i_size of 0, and then when we create a hard link we log again the inode in exists mode (LOG_INODE_EXISTS) but we set a generation of 0 for the inode item we add to the log tree, so during log replay overwrite_item() sees that the generation is 0 and i_size is 0 so we skip updating the inode's i_size from 64K to 0. Fix this by making sure at fill_inode_item() we always log the real generation of the inode if it was logged in the current transaction with the i_size we logged before. Also if an inode created in a previous transaction is logged in exists mode only, make sure we log the i_size stored in the inode item located from the commit root, so that if we log multiple times that the inode exists we get the correct i_size. A test case for fstests will follow soon.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.19.14
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.16% — higher than 5% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 6.19
Until: 6.19.14
Fixed in: 6.19.14
How to fix this CVE
Update your Linux kernel to version 6.19.14 or later to fix a critical file size preservation bug during log replay after unclean shutdowns. This vulnerability causes truncated files to revert to their pre-truncation size after a power failure or crash, leading to silent data corruption. Apply the kernel update immediately and reboot your system to ensure the fix is active.
sudo dnf update kernel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check your kernel version: uname -r
- Verify if you are running kernel 6.19 through 6.19.13: uname -r | grep -E '^6\.19\.(0|1)?[0-3]($|[^0-9])'
- Review system logs for unexpected file size changes after unclean shutdowns: grep -i 'btrfs\|replay\|truncate' /var/log/syslog /var/log/messages 2>/dev/null | head -20
- Confirm the fix is applied by verifying kernel version is 6.19.14 or later: uname -r | grep -E '^6\.(19\.14|[2-9][0-9]|[0-9]{3})'
- Test Btrfs filesystem consistency after patching: sudo btrfs filesystem show && sudo btrfs filesystem usage /
FAQ
What is CVE-2026-43118?
This is a Linux kernel Btrfs filesystem bug where file truncation operations are not properly recorded during filesystem logging. After an unexpected shutdown or crash, truncated files incorrectly revert to their original size, causing silent data corruption rather than preserving the truncated state.
Is CVE-2026-43118 being actively exploited?
No, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and has no known public exploits. However, it impacts data integrity during crash recovery scenarios.
What versions of Kernel are affected by CVE-2026-43118?
Linux kernel versions 6.19 through 6.19.13 are affected. The vulnerability is fixed in kernel version 6.19.14 and later.
How do I check if my server is vulnerable to CVE-2026-43118?
Run 'uname -r' to display your kernel version. If the output shows 6.19.0 through 6.19.13, your system is vulnerable. You should upgrade to 6.19.14 or a newer stable kernel version.
Does Defensia detect CVE-2026-43118?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Linux kernel is installed on a monitored server, CVE-2026-43118 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/03e966b63df5b06790310c1faaf3e0cb43adea8b
- https://git.kernel.org/stable/c/126999610eddeb1de3b47680585f4bc9531dc7f4
- https://git.kernel.org/stable/c/5254d4181add9dfaa5e3519edd71cc8f752b2f85
- https://git.kernel.org/stable/c/91990732ec4ce5c09361d498c6d621f5a76ee1f2
- https://git.kernel.org/stable/c/c939bfa67d221f75351a5bf2fc912e8125547b7e
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-43118. Free for 1 server.
Get started free