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

From: syzbot
Date: Wed Jul 23 2025 - 21:53:08 EST


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

***

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

#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;