---
id: CVE-2024-26630
title: |-
  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 dir…
summary: |-
  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 dir…
severity: high
cvss: 7.1
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H'
cwe:
  - CWE-416
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 6.5, < 6.6.21'
  - 'linux_kernel >= 6.7, < 6.7.9'
  - linux_kernel = 6.8
patched:
  - linux_kernel 6.7.9
published: '2024-03-13'
updated: '2026-08-04'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2024-26630'
references:
  - url: 'https://git.kernel.org/stable/c/3a75cb05d53f4a6823a32deb078de1366954a804'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/ba60fdf75e89ea762bb617be578dc47f27655117'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/fe7e008e0ce728252e4ec652cceebcc62211657c'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/3a75cb05d53f4a6823a32deb078de1366954a804'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/ba60fdf75e89ea762bb617be578dc47f27655117'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/fe7e008e0ce728252e4ec652cceebcc62211657c'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.00302
epssPercentile: 0.20328
ingestedAt: '2026-08-05T05:58:03.318Z'
---

## Overview

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.

## Affected

- `linux_kernel >= 6.5, < 6.6.21`
- `linux_kernel >= 6.7, < 6.7.9`
- `linux_kernel = 6.8`

## Remediation

Upgrade past the affected range:

- `linux_kernel 6.7.9`
