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:   Sat, 09 Dec 2023 23:24:48 -0800
From:   syzbot <syzbot+553d90297e6d2f50dbc7@...kaller.appspotmail.com>
To:     linux-kernel@...r.kernel.org
Subject: Re: [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in diNewExt

For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.

***

Subject: [jfs?] UBSAN: array-index-out-of-bounds in diNewExt
Author: eadavis@...com

please test array-index-out-of-bounds in diNewExt

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

diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index a037ee59e398..4e17e261de26 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -2179,6 +2179,11 @@ static int diNewExt(struct inomap * imap, struct iag * iagp, int extno)
 	/* get the ag and iag numbers for this iag.
 	 */
 	agno = BLKTOAG(le64_to_cpu(iagp->agstart), sbi);
+	printk("agno: %d, ipimap: %p, iagp: %p, sbi: %p, agl2s: %d\n", 
+			agno, ipimap, iagp, sbi, sbi->bmap->db_agl2size);
+	if (agno > MAXAG)
+		return -EINVAL;
+
 	iagno = le32_to_cpu(iagp->iagnum);
 
 	/* check if this is the last free extent within the
@@ -2357,6 +2362,8 @@ static int diNewExt(struct inomap * imap, struct iag * iagp, int extno)
 
 	/* update the free and backed inode counts for the ag.
 	 */
+	printk("agno: %d, ipimap: %p, iagp: %p, sbi: %p, agl2s: %d\n", 
+			agno, ipimap, iagp, sbi, sbi->bmap->db_agl2size);
 	imap->im_agctl[agno].numfree += (INOSPEREXT - 1);
 	imap->im_agctl[agno].numinos += INOSPEREXT;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ