can: ems_usb: ems_usb_read_bulk_callback(): check the proper length of a message
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 702171adeed3607ee9603ec30ce081411e36ae42 · < 1cf469026d4a2308eaa91d04dca4a900d07a5c2e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
can: ems_usb: ems_usb_read_bulk_callback(): check the proper length of a message
When looking at the data in a USB urb, the actual_length is the size of the buffer passed to the driver, not the transfer_buffer_length which is set by the driver as the max size of the buffer.
When parsing the messages in ems_usb_read_bulk_callback() properly check the size both at the beginning of parsing the message to make sure it is big enough for the expected structure, and at the end of the message to make sure we don't overflow past the end of the buffer for the next message.
From the CVE record · Linux
The Linux kernel’s ems_usb driver checked the maximum USB buffer size instead of the amount of data actually received. A malformed USB message could cause the driver to parse beyond the received data. The input does not specify authentication or user-interaction requirements.
Engineers running Linux systems that use the ems_usb CAN driver should check their kernel version; affected versions were not provided.