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] [thread-next>] [day] [month] [year] [list]
Date: Mon,  6 May 2024 19:34:55 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+594427aebfefeebe91c6@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bcachefs?] UBSAN: shift-out-of-bounds in rewrite_old_nodes_pred

please test oob in rewrite_old_nodes_pred

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7367539ad4b0

diff --git a/fs/bcachefs/bkey.c b/fs/bcachefs/bkey.c
index 76e79a15ba08..1b2cb956b2e0 100644
--- a/fs/bcachefs/bkey.c
+++ b/fs/bcachefs/bkey.c
@@ -577,7 +577,7 @@ static void set_format_field(struct bkey_format *f, enum bch_bkey_fields i,
 	unsigned unpacked_bits = bch2_bkey_format_current.bits_per_field[i];
 	u64 unpacked_max = ~((~0ULL << 1) << (unpacked_bits - 1));
 
-	bits = min(bits, unpacked_bits);
+	bits = min3(bits, unpacked_bits, 63);
 
 	offset = bits == unpacked_bits ? 0 : min(offset, unpacked_max - ((1ULL << bits) - 1));
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ