7.1high
mm: cachestat: fix folio read-after-free in cache walk
- Severity
- 7.1high CVSS:3.1 by Linux
- Exploit likelihood
- 0.30% (higher than 24% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| 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 * | CVE List |
| linux linux_kernel | from 6.5 before 6.6.21, from 6.7 before 6.7.9, 6.8 | NVD |
All scores
| Linux | 7.1high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
| NVD | 7.1high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm: cachestat: corrige read-after-free la publicación en cache walk En cachestat, accedemos a la publicación desde la matriz x de la caché de la página para calcular su desplazamiento de página y comprobar si está sucia y banderas de reescritura. Sin embargo, no mantenemos una referencia al folio antes de realizar estas acciones, lo que significa que el folio se puede liberar y reutilizar simultáneamente como otro folio/página/losa. Evite esto por completo simplemente utilizando la maquinaria existente de xarray para los desplazamientos de páginas de folio y los estados sucios/de reescritura. Esto cambia el comportamiento de los archivos tmpfs para que ahora siempre informen ceros en sus contadores sucios y de reescritura. Esto está bien ya que tmpfs no sigue el comportamiento de caché de reescritura convencional: sus páginas se "limpian" durante el intercambio, después del cual ya no residen, etc.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-26630 changed 2026-08-05 | CVE Terms of Use |
| NVD | CVE-2024-26630 changed 2026-08-04 | Public domain |