iio: adc: ad7124: fix division by zero in ad7124_set_channel_odr()
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: ad7124: fix division by zero in ad7124_set_channel_odr()
In the ad7124_write_raw() function, parameter val can potentially be zero. This may lead to a division by zero when DIV_ROUND_CLOSEST() is called within ad7124_set_channel_odr(). The ad7124_write_raw() function is invoked through the sequence: iio_write_channel_raw() -> iio_write_channel_attribute() -> iio_channel_write(), with no checks in place to ensure val is non-zero.
From the CVE record · Linux
The Linux kernel's ad7124 ADC driver can divide by zero when a channel write supplies a zero value. The input does not specify the resulting impact or whether an attacker needs local access, authentication, or user interaction.
Engineers running the Linux kernel with the ad7124 ADC driver should check their deployments; affected versions are not specified.