iio: adc: nxp-sar-adc: fix division by zero in write_raw
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Original description
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: nxp-sar-adc: fix division by zero in write_raw
Add a validation check for the sampling frequency value before using it as a divisor. A user writing zero or a negative value to the sampling_frequency sysfs attribute triggers a division by zero in the kernel.
Also prevent unsigned integer underflow when the computed cycle count is smaller than NXP_SAR_ADC_CONV_TIME, which would wrap the u32 inpsamp to a huge value.
From the CVE record · Linux
References
- git.kernel.org/stable/c/cb6ea15e7d3c7518f806975a06b7d4c0a26402eaPatch
- git.kernel.org/stable/c/a9aba21a539c668a66b58eeb08ad3909e5a54c2aPatch
- github.com/CVEProject/cvelistV5/tree/main/cves/2026/63xxx/CVE-2026-63935.json
- nvd.nist.gov/vuln/detail/CVE-2026-63935
- git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git