CVE-2024-26630 mm: cachestat: fix folio read-after-free in cache walk
A use-after-free vulnerability in the Linux kernel's cachestat function allows attackers to potentially execute code or escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-26630?
CVE-2024-26630 is a high-severity use after free vulnerability in Linux kernel, published on 13 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-416
Which versions are affected by CVE-2024-26630?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-26630?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2024-26630 being exploited?
There is no known exploitation of CVE-2024-26630 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-26630, DEBIAN-CVE-2024-26630, GHSA-8h7v-x635-x447, UBUNTU-CVE-2024-26630.