can: kvaser_usb_leaf: kvaser_usb_leaf_wait_cmd(): validate received command extents
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 080f40a6fa28dab299da7a652e444b1e2d9231e7 · < 185cb1fa38142a3cbf223dd8b3abb24217f330d3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
can: kvaser_usb_leaf: kvaser_usb_leaf_wait_cmd(): validate received command extents
The wait and bulk receive paths walk variable-length commands from a USB buffer. A nonzero command shorter than CMD_HEADER_LEN can still be dispatched, and the wait path copies a matching command into a fixed caller-owned struct kvaser_cmd using the device-provided length.
Reject nonzero commands that do not contain the fixed header or that extend beyond the current USB buffer item. In the wait path, also reject a matching command that exceeds the destination before copying it.
From the CVE record · Linux
The Linux kernel’s kvaser_usb_leaf CAN driver does not adequately validate the lengths of commands received through a USB buffer. A device-provided command length can cause a matching command to be copied beyond its destination; the issue requires commands received from a USB device. The input does not specify an authentication requirement or additional user interaction.
Engineers running Linux kernels with the kvaser_usb_leaf driver should check their installations; affected versions were not provided.