HIGH Introduced in 5.19
lan966x RxReload UAF
CVE-2026-98906
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: lan966x: restore RX state on reload failure lan966x_fdma_reload() backs up rx->page_pool and rx->fdma before reallocating the RX resources for the new MTU. If the allocation fails, the restore path puts these fields back before restarting RX. However, the reload path also updates rx->page_order and rx->max_mtu before calling lan966x_fdma_rx_alloc(). These fields are not restored on failure, so RX can be restarted with the old pages, old FDMA state and old page pool, but with the page geometry from the failed new MTU. This can make the XDP path advertise a frame size derived from the new page_order while the actual RX pages still come from the old allocation. For example, after a failed reload to a jumbo MTU, xdp_init_buff() may be called with a frame size larger than the restored RX pages. lan966x_fdma_rx_alloc_page_pool() also registers the newly allocated page pool with each port's XDP RXQ before fdma_alloc_coherent() is called. If fdma_alloc_coherent() fails, the new page pool is destroyed, but the rollback path does not restore the per-port XDP RXQ mem model registration either. Save and restore rx->page_order and rx->max_mtu, and restore the old page pool registration for each port's XDP RXQ before RX is started again. This keeps the restored RX state consistent after a failed reload.
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_NET_ADMIN (obtainable in a user namespace) can trigger an MTU change on a LAN966x Ethernet interface that fails mid-way due to memory allocation pressure. The driver's rollback path leaves the RX subsystem in an inconsistent state: XDP receive queues retain a registration pointing to a destroyed page pool, and the advertised frame size reflects the failed larger MTU while actual RX pages come from the original smaller allocation. This enables use-after-free and out-of-bounds memory access in the XDP data path, potentially leading to kernel memory corruption, information disclosure, or system crash.
Vulnerability analysis
When the LAN966x driver attempts to reload RX resources for a new MTU, it updates the page order and maximum MTU fields before allocating new memory. If the allocation fails, the error path restores the old page pool and FDMA state but neglects to revert the page order and MTU fields, and does not re-register the original page pool with each port's XDP receive queue. Consequently, XDP continues to reference a freed page pool and calculates frame sizes based on the failed configuration's larger page order, while the actual RX pages belong to the original smaller allocation. The fix saves the original page order and MTU before the reload, restores them on failure, and re-registers the original page pool with all XDP RX queues before restarting RX, ensuring the restored state remains internally consistent. The vulnerability is reachable only on systems with the LAN966x hardware driver loaded and requires local privileges sufficient to change the interface MTU (CAP_NET_ADMIN, available to unprivileged users inside a user namespace).
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 5.19 | 6.12.111 | 3883898ddc26 |
| 6.18 | 5.19 | 6.18.53 | b5a6462f4646 |
| mainline | 5.19 | 7.2 | aa97f11a76e5 |
| cip/6.12 | 5.19 | 6.12.111-cip32 | 3883898ddc26 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |