hwmon: (w83791d) remove fan/pwm 4-5 sysfs group on remove
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6e1ecd9b8f1358ed4d099f0c54434240dc40debe · < 2c381e6e0f033f2df13bd64905e7232c42f49009| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (w83791d) remove fan/pwm 4-5 sysfs group on remove
When the fan/pwm 4-5 pins are not used as GPIO, w83791d_probe() creates the w83791d_group_fanpwm45 sysfs group on the I2C client device.
The probe error path removes this group when a later initialization step fails, but the normal remove path only removes w83791d_group. As a result, the optional fan/pwm 4-5 sysfs files can remain after the driver is unbound.
The callbacks associated with these files access the driver data, which is devm allocated and released after driver unbind. Leaving the sysfs files behind can therefore result in accesses to stale driver data.
Remove w83791d_group_fanpwm45 during normal teardown as well.
This issue was found by manual code inspection.
From the CVE record · Linux
The w83791d hwmon driver can leave optional fan/pwm 4-5 sysfs files behind when the driver is unbound. If those pins are not used as GPIO, accessing the leftover files locally can cause callbacks to access stale driver data. The input does not specify authentication requirements.
Engineers running Linux kernels with the w83791d hwmon driver should check their affected versions; none are specified in the input.