CVE-2026-139366: IB/IPoIB: Cancel normal flush work on device stop
In the Linux kernel, the following vulnerability has been resolved:
IB/IPoIB: Cancel normal flush work on device stop
ipoibibdevflushnormal() can race with ipoibstop() because the normal flush work does not run under RTNL.
Before commit a77a57a1a22a ("IPoIB: Fix deadlock on RTNL in ipoibstop()"), ipoibstop() flushed ipoibworkqueue after clearing IPOIBFLAGADMINUP and before calling ipoibibdevdown(). This ensured that any in-flight flush work completed before ipoibibdevdown() performed the final clear of IPOIBFLAGOPERUP.
After that commit removed the workqueue flush to avoid a deadlock with workqueue tasks taking RTNL, a normal flush can continue running concurrently with ipoibstop() after IPOIBFLAGADMINUP has been cleared.
The flush may observe IPOIBFLAGADMINUP set and continue running while ipoibstop() clears IPOIBFLAGADMINUP and brings the device down. The flush can then call ipoibibdevup() and set IPOIBFLAGOPERUP again after the device has already been stopped:
flushnormal (ipoibworkqueue) ipoibstop() (RTNL held) ------------------------------ ------------------------ testbit(ADMINUP) == 1 clearbit(ADMINUP) ipoibibdevdown() clearbit(OPERUP) ipoibibdevup() setbit(OPERUP)
This leaves the interface with ADMINUP clear and OPERUP set. During device removal, ipoibndouninit() waits in destroyworkqueue() while holding RTNL, while ipoibmcastcarrierontask() may keep retrying rtnltrylock() as long as OPERUP remains set, resulting in a deadlock.
Cancel the normal flush work from ipoibstop() after clearing IPOIBFLAGADMINUP and before bringing the device down. A pending normal flush is canceled, while an already running flush is allowed to finish before ipoibibdevdown() performs the final transition to OPERUP clear.
Only the normal flush needs this synchronization. The heavy flush is already serialized with ipoibstop() by RTNL, while the light flush does not bring the device back up and therefore cannot recreate this race.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In Linux kernel IPoIB, cancel the normal flush work from ipoib_stop() after clearing IPOIB_FLAG_ADMIN_UP and before calling ipoib_ib_dev_down().
Event History
Frequently Asked Questions
Which systems are exposed to this race?
Systems using the Linux kernel with IP over InfiniBand (IPoIB) devices are relevant. The race involves an IPoIB device being stopped while its normal flush work is still running.
What conditions are needed to trigger the issue?
A normal IPoIB flush work item must observe the administrative-up flag as set, while ipoib_stop() concurrently clears that flag and brings the device down. The work can then continue and mark the device operationally up after it has been stopped.
What should be done if the issue is present?
Apply a kernel update containing the referenced stable fixes. The provided fix addresses the race by cancelling the normal flush work when the device is stopped.