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: <000000000000ff8b0d06209263b3@google.com>
Date: Mon, 26 Aug 2024 02:02:55 -0700
From: syzbot <syzbot+d16facb00df3f446511c@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [jfs?] KASAN: slab-use-after-free Read in lmLogInit

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

***

Subject: Re: [syzbot] [jfs?] KASAN: slab-use-after-free Read in lmLogInit
Author: lizhi.xu@...driver.com

blk dev max sector is 0

#syz test: upstream df6cbc62cc9b

diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index 9609349e92e5..14404780f38d 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -1163,6 +1163,15 @@ static int open_inline_log(struct super_block *sb)
 
 	set_bit(log_INLINELOG, &log->flag);
 	log->bdev_file = sb->s_bdev_file;
+	printk("sb: %p, sb t: %s, sbf: %p, bdev1: %p, sbdev: %p, %s\n",
+		sb, sb->s_type->name, sb->s_bdev_file, file_bdev(sb->s_bdev_file), sb->s_bdev, __func__);
+
+	if (!bdev_nr_sectors(file_bdev(sb->s_bdev_file))) {
+		kfree(log);
+		jfs_warn("open_inline_log: block device max sector is 0");
+		return -EINVAL;
+	}
+
 	log->base = addressPXD(&JFS_SBI(sb)->logpxd);
 	log->size = lengthPXD(&JFS_SBI(sb)->logpxd) >>
 	    (L2LOGPSIZE - sb->s_blocksize_bits);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ