CVE-2024-26630

mm: cachestat: fix folio read-after-free in cache walk

State
Published
Severity
7.1 High
Published
Mar 13, 2024
Updated
Aug 5, 2026
Reserved
Feb 19, 2024

Read the record on cve.org

Description

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

mm: cachestat: fix folio read-after-free in cache walk

In cachestat, we access the folio from the page cache's xarray to compute its page offset, and check for its dirty and writeback flags. However, we do not hold a reference to the folio before performing these actions, which means the folio can concurrently be released and reused as another folio/page/slab.

Get around this altogether by just using xarray's existing machinery for the folio page offsets and dirty/writeback states.

This changes behavior for tmpfs files to now always report zeroes in their dirty and writeback counters. This is okay as tmpfs doesn't follow conventional writeback cache behavior: its pages get "cleaned" during swapout, after which they're no longer resident etc.

Scores

CVSSScoreVectorSource
3.17.1 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • cf264e1329fb0307e044f7675849f9f38b44c11a to before ba60fdf75e89ea762bb617be578dc47f27655117Affected
  • cf264e1329fb0307e044f7675849f9f38b44c11a to before fe7e008e0ce728252e4ec652cceebcc62211657cAffected
  • cf264e1329fb0307e044f7675849f9f38b44c11a to before 3a75cb05d53f4a6823a32deb078de1366954a804Affected
LinuxLinux
  • 6.5Affected
  • before 6.5Not affected
  • 6.6.21 through 6.6.*Not affected
  • 6.7.9 through 6.7.*Not affected
  • 6.8 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.