CVE-2024-57942

netfs: Fix ceph copy to cache on write-begin

published January 21, 2025

CVSS
—
EPSS
0%
Percentile
6.9
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.00177 · 6.9th percentile
Published
2025-01-21T12:18Z
EPSS history
Timeline
  • 21 JAN 12:18Z
    netfs: Fix ceph copy to cache on write-begin
    cvelistv5