dax/fsdev: clear vmemmap_shift when binding static pgmap
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dax/fsdev: clear vmemmap_shift when binding static pgmap
Clear pgmap->vmemmap_shift for static DAX devices. When rebinding a static device from device_dax (which may set vmemmap_shift based on alignment) to fsdev_dax, the stale vmemmap_shift persists on the shared pgmap. Explicitly zero it before devm_memremap_pages() so the vmemmap is built for order-0 folios as fsdev requires.
From the CVE record · Linux
The Linux kernel can retain a stale vmemmap_shift when a static DAX device is rebound from device_dax to fsdev_dax. This can build the vmemmap incorrectly for fsdev's order-0 folios. The input does not describe an attacker action or exploitation conditions.
Engineers running Linux kernels with static DAX devices that can be rebound from device_dax to fsdev_dax should check their kernel version; affected versions are not specified.