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]
Message-ID: <20241129015151.595085-1-lizhi.xu@windriver.com>
Date: Fri, 29 Nov 2024 09:51:51 +0800
From: Lizhi Xu <lizhi.xu@...driver.com>
To: <syzbot+99491d74a9931659cf48@...kaller.appspotmail.com>
CC: <jfs-discussion@...ts.sourceforge.net>, <linux-kernel@...r.kernel.org>,
        <shaggy@...nel.org>, <syzkaller-bugs@...glegroups.com>
Subject: Re: [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dtSplitRoot (2)

The index of the slot maybe out of bound, add a check for it.

#syz test

diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
index 8f85177f284b..71463ad751c2 100644
--- a/fs/jfs/jfs_dtree.c
+++ b/fs/jfs/jfs_dtree.c
@@ -1994,6 +1994,9 @@ static int dtSplitRoot(tid_t tid,
 
 		stbl = DT_GETSTBL(rp);
 		for (n = 0; n < rp->header.nextindex; n++) {
+			if (stbl[n] >= ARRAY_SIZE(rp->slot))
+				continue;
+
 			ldtentry = (struct ldtentry *) & rp->slot[stbl[n]];
 			modify_index(tid, ip, le32_to_cpu(ldtentry->index),
 				     rbn, n, &mp, &lblock);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ