CVE-2026-142957: iio: temperature: hid-sensor-temperature: Use per-instance callbacks
In the Linux kernel, the following vulnerability has been resolved:
iio: temperature: hid-sensor-temperature: Use per-instance callbacks
hid-sensor-temperature keeps a single static struct hidsensorhubcallbacks for all instances and overwrites its pdev in every probe. With two temperature sensors, input reports for one are delivered with the other's platform device; once that device is removed, platformgetdrvdata() returns NULL and temperaturecapturesample() dereferences it:
BUG: kernel NULL pointer dereference, address: 00000000000003a8 RIP: 0010:temperaturecapturesample+0xd/0x50 [hidsensortemperature]
The oops happens in sensorhubrawevent() with the hub's spinlock held, so the hub's removal then hangs. It reproduces with two uhid devices that each declare a temperature sensor, one destroyed while the other still sends input reports.
Keep the callbacks in struct temperaturestate, as the other HID sensor drivers (accel, gyro, als, ...) do.
Affected Software
Event History
Frequently Asked Questions
What systems are exposed to this issue?
Systems using the Linux HID temperature sensor driver with more than one temperature-sensor instance can be exposed. The failure is triggered when one sensor instance is removed while another continues sending input reports.
What does an attacker or triggering condition need to exploit it?
The condition requires two HID temperature sensors, or equivalent uhid devices declaring temperature sensors. One device must be destroyed or removed while the other still delivers input reports.
What is the operational impact?
Input reports can be associated with the wrong platform device, causing temperature_capture_sample() to dereference a NULL driver-data pointer after a device is removed. The resulting kernel oops occurs while the sensor hub spinlock is held, and subsequent hub removal can hang.
What should be done if an update cannot be applied immediately?
Avoid configurations that expose multiple HID temperature sensor instances concurrently, particularly workflows that remove one sensor while another remains active and sending reports.