{"id":"CVE-2024-57942","summary":"netfs: Fix ceph copy to cache on write-begin","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfs: Fix ceph copy to cache on write-begin\n\nAt the end of netfs_unlock_read_folio() in which folios are marked\nappropriately for copying to the cache (either with by being marked dirty\nand having their private data set or by having PG_private_2 set) and then\nunlocked, the folio_queue struct has the entry pointing to the folio\ncleared.  This presents a problem for netfs_pgpriv2_write_to_the_cache(),\nwhich is used to write folios marked with PG_private_2 to the cache as it\nexpects to be able to trawl the folio_queue list thereafter to find the\nrelevant folios, leading to a hang.\n\nFix this by not clearing the folio_queue entry if we're going to do the\ndeprecated copy-to-cache.  The clearance will be done instead as the folios\nare written to the cache.\n\nThis can be reproduced by starting cachefiles, mounting a ceph filesystem\nwith \"-o fsc\" and writing to it.","modified":"2026-04-02T12:25:25.320307Z","published":"2025-01-21T12:18:10.532Z","related":["ALSA-2025:20095"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57942.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/38cf8e945721ffe708fa675507465da7f4f2a9f7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/43b8d3249b0b71bad239d42dbe08ce6c938ba000"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57942.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-57942"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ee4cdf7ba857a894ad1650d6ab77669cbbfa329e"},{"fixed":"43b8d3249b0b71bad239d42dbe08ce6c938ba000"},{"fixed":"38cf8e945721ffe708fa675507465da7f4f2a9f7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57942.json"}}],"schema_version":"1.7.5"}