Fix error handling in HID device probe functions
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 0 repliesNew
- v14 patches 0 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | hwmon: (corsair-cpro) Stop device IO before calling hid_hw_stopdrivers/ | +1 | 0 replies | |
| 2/4 | hwmon: (gigabyte_waterforce) Stop device IO before calling hid_hw_stopdrivers/ | +3 | 0 replies | |
| 3/4 | hwmon: (nzxt-smart2) Stop device IO before calling hid_hw_stopdrivers/ | +1 | 0 replies | |
| 4/4 | hwmon: (nzxt-kraken3) Stop device IO before calling hid_hw_stopdrivers/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/4] Fix error handling in HID device probe functions
Calling hid_hw_stop() does not stop the device IO.
This results in a race condition between hid_input_report() and the point immediately following the execution of hid_device_io_start() within driver probe functions. If the probe operation fails after "io start" has been initiated, this race condition will result in a UAF vulnerability.
Fix the problem by calling hid_device_io_stop() before calling hid_hw_stop() in affected hardware monitoring drivers.
v2: Call hid_device_io_stop() only if hid_device_io_start() has been called
----------------------------------------------------------------
Guenter Roeck (4):
hwmon: (corsair-cpro) Stop device IO before calling hid_hw_stop
hwmon: (gigabyte_waterforce) Stop device IO before calling hid_hw_stop
hwmon: (nzxt-smart2) Stop device IO before calling hid_hw_stop
hwmon: (nzxt-kraken3) Stop device IO before calling hid_hw_stop
drivers/hwmon/corsair-cpro.c | 1 + drivers/hwmon/gigabyte_waterforce.c | 4 +++- drivers/hwmon/nzxt-kraken3.c | 6 ++++-- drivers/hwmon/nzxt-smart2.c | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-)