staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ea707584bac187c9c6c64c4eacd1c09bcc08f37b · < dd9e1cf619c945f320e686dcaf13e37ef0b05fdd| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg()
In the ad9832_write_frequency() function, clk_get_rate() might return 0. This can lead to a division by zero when calling ad9832_calc_freqreg(). The check if (fout > (clk_get_rate(st->mclk) / 2)) does not protect against the case when fout is 0. The ad9832_write_frequency() function is called from ad9832_write(), and fout is derived from a text buffer, which can contain any value.
From the CVE record · Linux
The Linux kernel’s ad9832 frequency driver can divide by zero when its clock rate is 0. A write using a value derived from a text buffer can trigger the error; the input does not specify whether access is local or remote, whether authentication is required, or whether user interaction is needed.
Engineers running Linux kernels with the ad9832 frequency driver should check their installations; affected versions are not specified.