Executive brief
A vulnerability was identified in the Linux kernel's driver for the Texas Instruments ADS1298 Analog-to-Digital Converter (ADC). This component is typically used in medical instrumentation and high-precision data acquisition systems. An exploit could lead to an out-of-bounds memory access, potentially causing a system crash or unpredictable behavior in devices using this specific hardware.
Technical details
The vulnerability exists in the `ads1298_get_scale` function within `drivers/iio/adc/ti-ads1298.c`. The `ads1298_pga_settings` array contains 7 elements, but the `ADS1298_MASK_CH_PGA` bitmask can return values ranging from 0 to 7. When a value of 7 is encountered (a reserved bit pattern `b111`), the driver attempts to access the array out-of-bounds. This is a classic array index error that can lead to kernel memory corruption or a denial-of-service (kernel panic). The fix introduces a proper bounds check using `ARRAY_SIZE` and returns `-EINVAL` if the index is invalid.
Affected products
- Linux Linux 6.12.95, 6.18.37, 7.0.14, 7.1.2, 7.2-rc1
Timeline
- 2026-07-19: disclosed
- 2026-07-19: advisory
References
- https://git.kernel.org/stable/c/95e8a48d7a85d4226934020e57815a3316d3a14b
- https://git.kernel.org/stable/c/abd776ded3e256889610595290f6ca46cb6e91ab
- https://git.kernel.org/stable/c/abe0854e356b1bb814393ca884cb42b3eb12ce10
- https://git.kernel.org/stable/c/d08d82d83ed45fd8c001a9df66ad7ebb86c9d6c6
- https://git.kernel.org/stable/c/d5793975fc3b1780ba576812158ef22e3104e60e