CVE-2026-139142: net: bcmgenet: recover from a failed resume
In the Linux kernel, the following vulnerability has been resolved:
net: bcmgenet: recover from a failed resume
A resume that fails in bcmgenetinitdma() returns with the interface still IFFUP and the datapath gone. The next ifdown runs the teardown a second time and napidisable() waits for a NAPISTATESCHED bit that nothing will clear:
task:ip state:D usleeprangestate+0xec/0x158 napidisablelocked+0x254/0x318 napidisable+0x3c/0x68 bcmgenetnetifstop+0x1c8/0x318 bcmgenetclose+0x24/0xd0 devclosemany+0x18c/0x310
RTNL is held across the wait, so everything else blocks behind it.
The same resume gates the clock and detaches the device. Close releases the clock a second time and ifup fails with -ENODEV. The hardware filters stay armed, so the next WoL suspend wakes on any frame. That suspend sets CMDRXEN for magic packet detection, so the WoL resume reuses rings that are gone.
A failed resume should leave a state the ordinary paths can handle. Clear rxcbs and txcbs as they are freed so they answer whether a datapath exists, and leave the clock alone so close and suspend release it once. The WoL resume rebuilds instead, so stop the PHY first, phystart() only takes PHYREADY or PHYHALTED.
Flagged in a sashiko review and reproduced on a CM4 by forcing the resume allocation to fail.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
On a failed bcmgenet WoL resume, stop the PHY before rebuilding the datapath and do not gate the clock; let close or suspend release the clock once. Use rx_cbs and tx_cbs to determine whether a datapath exists.