CVE-2026-139791: net: Use a dedicated flag to track disabled napi instances
In the Linux kernel, the following vulnerability has been resolved:
net: Use a dedicated flag to track disabled napi instances
Trying to disable the napi threaded state while the napi instance is disabled will hang forever in napistopkthread(), as it waits for NAPIFSTATESCHEDTHREADED to clear.
This won't happen until the next napischedule() call, which won't happen as it's disabled.
This happens in 2 instances :
- Drivers that create but don't use napi instances (stmmac's rxtx napi for AFXDP for example), here it's a driver bug
- Drivers that create their napi instances in .probe(). Here, setting threaded off while the interface is down will hang :
ip link set eth0 down echo 1 > /sys/class/net/eth0/threaded echo 0 > /sys/class/net/eth0/threaded -> hang
Checking on netifrunning() isn't enough, as napi instances may be transiently disabled when changing the MTU for example, let's use a dedicated flag to track if the instance is disabled.
This allows immediately disabling the kthread when the instance is disabled.
This was tested on mvpp2 (probe-time napiadd) and stmmac.
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.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1
Event History
Frequently Asked Questions
What conditions trigger the hang?
The hang occurs when threaded NAPI is disabled while a NAPI instance is already disabled. A documented example is bringing an interface down, enabling its threaded setting through sysfs, and then disabling that setting again.
Which systems are most likely to be exposed?
Systems using drivers that create NAPI instances during probe can hang when threaded NAPI is turned off while the interface is down. Drivers that create NAPI instances but do not use them are also affected, with stmmac's RX/TX NAPI for AF_XDP cited as an example.
Can temporary interface or device state changes also expose the issue?
Yes. The NAPI instance can be transiently disabled during operations such as MTU changes, so checking only whether the network interface is running does not avoid the affected state.
How can administrators recognize that they have encountered this vulnerability?
The observable symptom is an operation hanging indefinitely in napi_stop_kthread() while it waits for NAPIF_STATE_SCHED_THREADED to clear. The state will not clear until a subsequent __napi_schedule() call, which does not occur while the NAPI instance remains disabled.