[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <673cbcc6.050a0220.87769.0079.GAE@google.com>
Date: Tue, 19 Nov 2024 08:28:54 -0800
From: syzbot <syzbot+b9704899e166798d57c9@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] Re: KASAN: use-after-free Read in ocfs2_search_dirblock()
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com.
***
Subject: Re: KASAN: use-after-free Read in ocfs2_search_dirblock()
Author: dmantipov@...dex.ru
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 158f238aa69d91ad74e535c73f552bd4b025109c
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index 213206ebdd58..7a8040a47e82 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -378,7 +378,7 @@ static inline int ocfs2_search_dirblock(struct buffer_head *bh,
/* prevent looping on a bad block */
de_len = le16_to_cpu(de->rec_len);
- if (de_len <= 0) {
+ if (de_len <= 0 || de_len > sizeof(*de)) {
ret = -1;
goto bail;
}
Powered by blists - more mailing lists