CVE-2024-41051: cachefiles: wait for ondemand_object_worker to finish when dropping object

Published Jul 29, 2024
·
Updated

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

cachefiles: wait for ondemandobjectworker to finish when dropping object

When queuing ondemandobjectworker() to re-open the object, cachefilesobject is not pinned. The cachefilesobject may be freed when the pending read request is completed intentionally and the related erofs is umounted. If ondemandobjectworker() runs after the object is freed, it will incur use-after-free problem as shown below.

process A processs B process C process D

cachefilesondemandsendreq() // send a read req X // wait for its completion

// close ondemand fd cachefilesondemandfdrelease() // set object as CLOSE

cachefilesondemanddaemonread() // set object as REOPENING queuework(fscachewq, &info->ondemandwork)

// close /dev/cachefiles cachefilesdaemonrelease cachefilesflushreqs complete(&req->done)

// read req X is completed // umount the erofs fs cachefilesputobject() // object will be freed cachefilesondemanddeinitobjinfo() kmemcachefree(object) // both info and object are freed ondemandobjectworker()

When dropping an object, it is no longer necessary to reopen the object, so use cancelworksync() to cancel or wait for ondemandobjectworker() to finish.

Affected Software

12 affected componentsFixes available
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=6.1.95<6.1.100
Linux Linux kernel>=6.6.35<6.6.41
Linux Linux kernel>=6.8<6.9.10
Linux Linux kernel=6.10-rc1
Linux Linux kernel=6.10-rc2
Linux Linux kernel=6.10-rc3
Linux Linux kernel=6.10-rc4
Linux Linux kernel=6.10-rc5
Linux Linux kernel=6.10-rc6
Linux Linux kernel=6.10-rc7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.129-1~deb11u1

Event History

Jul 29, 2024
CVE Published
via MITRE·02:32 PM
Data Sourced
via MITRE·02:32 PM
DescriptionSeverity
Data Sourced
via NVD·03:15 PM
Description
Data Sourced
via NVD·03:15 PM
RemedySeverityWeaknessAffected Software
Dec 19, 2024
Data Sourced
via Ubuntu·12:31 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-41051?

CVE-2024-41051 is classified as a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-41051?

To fix CVE-2024-41051, upgrade to the patched versions of the Linux kernel, specifically 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.128-1, 6.12.12-1, 6.12.15-1, or 6.1.128-1~deb11u1.

3

What impact does CVE-2024-41051 have on affected systems?

CVE-2024-41051 can potentially lead to a denial of service by freeing a cachefiles_object unexpectedly.

4

Which Linux kernel versions are affected by CVE-2024-41051?

Affected Linux kernel versions include those prior to the fixed releases enumerated in the mitigation.

5

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

CVE-2024-41051 is considered a local vulnerability as it requires local access to exploit.

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