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

Published Jan 21, 2025
·
Updated

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 PGprivate2 method (such as is currently used by ceph), and decides it wants to copy to the cache, netfsadvancewrite() 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 PGprivate2 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 folioqueue list and netfspgpriv2cancel() 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 Software

8 affected components
Linux Linux kernel
Linux Linux kernel>=6.12<6.12.10
Linux Linux kernel=6.13-rc1
Linux Linux kernel=6.13-rc2
Linux Linux kernel=6.13-rc3
Linux Linux kernel=6.13-rc4
Linux Linux kernel=6.13-rc5
Linux Linux kernel=6.13-rc6

Event History

Jan 21, 2025
CVE Published
via MITRE·12:18 PM
Data Sourced
via MITRE·12:18 PM
Description
Data Sourced
via Red Hat·01:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·01:15 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-57941?

CVE-2024-57941 is categorized as a low-severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-57941?

To mitigate CVE-2024-57941, update your Linux kernel to the latest stable version where this vulnerability has been resolved.

3

What impact does CVE-2024-57941 have on system performance?

CVE-2024-57941 primarily affects the caching mechanism for files, potentially leading to performance degradation during file operations.

4

Which versions of the Linux kernel are affected by CVE-2024-57941?

CVE-2024-57941 impacts specific versions of the Linux kernel that utilize the netfs caching mechanism.

5

Is CVE-2024-57941 exploitable remotely?

CVE-2024-57941 is not known to be exploitable remotely, as it relates to internal caching processes.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203