lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241022210602.691d6351@jic23-huawei>
Date: Tue, 22 Oct 2024 21:06:02 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Zicheng Qu <quzicheng@...wei.com>, lars@...afoo.de,
 Michael.Hennerich@...log.com, gregkh@...uxfoundation.org,
 linux-iio@...r.kernel.org, linux-staging@...ts.linux.dev,
 linux-kernel@...r.kernel.org, tanghui20@...wei.com, zhangqiao22@...wei.com,
 judy.chenhui@...wei.com
Subject: Re: [PATCH] drivers/staging/iio/frequency/ad9832.c: fix division by
 zero in ad9832_calc_freqreg()

On Tue, 22 Oct 2024 17:25:21 +0300
Dan Carpenter <dan.carpenter@...aro.org> wrote:

> It would be better if the subject prefix were "staging: iio: ad9832:"
> 
> [PATCH] staging: iio: ad9832: fix division by zero in ad9832_calc_freqreg()
Keep the frequency as well, though less important in staging as we
have only a few drivers there.

I fixed up the patch title and applied this to the fixes-togreg branch of iio.git.

Thanks,

Jonathan

> 
> On Tue, Oct 22, 2024 at 01:43:54PM +0000, Zicheng Qu wrote:
> > 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: ea707584bac1 ("Staging: IIO: DDS: AD9832 / AD9835 driver")
> > Cc: <stable@...r.kernel.org>
> > Signed-off-by: Zicheng Qu <quzicheng@...wei.com>  
> 
> Otherwise it looks good.
> 
> Reviewed-by: Dan Carpenter <dan.carpenter@...aro.org>
> 
> regards,
> dan carpenter
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ