can: peak_usb: add bounds check for USB channel index
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d8a199355f8f8a0797c00d98788d7282c9ea38bd · < 1acab790b7cecd4e144d1d18bdfe549e282f6b0b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
can: peak_usb: add bounds check for USB channel index
The channel control index ctrl_idx is derived from rx->len which comes directly from a device USB payload. The mask 0x0f allows values 0-15, but the array size of usb_if->dev[] is only 2. Values 2-15 cause heap out-of-bounds read, eventually causing kernel panic in the IRQ context.
Add bounds checking for ctrl_idx before the array access in both pcan_usb_pro_handle_canmsg() and pcan_usb_pro_handle_error().
From the CVE record · Linux
The Linux kernel peak_usb driver does not check a USB channel index before accessing a two-entry array. A device USB payload with an index from 2 to 15 can cause an out-of-bounds read and a kernel panic in IRQ context. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels that use the peak_usb CAN driver should check their installations; affected versions were not specified.