CVE-2024-57942

published 21 Jan 2025 · updated 11 May 2026

netfs: Fix ceph copy to cache on write-begin

5.0MediumEPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 38cf8e945721ffe708fa675507465da7f4f2a9f7 and Kernel 43b8d3249b0b71bad239d42dbe08ce6c938ba000.

In the Linux kernel, the following vulnerability has been resolved: netfs: Fix ceph copy to cache on write-begin At the end of netfs_unlock_read_folio() in which folios are marked appropriately for copying to the cache (either with by being marked dirty and having their private data set or by having PG_private_2 set) and then unlocked, the folio_queue struct has the entry pointing to the folio cleared. This presents a problem for netfs_pgpriv2_write_to_the_cache(), which is used to write folios marked with PG_private_2 to the cache as it expects to be able to trawl the folio_queue list thereafter to find the relevant folios, leading to a hang. Fix this by not clearing the folio_queue entry if we're going to do the deprecated copy-to-cache. The clearance will be done instead as the folios are written to the cache. This can be reproduced by starting cachefiles, mounting a ceph filesystem with "-o fsc" and writing to it.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
LinuxKernel=6.12, >=ee4cdf7ba857a894ad1650d6ab77669cbbfa329e <38cf8e945721ffe708fa675507465da7f4f2a9f7, >=ee4cdf7ba857a894ad1650d6ab77669cbbfa329e <43b8d3249b0b71bad239d42dbe08ce6c938ba00038cf8e945721ffe708fa675507465da7f4f2a9f7, 43b8d3249b0b71bad239d42dbe08ce6c938ba000

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Kernel, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2024-57942 severity on Zeptric[![CVE-2024-57942](https://zeptric.io/badge/cve/CVE-2024-57942.svg)](https://zeptric.io/cve/CVE-2024-57942)