CVE-2024-57941
NoneCVSS
—
EPSS
0.2%
Published
Jan 21, 2025
CISA due date
—
Cloudanix analysis
A bug in the Linux kernel's handling of temporary file caching could cause systems using certain network storage setups to freeze until files are closed.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- OS kernel
- Class
- Other
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Improper handling of cache-disabled state in netfs leads to abandoned write requests that leave folios marked with PG_private_2, preventing proper cleanup and state-machine progress.
Why it matters to the business
Systems using cached network filesystems such as ceph may experience hangs or stalled I/O when direct writes temporarily disable caching, reducing availability for storage-dependent workloads.
How an attack unfolds
An attacker or workload triggers a DIO write to disable caching on a file, then issues subsequent writes that netfslib attempts to copy to cache; the code bails early, discards the request without cancellation, and leaves folios stuck, which can be reached via normal filesystem operations or by running xfstests against ceph with fsc enabled.
How to fix it
Update to a kernel containing commit ba37bdfe59fb43e80dd79290340a21864ba4b61e or later; Red Hat users should install the listed fixed setroubleshoot packages (3.2.24-4.el7_2 or 3.0.59-2.el7_2) where applicable and reboot.
How to confirm the fix worked
Confirm the running kernel contains ba37bdfe59fb or newer; re-run generic/013 xfstest against ceph with -o fsc and verify the test completes without hanging.
Typical attack path
- Open a file on a cached ceph filesystem
- Perform a direct I/O write to disable caching temporarily
- Issue follow-on writes that netfslib routes toward the cache
- netfs_advance_write bails without creating subrequests or canceling
- Folios remain marked and the request is dropped, stalling the state machine
How to detect it
Search kernel logs for netfs-related stalls, hung tasks mentioning folio_queue or PG_private_2, and ceph client hangs during xfstest or DIO workloads; correlate with cache-disable events.
What your security team should do
- Prioritize kernel updates on any hosts running ceph with fsc caching enabled
- Monitor for stalled I/O or hung tasks related to netfs after applying the fix
- Review and test caching configurations before re-enabling on production systems
The record
In the Linux kernel, the following vulnerability has been resolved: netfs: Fix the (non-)cancellation of copy when cache is temporarily disabled When the caching for a cookie is temporarily disabled (e.g. due to a DIO write on that file), future copying to the cache for that file is disabled until all fds open on that file are closed. However, if netfslib is using the deprecated PG_private_2 method (such as is currently used by ceph), and decides it wants to copy to the cache, netfs_advance_write() will just bail at the first check seeing that the cache stream is unavailable, and indicate that it dealt with all the content. This means that we have no subrequests to provide notifications to drive the state machine or even to pin the request and the request just gets discarded, leaving the folios with PG_private_2 set. Fix this by jumping directly to cancel the request if the cache is not available. That way, we don't remove mark3 from the folio_queue list and netfs_pgpriv2_cancel() will clean up the folios. This was found by running the generic/013 xfstest against ceph with an active cache and the "-o fsc" option passed to ceph. That would usually hang
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:10 | kernel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-debug-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-64k-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-abi-stablelists | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-cross-headers | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-debug-uki-virt | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-doc | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-headers | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-modules-extra-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-64k-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-debug-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-rt-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-tools | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-tools-libs | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-tools-libs-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-uki-virt | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-uki-virt-addons | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-devel | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-devel-matched | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-modules | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-modules-core | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | kernel-zfcpdump-modules-extra | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | libperf | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | perf | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | python3-perf | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | rtla | 0 | 6.12.0-124.8.1.el10_1 |
| AlmaLinux:10 | rv | 0 | 6.12.0-124.8.1.el10_1 |
| Debian:13 | linux | 0 | No fix |
| Debian:13 | linux | 0 | 6.12.10-1 |
| Linux | Kernel | 6.12.0 | 6.12.10 |
| Ubuntu:16.04:LTS | linux-hwe-edge | 0 | No fix |
| Ubuntu:18.04:LTS | linux-aws-5.0 | 0 | No fix |
| Ubuntu:18.04:LTS | linux-aws-5.3 | 0 | No fix |
| Ubuntu:18.04:LTS | linux-azure | 0 | No fix |
| Ubuntu:18.04:LTS | linux-azure-5.3 | 0 | No fix |
| Ubuntu:18.04:LTS | linux-azure-edge | 0 | No fix |
| Ubuntu:18.04:LTS | linux-gcp | 0 | No fix |
| Ubuntu:18.04:LTS | linux-gcp-5.3 | 0 | No fix |
| Ubuntu:18.04:LTS | linux-gke-4.15 | 0 | No fix |
| Ubuntu:18.04:LTS | linux-gke-5.4 | 0 | No fix |
| Ubuntu:18.04:LTS | linux-gkeop-5.4 | 0 | No fix |
| Ubuntu:18.04:LTS | linux-hwe | 0 | No fix |
| Ubuntu:18.04:LTS | linux-hwe-edge | 0 | No fix |
| Ubuntu:18.04:LTS | linux-oem | 0 | No fix |
| Ubuntu:18.04:LTS | linux-oracle-5.0 | 0 | No fix |
| Ubuntu:18.04:LTS | linux-oracle-5.3 | 0 | No fix |
| Ubuntu:20.04:LTS | linux | 0 | No fix |
| Ubuntu:20.04:LTS | linux-aws | 0 | No fix |
| Ubuntu:20.04:LTS | linux-aws-5.11 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-aws-5.13 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-aws-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-aws-5.8 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-azure | 0 | No fix |
| Ubuntu:20.04:LTS | linux-azure-5.11 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-azure-5.13 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-azure-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-azure-5.8 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-azure-fde | 0 | No fix |
| Ubuntu:20.04:LTS | linux-azure-fde-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-bluefield | 0 | No fix |
| Ubuntu:20.04:LTS | linux-gcp | 0 | No fix |
| Ubuntu:20.04:LTS | linux-gcp-5.11 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-gcp-5.13 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-gcp-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-gcp-5.8 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-gke | 0 | No fix |
| Ubuntu:20.04:LTS | linux-gke-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-gkeop | 0 | No fix |
| Ubuntu:20.04:LTS | linux-gkeop-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-hwe-5.11 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-hwe-5.13 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-hwe-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-hwe-5.8 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-ibm | 0 | No fix |
| Ubuntu:20.04:LTS | linux-ibm-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-intel-5.13 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-intel-iotg-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-iot | 0 | No fix |
| Ubuntu:20.04:LTS | linux-kvm | 0 | No fix |
| Ubuntu:20.04:LTS | linux-lowlatency-hwe-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-oem-5.10 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-oem-5.13 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-oem-5.14 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-oem-5.6 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-oracle | 0 | No fix |
| Ubuntu:20.04:LTS | linux-oracle-5.11 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-oracle-5.13 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-oracle-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-oracle-5.8 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-raspi | 0 | No fix |
| Ubuntu:20.04:LTS | linux-raspi2 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-riscv | 0 | No fix |
| Ubuntu:20.04:LTS | linux-riscv-5.11 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-riscv-5.15 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-riscv-5.8 | 0 | No fix |
| Ubuntu:20.04:LTS | linux-xilinx-zynqmp | 0 | No fix |
| Ubuntu:22.04:LTS | linux | 0 | No fix |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-aws | 0 | No fix |
| Ubuntu:22.04:LTS | linux-aws-5.19 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-aws-6.2 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-aws-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-azure | 0 | No fix |
| Ubuntu:22.04:LTS | linux-azure-5.19 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-azure-6.2 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-azure-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-azure-fde | 0 | No fix |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-gcp | 0 | No fix |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-gke | 0 | No fix |
| Ubuntu:22.04:LTS | linux-gkeop | 0 | No fix |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-ibm | 0 | No fix |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | 0 | No fix |
| Ubuntu:22.04:LTS | linux-intel-iotg | 0 | No fix |
| Ubuntu:22.04:LTS | linux-kvm | 0 | No fix |
| Ubuntu:22.04:LTS | linux-lowlatency | 0 | No fix |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-nvidia | 0 | No fix |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-oem-5.17 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-oem-6.0 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-oem-6.1 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-oem-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-oracle | 0 | No fix |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-raspi | 0 | No fix |
| Ubuntu:22.04:LTS | linux-realtime | 0 | No fix |
| Ubuntu:22.04:LTS | linux-riscv | 0 | No fix |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | 0 | No fix |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 0 | No fix |
Related vulnerabilities
- CVE-2025-68285 In the Linux kernel, the following vulnerability has been resolved: libceph: fix… Also affects kernel
- CVE-2025-68287 In the Linux kernel, the following vulnerability has been resolved: usb: dwc3: Fix race… Also affects kernel
- CVE-2025-40277 In the Linux kernel, the following vulnerability has been resolved: drm/vmwgfx: Validate… Also affects kernel
- CVE-2025-40240 In the Linux kernel, the following vulnerability has been resolved: sctp: avoid NULL… Also affects kernel
- CVE-2025-40185 In the Linux kernel, the following vulnerability has been resolved: ice: ice_adapter… Also affects kernel
- CVE-2025-40176 In the Linux kernel, the following vulnerability has been resolved: tls: wait for pending… Also affects kernel
- CVE-2025-40058 In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Disallow… Also affects kernel
- CVE-2025-40047 In the Linux kernel, the following vulnerability has been resolved: io_uring/waitid… Also affects kernel