Forwarded: Re: [syzbot] [hfs?] KASAN: out-of-bounds Read in hfs_bnode_move

syzbot posted 1 patch 2 months, 2 weeks ago
Forwarded: Re: [syzbot] [hfs?] KASAN: out-of-bounds Read in hfs_bnode_move
Posted by syzbot 2 months, 2 weeks ago
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [hfs?] KASAN: out-of-bounds Read in hfs_bnode_move
Author: lizhi.xu@windriver.com

#syz test

diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c
index cb823a8a6ba9..58c5cc7adf70 100644
--- a/fs/hfs/bnode.c
+++ b/fs/hfs/bnode.c
@@ -134,7 +134,7 @@ void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len)
 	void *ptr;
 
 	hfs_dbg(BNODE_MOD, "movebytes: %u,%u,%u\n", dst, src, len);
-	if (!len)
+	if (len <= 0)
 		return;
 	src += node->page_offset;
 	dst += node->page_offset;