CVE-2024-40935: cachefiles: flush all requests after setting CACHEFILES_DEAD

Published Jul 12, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

cachefiles: flush all requests after setting CACHEFILESDEAD

In ondemand mode, when the daemon is processing an open request, if the kernel flags the cache as CACHEFILESDEAD, the cachefilesdaemonwrite() will always return -EIO, so the daemon can't pass the copen to the kernel. Then the kernel process that is waiting for the copen triggers a hungtask.

Since the DEAD state is irreversible, it can only be exited by closing /dev/cachefiles. Therefore, after calling cachefilesioerror() to mark the cache as CACHEFILESDEAD, if in ondemand mode, flush all requests to avoid the above hungtask. We may still be able to read some of the cached data before closing the fd of /dev/cachefiles.

Note that this relies on the patch that adds reference counting to the req, otherwise it may UAF.

Affected Software

8 affected componentsFixes available
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=5.19<6.1.95
Linux Linux kernel>=6.2<6.6.35
Linux Linux kernel>=6.7<6.9.6
Linux Linux kernel=6.10-rc1
Linux Linux kernel=6.10-rc2
Linux Linux kernel=6.10-rc3

Event History

Jul 12, 2024
CVE Published
via MITRE·12:25 PM
Data Sourced
via MITRE·12:25 PM
Description
Data Sourced
via NVD·01:15 PM
Description
Data Sourced
via NVD·01:15 PM
RemedySeverityWeaknessAffected Software
Nov 30, 2024
Data Sourced
via Ubuntu·04:44 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-40935?

CVE-2024-40935 has not been assigned a specific severity rating, but it poses risks related to the cachefiles subsystem in the Linux kernel.

2

How do I fix CVE-2024-40935?

To fix CVE-2024-40935, you should update to the patched versions of the Linux kernel, such as 5.10.223-1, 5.10.226-1, 6.1.123-1, or later.

3

Which versions of Linux are affected by CVE-2024-40935?

CVE-2024-40935 affects multiple versions of the Linux kernel prior to the patched updates in 5.10.223-1 and others.

4

Is CVE-2024-40935 a local or remote vulnerability?

CVE-2024-40935 is primarily a local vulnerability that can be exploited by users with access to the affected Linux system.

5

What component of Linux does CVE-2024-40935 affect?

CVE-2024-40935 affects the cachefiles subsystem within the Linux kernel.

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