HID: wacom: Fix OOB write in wacom_hid_set_device_mode()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5ae6e89f7409cb5d218bb728326eba9c650d9700 · < b8338111e14183972359009c12d0dbd81d2e1e16| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
HID: wacom: Fix OOB write in wacom_hid_set_device_mode()
wacom_hid_set_device_mode() currently assumes that the HID_DG_INPUTMODE usage is always located in the first field (field[0]) of the feature report. However, a device can specify HID_DG_INPUTMODE in a different field.
If HID_DG_INPUTMODE is in a field other than the first one and the first field has a report_count smaller than the usage_index of HID_DG_INPUTMODE, this leads to an out-of-bounds write to r->field[0]->value.
Fix this by storing the field index of HID_DG_INPUTMODE in 'struct hid_data' during feature mapping. In wacom_hid_set_device_mode(), use this stored field index to access the correct field and add bounds checks to ensure both the field index and the value index are within valid ranges before writing.
From the CVE record · Linux
The Linux kernel’s Wacom HID driver can write out of bounds when setting device mode. This occurs when a device places HID_DG_INPUTMODE outside the first feature-report field and the first field’s report_count is smaller than its usage index. The input does not establish whether exploitation requires authentication or user interaction.
Engineers running Linux kernels with the Wacom HID driver should check their kernel version; affected versions are not specified.