net: mctp: usb: fix race between urb completion and rx_retry cancellation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.367.0.137.1In the Linux kernel, the following vulnerability has been resolved:
net: mctp: usb: fix race between urb completion and rx_retry cancellation
It's possible that sequencing between setting ->stopped and cancelling the rx_retry work (in ndo_stop) could leave us with an urb queued:
T1: ndo_stop T2: rx_retry_work ------------ ---------------- LD: ->stopped => false ST: ->stopped <= true usb_kill_urb() mctp_usb_rx_queue() usb_submit_urb() cancel_delayed_work_sync()
That urb completion can then re-schedule rx_retry_work.
Strenghen the sequencing between the stop (preventing another requeue) and the cancel by updating both atomically under a new rx lock. After setting ->rx_stopped, and cancelling pending work, we know that the requeue cannot occur, so all that's left is killing any pending urb.
From the CVE record · Linux
The Linux kernel’s MCTP USB driver has a race between stopping the interface and cancelling receive-retry work. If those operations overlap, a USB receive request can remain queued, and its completion can reschedule retry work. The input does not specify whether an attacker can trigger the race, or any network, authentication, or user-interaction requirements.
Teams running Linux kernels with the MCTP USB driver should check their exposure; affected versions are not specified.