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: <v2go5yn67ca5eivavmkwe62qbyhrynirmq7ipqjfy3kqbf6dgn@5t45szpytylc>
Date: Sun, 22 Sep 2024 21:26:20 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Dennis Lam <dennis.lamerice@...il.com>
Cc: linux-bcachefs@...r.kernel.org, linux-kernel@...r.kernel.org, 
	syzbot+24beef64217854da05a4@...kaller.appspotmail.com
Subject: Re: [PATCH] bcachefs: fix divide by zero error in util.c

On Sun, Sep 22, 2024 at 07:33:44PM GMT, Dennis Lam wrote:
> This patch aims to fix a bug found by syzbot where a crash occurs due to
> a divide by zero error in the bcachefs subsystem [1].
> 
> Bcachefs has a file called util.c that uses the function div_u64 to perform
> division using 64-bit values. The function's parameters uses a 64-bit dividend
> and a 32-bit divisor to perform its division, however sometimes in this file
> a 64-bit divisor is passed using this function. When in use, the 64-bit value
> is passed as a 32-bit value, creating the possibility of a division by zero error.
> 
> Therefore, this fix replaces the function div_u64 with div64_u64 where the
> dividend and divisor is a 64-bit value to perform the correct division.
> 
> [1] https://syzkaller.appspot.com/bug?extid=24beef64217854da05a4
> 
> Reported-and-tested-by: syzbot+24beef64217854da05a4@...kaller.appspotmail.com
> Signed-off-by: Dennis Lam <dennis.lamerice@...il.com>

We already have this, from Reed Riley

27663d7784b5 bcachefs: Replace div_u64 with div64_u64 where second param is u64

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ