1
linux/drivers/staging
Zicheng Qu 6bd301819f 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.

Link: https://lore.kernel.org/all/2024100904-CVE-2024-47663-9bdc@gregkh/
Fixes: ea707584ba ("Staging: IIO: DDS: AD9832 / AD9835 driver")
Cc: stable@vger.kernel.org
Signed-off-by: Zicheng Qu <quzicheng@huawei.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20241022134354.574614-1-quzicheng@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-10-24 18:30:47 +01:00
..
axis-fifo
fbtft staging: fbtft: Use backlight power constants 2024-08-13 11:26:12 +02:00
fieldbus driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
gdm724x
greybus Revert "staging: greybus: Fix capitalization and punctuation inconsistencies" 2024-09-11 15:56:26 +02:00
iio staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg() 2024-10-24 18:30:47 +01:00
media move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
most staging: most: video: Fixed minor capitalization and grammatical issues 2024-07-30 09:20:26 +02:00
nvec staging: nvec: Use IRQF_NO_AUTOEN flag in request_irq() 2024-09-13 07:30:23 +02:00
octeon netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
olpc_dcon staging: olpc_dcon: Use backlight power constants 2024-08-13 11:26:13 +02:00
rtl8192e move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rtl8712 staging: rtl8712: remove unused drvinfo_sz from update_recvframe_attrib 2024-09-13 07:31:55 +02:00
rtl8723bs move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rts5208
sm750fb
vc04_services staging: vchiq_core: Pass enumerated flag instead of int 2024-09-11 15:54:04 +02:00
vme_user staging: vme_user: changed geoid data type from int to u32 2024-09-05 16:45:01 +02:00
vt6655 staging: vt6655: Rename variable apTD1Rings 2024-09-13 07:32:50 +02:00
vt6656 Staging driver updates for 6.11-rc1 2024-07-19 15:46:29 -07:00
Kconfig staging: ks7010: Remove unused driver 2024-07-30 09:21:00 +02:00
Makefile staging: ks7010: Remove unused driver 2024-07-30 09:21:00 +02:00