hwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5b46903d8bf372e563bf2150d46b87fff197a109 · < 82163d63ae7a4c36142cd252388737205bb7e4b9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur
scsi_execute_cmd() function can return both negative (linux codes) and positive (scsi_cmnd result field) error codes.
Currently the driver just passes error codes of scsi_execute_cmd() to hwmon core, which is incorrect because hwmon only checks for negative error codes. This leads to hwmon reporting uninitialized data to userspace in case of SCSI errors (for example if the disk drive was disconnected).
This patch checks scsi_execute_cmd() output and returns -EIO if it's error code is positive.
[groeck: Avoid inline variable declaration for portability]
From the CVE record · Linux
The Linux kernel drivetemp driver can report uninitialized data to userspace when a SCSI error occurs, such as after a disk drive is disconnected. The input does not describe an attacker path or specify authentication or user-interaction requirements.
Engineers running Linux kernels with the drivetemp driver should check their installations; affected versions are not specified.