hwmon: (powerz) Fix missing usb_kill_urb() on signal interrupt
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (powerz) Fix missing usb_kill_urb() on signal interrupt
wait_for_completion_interruptible_timeout() returns -ERESTARTSYS when interrupted. This needs to abort the URB and return an error. No data has been received from the device so any reads from the transfer buffer are invalid.
The original code tests !ret, which only catches the timeout case (0). On signal delivery (-ERESTARTSYS), !ret is false so the function skips usb_kill_urb() and falls through to read from the unfilled transfer buffer.
Fix by capturing the return value into a long (matching the function return type) and handling signal (negative) and timeout (zero) cases with separate checks that both call usb_kill_urb() before returning.
From the CVE record · Linux
The Linux kernel’s powerz hwmon driver can read an unfilled USB transfer buffer when a signal interrupts its wait for a device response. In that case, the driver fails to abort the USB request before reading the buffer. The input does not specify an attack route or authentication requirements.
Engineers running Linux kernels with the powerz hwmon driver should check their versions against the vendor advisory; affected versions were not provided.