Vulnerability · Published Jan 21, 2025 · Assigned by Linux

CVE-2024-57941netfs: Fix the (non-)cancellation of copy when cache is temporarily disabled

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 7% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 93.0% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

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 & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:10kernel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-debug6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-debug-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-debug-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-debug-devel-matched6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-debug-modules6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-debug-modules-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-debug-modules-extra6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-devel-matched6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-modules6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-modules-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-64k-modules-extra6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-abi-stablelists6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-cross-headers6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-debug6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-debug-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-debug-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-debug-devel-matched6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-debug-modules6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-debug-modules-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-debug-modules-extra6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-debug-uki-virt6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-devel-matched6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-doc6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-headers6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-modules6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-modules-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-modules-extra6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-modules-extra-matched6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-debug6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-debug-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-debug-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-debug-modules6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-debug-modules-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-debug-modules-extra6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-modules6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-modules-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-64k-modules-extra6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-debug6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-debug-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-debug-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-debug-modules6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-debug-modules-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-debug-modules-extra6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-modules6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-modules-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-rt-modules-extra6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-tools6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-tools-libs6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-tools-libs-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-uki-virt6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-uki-virt-addons6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-zfcpdump6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-zfcpdump-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-zfcpdump-devel6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-zfcpdump-devel-matched6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-zfcpdump-modules6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-zfcpdump-modules-core6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10kernel-zfcpdump-modules-extra6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10libperf6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10perf6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10python3-perf6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10rtla6.12.0-124.8.1.el10_1ALSA-2025:20095
AlmaLinux:10rv6.12.0-124.8.1.el10_1ALSA-2025:20095
Debian:13linux6.12.10-1DEBIAN-CVE-2024-57941
Debian:14linux6.12.10-1DEBIAN-CVE-2024-57941
Rocky Linux:10kernel0:6.12.0-124.8.1.el10_1RLSA-2025:20095
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-57941
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-57941
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-57941

Affected products (as reported)

VendorProductVersions
Linux Linux ee4cdf7ba857a894ad1650d6ab77669cbbfa329e – before ba37bdfe59fb43e80dd79290340a21864ba4b61eee4cdf7ba857a894ad1650d6ab77669cbbfa329e – before d0327c824338cdccad058723a31d038ecd553409
Linux Linux 6.12

References