usb: potential integer overflow in usbg_make_tpg()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c52661d60f636d17e26ad834457db333bd1df494 · < 358d5ba08f1609c34a054aed88c431844d09705a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: potential integer overflow in usbg_make_tpg()
The variable tpgt in usbg_make_tpg() is defined as unsigned long and is assigned to tpgt->tport_tpgt, which is defined as u16. This may cause an integer overflow when tpgt is greater than USHRT_MAX (65535). I haven't tried to trigger it myself, but it is possible to trigger it by calling usbg_make_tpg() with a large value for tpgt.
I modified the type of tpgt to match tpgt->tport_tpgt and adjusted the relevant code accordingly.
This patch is similar to commit 59c816c1f24d ("vhost/scsi: potential memory corruption").
From the CVE record · Linux
The Linux kernel's usbg_make_tpg() can overflow when called with a tpgt value greater than 65535, because the value is assigned to a 16-bit field. The input does not establish whether an attacker can trigger this, or whether network access, authentication, or user interaction is required.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions are not specified.