{"id":"CVE-2024-26630","summary":"mm: cachestat: fix folio read-after-free in cache walk","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: cachestat: fix folio read-after-free in cache walk\n\nIn cachestat, we access the folio from the page cache's xarray to compute\nits page offset, and check for its dirty and writeback flags.  However, we\ndo not hold a reference to the folio before performing these actions,\nwhich means the folio can concurrently be released and reused as another\nfolio/page/slab.\n\nGet around this altogether by just using xarray's existing machinery for\nthe folio page offsets and dirty/writeback states.\n\nThis changes behavior for tmpfs files to now always report zeroes in their\ndirty and writeback counters.  This is okay as tmpfs doesn't follow\nconventional writeback cache behavior: its pages get \"cleaned\" during\nswapout, after which they're no longer resident etc.","modified":"2026-04-02T10:05:12.083703Z","published":"2024-03-13T15:50:32.480Z","related":["ALSA-2024:6567"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26630.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/3a75cb05d53f4a6823a32deb078de1366954a804"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ba60fdf75e89ea762bb617be578dc47f27655117"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fe7e008e0ce728252e4ec652cceebcc62211657c"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26630.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26630"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"cf264e1329fb0307e044f7675849f9f38b44c11a"},{"fixed":"ba60fdf75e89ea762bb617be578dc47f27655117"},{"fixed":"fe7e008e0ce728252e4ec652cceebcc62211657c"},{"fixed":"3a75cb05d53f4a6823a32deb078de1366954a804"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26630.json"}}],"schema_version":"1.7.5"}