platform/chrome: sensorhub: Bound the EC-reported sensor number
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 145d59baff5944b71551ac518d7fd7d377a9c820 · < 5eaf7faa99578ae090030d1e2e6ea3b37a615496| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
platform/chrome: sensorhub: Bound the EC-reported sensor number
Each EC FIFO event carries an 8-bit sensor number (in->sensor_num). cros_ec_sensorhub_ring_handler() validates the FIFO event count, the per-read count and the ring bound, but not the sensor number, which cros_ec_sensor_ring_process_event() then uses unchecked to index sensorhub->batch_state[] - allocated with only sensorhub->sensor_num entries. A sensor number of sensor_num or larger is an out-of-bounds read and write of batch_state[].
Validate the sensor number in the ring handler, where each event is read from the EC, and drop a malformed event before it is used.
From the CVE record · Linux
The Linux kernel’s Chrome sensorhub does not validate sensor numbers in EC FIFO events before using them to index a sensor state array. A malformed event with a sensor number outside the array can cause an out-of-bounds read and write; the input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with the Chrome sensorhub should check their versions against the vendor advisory; affected versions are not specified.