HID: haptic: don't write an uninitialized value to unhandled usages
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 |
|
|
6.18.527.2.67.3In the Linux kernel, the following vulnerability has been resolved:
HID: haptic: don't write an uninitialized value to unhandled usages
fill_effect_buf() initializes value only for the four haptic usages handled by its switch, but writes it to field->value[] for every usage. An unhandled usage can therefore receive either an uninitialized value or one left over from the previous usage. hid_output_report() then serializes that value into the effect's report buffer.
Skip unhandled usages instead. This also matches switch_mode(), which only updates fields it recognizes.
Found with Clang's -Wconditional-uninitialized.
From the CVE record · Linux
The HID haptic fill_effect_buf() function writes a value to report fields for usages it does not handle, even though that value may be uninitialized or left over from a previous usage. When an unhandled usage is present, hid_output_report() serializes the value into the effect's report buffer. The input does not specify an attack path, authentication requirement, or user interaction.
Engineers running Linux kernels with the affected HID haptic code should check their kernel packages; affected versions are not specified.