mm/util: don't read __page_2 for order-1 folios in snapshot_page()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
6.15
|
In the Linux kernel, the following vulnerability has been resolved:
mm/util: don't read __page_2 for order-1 folios in snapshot_page()
snapshot_page() currently reads __page_2 after checking nr_pages > 1, but it should only do so when nr_pages > 2.
If an order-1 folio is allocated at the end of a vmemmap section, __page_2 will not exist and reading it will cause a fault.
During DLPAR memory remove on a 22 TB ppc64le LPAR, snapshot_page() oopsed on the page isolation path while reading an order-1 folio's __page_2 from an adjacent absent section (unmapped vmemmap).
Fix this to avoid reading memmap that doesn't exist (e.g., a vmemmap hole).
From the CVE record · Linux
The Linux kernel's snapshot_page() can read a nonexistent page descriptor when an order-1 folio sits at the end of a vmemmap section, causing a fault. The issue was observed during DLPAR memory removal on a ppc64le system; the input does not describe an attacker trigger, authentication requirement, or user interaction.
Engineers running Linux kernels that may encounter this memory layout should check their systems; affected versions are not specified.