iio: light: veml6030: fix IIO device retrieval from embedded device
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7b779f573c48e1ad6da1d6ea5f181f3ecd666bf6 · < c7c44e57750c31de43906d97813273fdffcf7d02| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: light: veml6030: fix IIO device retrieval from embedded device
The dev pointer that is received as an argument in the in_illuminance_period_available_show function references the device embedded in the IIO device, not in the i2c client.
dev_to_iio_dev() must be used to accessthe right data. The current implementation leads to a segmentation fault on every attempt to read the attribute because indio_dev gets a NULL assignment.
This bug has been present since the first appearance of the driver, apparently since the last version (V6) before getting applied. A constant attribute was used until then, and the last modifications might have not been tested again.
From the CVE record · Linux
The Linux kernel’s veml6030 light sensor driver retrieves the wrong device when reading the illuminance-period-available attribute. An attempt to read that attribute causes a segmentation fault; the input does not specify authentication requirements.
Engineers running Linux kernels with the veml6030 driver should check their kernel version; affected versions are not specified.