USB: serial: io_ti: fix heap overflow in build_i2c_fw_hdr()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 294692d3296eee3391c348d7ea6401916d27806c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
USB: serial: io_ti: fix heap overflow in build_i2c_fw_hdr()
build_i2c_fw_hdr() allocates a fixed-size buffer of (16*1024 - 512) + sizeof(struct ti_i2c_firmware_rec) bytes, then copies le16_to_cpu(img_header->Length) bytes into it without validating that Length fits within the available space after the firmware record header.
img_header->Length is a __le16 from the firmware file and can be up to 65535. check_fw_sanity() validates the total firmware size but not img_header->Length specifically.
Fix by rejecting images where img_header->Length exceeds the available destination space.
From the CVE record · Linux
The Linux kernel USB serial io_ti driver copies a firmware header length into a fixed-size buffer without checking whether it fits. Processing a firmware image with an oversized length can cause a heap overflow. The input does not specify whether exploitation requires local access, authentication, or user interaction.
Engineers running Linux kernels with the USB serial io_ti driver should check their deployments; affected versions are not specified.