CVE-2026-74725: enic: fix tx_hang_reset use-after-free on device removal
In the Linux kernel, the following vulnerability has been resolved:
enic: fix txhangreset use-after-free on device removal
enicremove() cancels the reset and changemtuwork items but does not cancel txhangreset. A TX timeout that fires while the device is being removed can schedule enictxhangreset() so that it runs after freenetdev(), resulting in a use-after-free.
cancelworksync() alone is not sufficient here: the still-live watchdog and notify paths can re-schedule these work items in the window between the cancel and unregisternetdev(). Use disableworksync(), which cancels the work and blocks any subsequent schedulework() from requeuing it, and apply it to the reset and changemtuwork items as well so the same requeue race is closed for all teardown work.
Event History
Frequently Asked Questions
What timing is required for the use-after-free to occur?
A TX timeout must fire while the device is being removed, allowing enic_tx_hang_reset() to be scheduled after free_netdev() has run.
Why is cancel_work_sync() insufficient during teardown?
The watchdog and notify paths can still schedule the work again between cancellation and unregister_netdev(). This leaves a race in which teardown work can run after the network device has been freed.
Which work items need protection from requeueing during device removal?
The tx_hang_reset work item must be disabled, and the reset and change_mtu_work items must receive the same treatment to close equivalent requeue races.