CVE-2024-26630

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-26630
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26630.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-26630
Downstream
Related
Published
2024-03-13T15:50:32Z
Modified
2025-10-15T08:14:38.092276Z
Summary
mm: cachestat: fix folio read-after-free in cache walk
Details

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.

References

Affected packages

Git / 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
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cf264e1329fb0307e044f7675849f9f38b44c11a
Fixed
fe7e008e0ce728252e4ec652cceebcc62211657c
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
cf264e1329fb0307e044f7675849f9f38b44c11a
Fixed
3a75cb05d53f4a6823a32deb078de1366954a804

Affected versions

v6.*

v6.4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.3
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.7.1
v6.7.2
v6.7.3
v6.7.4
v6.7.5
v6.7.6
v6.7.7
v6.7.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5

Database specific

{
    "vanir_signatures": [
        {
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fe7e008e0ce728252e4ec652cceebcc62211657c",
            "signature_type": "Function",
            "target": {
                "function": "filemap_cachestat",
                "file": "mm/filemap.c"
            },
            "deprecated": false,
            "digest": {
                "length": 1208.0,
                "function_hash": "147423665638425255982219034019202306609"
            },
            "id": "CVE-2024-26630-0bbf3665"
        },
        {
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a75cb05d53f4a6823a32deb078de1366954a804",
            "signature_type": "Function",
            "target": {
                "function": "filemap_cachestat",
                "file": "mm/filemap.c"
            },
            "deprecated": false,
            "digest": {
                "length": 1208.0,
                "function_hash": "147423665638425255982219034019202306609"
            },
            "id": "CVE-2024-26630-41577698"
        },
        {
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a75cb05d53f4a6823a32deb078de1366954a804",
            "signature_type": "Line",
            "target": {
                "file": "mm/filemap.c"
            },
            "deprecated": false,
            "digest": {
                "line_hashes": [
                    "109035222938614516387822392133200250324",
                    "241363398376656684080590967111788736230",
                    "298571723808381370968095012975850502770",
                    "278217521691980094922076666607463118835",
                    "33234231312601399425865546514949330027",
                    "48366879554159521094021555473767316855",
                    "223693757082763157412681393106176849532",
                    "198146152454973967676868825449015963888",
                    "57833291409305897468656585700845138736",
                    "265407836100569987884427954991224041251",
                    "243971002850632801358572254614045941858",
                    "60914939197582161284023063376504879629",
                    "242136128094959218754936206887108990687",
                    "40952577193872468773425780948387487695",
                    "197677206029027677127067954298175591446",
                    "209793035082275594728926901090374413332",
                    "255222875533488213291594684214088768811",
                    "252774391373283289306808746435781295682",
                    "124110298145825501598088088735508172027",
                    "100960610797492155659339134715736058146",
                    "79576355870131878234941027495608227784",
                    "222297155134219454199749307596864676295",
                    "29859901121412945498695338875735234625",
                    "65473280672226249218386769507373749245",
                    "197677206029027677127067954298175591446",
                    "209793035082275594728926901090374413332",
                    "48599984417659960374219853869901885216",
                    "81387457923237288263885455048613290650",
                    "32774375002808274554882325170299481647",
                    "225258604749735586895565127587519700936",
                    "221982353272315687632321777222910465663",
                    "54505473593677737058373856919774322560",
                    "265662433504576763946791179060056983018"
                ],
                "threshold": 0.9
            },
            "id": "CVE-2024-26630-58f726ac"
        },
        {
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ba60fdf75e89ea762bb617be578dc47f27655117",
            "signature_type": "Line",
            "target": {
                "file": "mm/filemap.c"
            },
            "deprecated": false,
            "digest": {
                "line_hashes": [
                    "109035222938614516387822392133200250324",
                    "241363398376656684080590967111788736230",
                    "298571723808381370968095012975850502770",
                    "278217521691980094922076666607463118835",
                    "33234231312601399425865546514949330027",
                    "48366879554159521094021555473767316855",
                    "223693757082763157412681393106176849532",
                    "198146152454973967676868825449015963888",
                    "57833291409305897468656585700845138736",
                    "265407836100569987884427954991224041251",
                    "243971002850632801358572254614045941858",
                    "60914939197582161284023063376504879629",
                    "242136128094959218754936206887108990687",
                    "40952577193872468773425780948387487695",
                    "197677206029027677127067954298175591446",
                    "209793035082275594728926901090374413332",
                    "255222875533488213291594684214088768811",
                    "252774391373283289306808746435781295682",
                    "124110298145825501598088088735508172027",
                    "100960610797492155659339134715736058146",
                    "79576355870131878234941027495608227784",
                    "222297155134219454199749307596864676295",
                    "29859901121412945498695338875735234625",
                    "65473280672226249218386769507373749245",
                    "197677206029027677127067954298175591446",
                    "209793035082275594728926901090374413332",
                    "48599984417659960374219853869901885216",
                    "81387457923237288263885455048613290650",
                    "32774375002808274554882325170299481647",
                    "225258604749735586895565127587519700936",
                    "221982353272315687632321777222910465663",
                    "54505473593677737058373856919774322560",
                    "265662433504576763946791179060056983018"
                ],
                "threshold": 0.9
            },
            "id": "CVE-2024-26630-bc1a15ee"
        },
        {
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ba60fdf75e89ea762bb617be578dc47f27655117",
            "signature_type": "Function",
            "target": {
                "function": "filemap_cachestat",
                "file": "mm/filemap.c"
            },
            "deprecated": false,
            "digest": {
                "length": 1208.0,
                "function_hash": "147423665638425255982219034019202306609"
            },
            "id": "CVE-2024-26630-bd7e0a6c"
        },
        {
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fe7e008e0ce728252e4ec652cceebcc62211657c",
            "signature_type": "Line",
            "target": {
                "file": "mm/filemap.c"
            },
            "deprecated": false,
            "digest": {
                "line_hashes": [
                    "109035222938614516387822392133200250324",
                    "241363398376656684080590967111788736230",
                    "298571723808381370968095012975850502770",
                    "278217521691980094922076666607463118835",
                    "33234231312601399425865546514949330027",
                    "48366879554159521094021555473767316855",
                    "223693757082763157412681393106176849532",
                    "198146152454973967676868825449015963888",
                    "57833291409305897468656585700845138736",
                    "265407836100569987884427954991224041251",
                    "243971002850632801358572254614045941858",
                    "60914939197582161284023063376504879629",
                    "242136128094959218754936206887108990687",
                    "40952577193872468773425780948387487695",
                    "197677206029027677127067954298175591446",
                    "209793035082275594728926901090374413332",
                    "255222875533488213291594684214088768811",
                    "252774391373283289306808746435781295682",
                    "124110298145825501598088088735508172027",
                    "100960610797492155659339134715736058146",
                    "79576355870131878234941027495608227784",
                    "222297155134219454199749307596864676295",
                    "29859901121412945498695338875735234625",
                    "65473280672226249218386769507373749245",
                    "197677206029027677127067954298175591446",
                    "209793035082275594728926901090374413332",
                    "48599984417659960374219853869901885216",
                    "81387457923237288263885455048613290650",
                    "32774375002808274554882325170299481647",
                    "225258604749735586895565127587519700936",
                    "221982353272315687632321777222910465663",
                    "54505473593677737058373856919774322560",
                    "265662433504576763946791179060056983018"
                ],
                "threshold": 0.9
            },
            "id": "CVE-2024-26630-cf1ff29d"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.5.0
Fixed
6.6.21
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.7.9