iio: adc: ti-ads1298: add bounds check to pga_settings index
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: ti-ads1298: add bounds check to pga_settings index
ads1298_pga_settings has 7 elements but ADS1298_MASK_CH_PGA can yield values 0-7. If it yields a value >= 7, this causes an out-of-bounds array access. Add a bounds check and return -EINVAL if the index is out of range.
Note that the remaining value b111 is reserved so should not be seen in a correctly functioning system.
From the CVE record · Linux
The Linux kernel’s ti-ads1298 ADC driver can read past the end of a seven-element array if a PGA setting has the reserved value 7. The input does not describe how an attacker could cause this value or specify authentication or user-interaction requirements; it says the value should not occur in a correctly functioning system.
Engineers running Linux kernels with the ti-ads1298 ADC driver should check whether their kernel is affected; affected versions are not specified.