HIGH
net PagePool Scrub UAF
CVE-2026-90201
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: net: page_pool: fix UAF in __page_pool_release_netmem_dma on xa_cmpxchg race This bug was discovered while testing the hns3 driver under channel reconfiguration (`ethtool -L` / `ethtool -G`) with iperf3 traffic on arm64. The race is intermittently triggered when page_pool_destroy() runs page_pool_scrub() concurrently with page return via page_pool_put_netmem() on a different CPU. A WARN in page_pool_clear_pp_info() surfaced the dangling DMA index bits left by the cmpxchg loser, which led to the investigation. page_pool_scrub() iterates pool->dma_mapped via xa_for_each() with no page ref held. __page_pool_release_netmem_dma() currently reads and writes netmem fields (dma_addr, DMA index bits in pp_magic) after xa_cmpxchg() returns. The unref path calls put_page() unconditionally regardless of the cmpxchg outcome; when it loses the cmpxchg, it still frees the page before the scrub winner finishes these netmem accesses, so scrub touches a freed page -- a Use-After-Free. Fix this by splitting the DMA release into two functions: 1. __page_pool_unmap_netmem_dma() caches dma_addr before xa_cmpxchg(), does the cmpxchg to remove the DMA mapping, and calls dma_unmap on the cached address. It never touches netmem fields after the cmpxchg, making it safe for the scrub path which holds no page ref. 2. __page_pool_release_netmem_dma() wraps the above and additionally clears dma_addr and DMA index bits in netmem fields. This is safe only when the caller holds a page ref, so it is used by the return path (page_pool_return_netmem). The scrub path calls __page_pool_unmap_netmem_dma() directly; the return path calls __page_pool_release_netmem_dma().
02KernelScan AI Analysis
Risk summary
A use-after-free in the kernel's page pool subsystem can be triggered when a network device is reconfigured concurrently with active packet processing. A local attacker with network administration privileges can exploit this race to corrupt kernel heap memory, potentially achieving arbitrary read/write and causing kernel crashes. Systems with NIC drivers that use page_pool and allow local users to trigger device reconfiguration are at risk.
Vulnerability analysis
The page pool subsystem has a use-after-free vulnerability that occurs when a network device is being reconfigured (such as changing channel counts or ring buffer sizes) concurrently with active packet processing. During pool teardown, the cleanup routine iterates through DMA-mapped pages without holding page references, while the packet return path on another CPU may free a page after losing a compare-and-exchange operation but before the cleanup routine finishes accessing that page's metadata. The fix separates the DMA unmapping into two paths: one that caches the DMA address before the atomic exchange and never touches page fields afterward (safe for the cleanup path), and one that additionally clears page metadata fields (safe only when the caller holds a page reference, used by the normal packet return path). This vulnerability requires local access with network administration privileges to trigger the device reconfiguration, and concurrent network traffic provides the racing condition.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.12.34 | 6.12.110 | bbfef303f980 |
| 6.15 | 6.15.3 | 6.16 | 424a9fc4876c |
| 6.18 | — | 6.18.52 | 9b65b0253ad5 |
| 7.2 | — | 7.2.6 | 24ef02f934ee |
| mainline | — | 7.3-rc1 | — |
| cip/6.12 | — | 6.12.111-cip32 | bbfef303f980 |