CVE-2026-143340: net: lan966x: don't free XDP buffers in fdma tx clear with budget 0
In the Linux kernel, the following vulnerability has been resolved:
net: lan966x: don't free XDP buffers in fdma tx clear with budget 0
lan966xfdmatxclearbuf() runs from the NAPI poll and frees the buffers of completed tx DCBs with napiconsumeskb(), pagepoolrecycledirect() and xdpreturnframebulk().
netpoll calls the NAPI poll with a budget of 0 and hardirqs disabled. With a budget of 0, a driver cannot call any XDP or page pool API.
Before this patch, the XDPTX pages and ndoxdpxmit frames are freed regardless of the budget. With netconsole on the port that owns the FDMA NAPI, such a buffer is freed with hardirqs disabled, and pagepoolputpage() warns via lockdepassertnohardirq().
Leave the XDP buffers of completed DCBs in place when the budget is 0, and free them in the next NAPI poll. napiconsumeskb() already handles a budget of 0, so skbs are still freed.
Found by an AI code review agent. Reproduced on a lan9668 board with a modified kernel that runs the NAPI poll with a budget of 0 and hardirqs disabled. With the fix the warning is gone.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7 - Compensating control
When the NAPI budget is 0, leave XDP buffers for completed TX DCBs in place and free them during the next NAPI poll.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
The issue affects Linux systems using the lan966x network driver when XDP_TX pages or ndo_xdp_xmit frames are being completed through the FDMA NAPI path. The reported trigger involves netconsole on the port that owns that FDMA NAPI instance.
What conditions are needed to trigger the warning?
Netpoll must invoke the driver's NAPI poll with a budget of 0 while hard IRQs are disabled. Under those conditions, completed XDP buffers were returned through XDP or page-pool APIs even though those APIs cannot be called with a zero NAPI budget.
How can an administrator identify a potentially affected system?
Look for a lockdep warning from __page_pool_put_page() asserting that hard IRQs must not be disabled. The warning can occur when completed XDP buffers are processed during a zero-budget netpoll NAPI poll.
What can be done before applying the fix?
Avoid the triggering configuration: do not use netconsole on the port that owns the affected FDMA NAPI path while it is handling XDP_TX or ndo_xdp_xmit buffers. SKBs are handled safely with a zero budget, but the affected XDP and page-pool buffer return path is not.