CVE-2024-36001·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: netfs: Fix the pre-flush when appending to a file in writethrough mode In netfs_perform_write(), when the file is marked NETFS_ICTX_WRITETHROUGH or O_*SYNC or RWF_*SYNC was specified, write-through caching is performed on a buffered file. When setting up for write-through, we flush any conflicting writes in the region and wait for the write to complete, failing if there's a write error to return. The issue arises if we're writing at or above the EOF position because we skip the flush and - more importantly - the wait. This becomes a problem if there's a partial folio at the end of the file that is being written out and we want to make a write to it too. Both the already-running write and the write we start both want to clear the writeback mark, but whoever is second causes a warning looking something like: ------------[ cut here ]------------ R=00000012: folio 11 is not under writeback WARNING: CPU: 34 PID: 654 at fs/netfs/write_collect.c:105 ... CPU: 34 PID: 654 Comm: kworker/u386:27 Tainted: G S ... ... Workqueue: events_unbound netfs_write_collection_worker ... RIP: 0010:netfs_writeback_lookup_folio Fix this by making the flush-and-wait unconditional. It will do nothing if there are no folios in the pagecache and will return quickly if there are no folios in the region specified. Further, move the WBC attachment above the flush call as the flush is going to attach a WBC and detach it again if it is not present - and since we need one anyway we might as well share it.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.8.9
- Published
- 2024-05-20
Affected versions
From: 6.8
Until: 6.8.9
Fixed in: 6.8.9
How to fix this CVE
Update your Linux kernel to version 6.8.9 or later to fix a critical write-through caching bug that can cause kernel warnings and potential data consistency issues when appending to files. This patch ensures proper synchronization of conflicting writes at or beyond the end-of-file position, preventing race conditions in the netfs subsystem.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check current kernel version with `uname -r` and compare against 6.8.0 through 6.8.8
- Step 2: Verify if the system uses write-through caching by checking file system mount options with `mount | grep -E '(sync|netfs)'`
- Step 3: Search system logs for the warning signature: `grep -r 'is not under writeback' /var/log/` or `dmesg | grep 'netfs_writeback_lookup_folio'`
- Step 4: Confirm patch application by verifying kernel version is 6.8.9 or later with `uname -r` after reboot
FAQ
What is CVE-2024-36001?
CVE-2024-36001 is a Linux kernel vulnerability in the netfs write-through caching mechanism that fails to properly synchronize conflicting writes when appending to files at or beyond the end-of-file position, resulting in kernel warnings and potential data coherency issues.
Is CVE-2024-36001 being actively exploited?
No, CVE-2024-36001 is not listed on the CISA KEV catalog and has no known public exploits. It is primarily a reliability issue rather than a security vulnerability.
What versions of Kernel are affected by CVE-2024-36001?
Linux kernel versions 6.8.0 through 6.8.8 are vulnerable. Kernel 6.8.9 and later versions contain the fix.
How do I check if my server is vulnerable to CVE-2024-36001?
Run `uname -r` to display your kernel version. If it reports a version between 6.8.0 and 6.8.8 inclusive, your system is vulnerable.
Does Defensia detect CVE-2024-36001?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2024-36001 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-36001. Free for 1 server.
Get started free