can: gs_usb: gs_usb_receive_bulk_callback(): unanchor URL on usb_submit_urb() error
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7352e1d5932a0e777e39fa4b619801191f57e603 · < 79a6d1bfe1148bc921b8d7f3371a7fbce44e30f7| No fix yet |
| Linux Linux |
| No fix yet |
In the Linux kernel, the following vulnerability has been resolved:
can: gs_usb: gs_usb_receive_bulk_callback(): unanchor URL on usb_submit_urb() error
In commit 7352e1d5932a ("can: gs_usb: gs_usb_receive_bulk_callback(): fix URB memory leak"), the URB was re-anchored before usb_submit_urb() in gs_usb_receive_bulk_callback() to prevent a leak of this URB during cleanup.
However, this patch did not take into account that usb_submit_urb() could fail. The URB remains anchored and usb_kill_anchored_urbs(&parent->rx_submitted) in gs_can_close() loops infinitely since the anchor list never becomes empty.
To fix the bug, unanchor the URB when an usb_submit_urb() error occurs, also print an info message.
From the CVE record · Linux
The Linux kernel’s gs_usb driver can leave a USB request anchored when resubmitting it fails, causing an infinite loop when the CAN device closes. This can cause a denial of service; the input does not specify whether an attacker can trigger the failure or what access or interaction that would require.
Engineers running Linux kernels with the gs_usb CAN driver should check their versions; affected versions are not specified.