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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_5074A97043AAA456F764576E46C7137EC305@qq.com>
Date: Tue, 12 Nov 2024 15:52:23 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+96d5d14c47d97015c624@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [nilfs?] KASAN: use-after-free Read in nilfs_find_entry

next de space is not enough

#syz test

diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index a8602729586a..09a24c81dc7d 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -317,7 +317,7 @@ struct nilfs_dir_entry *nilfs_find_entry(struct inode *dir,
 
 		de = (struct nilfs_dir_entry *)kaddr;
 		kaddr += nilfs_last_byte(dir, n) - reclen;
-		while ((char *)de <= kaddr) {
+		while ((char *)de + sizeof(*de) <= kaddr) {
 			if (de->rec_len == 0) {
 				nilfs_error(dir->i_sb,
 					    "zero-length directory entry");


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ