# CVE-2024-26630: mm: cachestat: fix folio read-after-free in cache walk

- Severity: High 7.1 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.30%, higher than 24% of CVEs (2026-12-01)
- Published: 2024-03-13T15:50:32.480Z
- Modified: 2026-08-05T11:26:23.659Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from cf264e1329fb0307e044f7675849f9f38b44c11a before ba60fdf75e89ea762bb617be578dc47f27655117; from cf264e1329fb0307e044f7675849f9f38b44c11a before fe7e008e0ce728252e4ec652cceebcc62211657c; from cf264e1329fb0307e044f7675849f9f38b44c11a before 3a75cb05d53f4a6823a32deb078de1366954a804; 6.5 (not affected: before 6.5; from 6.6.21 up to 6.6.*; from 6.7.9 up to 6.7.*; from 6.8 up to *)
- linux linux_kernel: from 6.5 before 6.6.21; from 6.7 before 6.7.9; 6.8

## Every score

- Linux: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- NVD: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/ba60fdf75e89ea762bb617be578dc47f27655117> (patch)
- <https://git.kernel.org/stable/c/fe7e008e0ce728252e4ec652cceebcc62211657c> (patch)
- <https://git.kernel.org/stable/c/3a75cb05d53f4a6823a32deb078de1366954a804> (patch)

## Sources

- CVE List: [CVE-2024-26630](https://www.cve.org/CVERecord?id=CVE-2024-26630), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-26630](https://nvd.nist.gov/vuln/detail/CVE-2024-26630), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-26630 · Whole record: https://cve.day/CVE-2024-26630.json · Rebuilt by cve.day 2026-11-25T22:58:37.528Z
