[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_536FC3A5A458D765576F66CF736AC3616905@qq.com>
Date: Wed, 6 Nov 2024 14:31:48 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+968ecf5dc01b3e0148ec@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [hfs?] KMSAN: uninit-value in hfsplus_cat_bin_cmp_key
bnode's record key length is smaller than 8?
#syz test
diff --git a/fs/hfsplus/bfind.c b/fs/hfsplus/bfind.c
index 901e83d65d20..70deb143e518 100644
--- a/fs/hfsplus/bfind.c
+++ b/fs/hfsplus/bfind.c
@@ -116,7 +116,8 @@ int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd,
rec = (e + b) / 2;
len = hfs_brec_lenoff(bnode, rec, &off);
keylen = hfs_brec_keylen(bnode, rec);
- if (keylen == 0) {
+ printk("keylen: %u, off: %u, key: %p, %s\n", keylen, off, fd->key, __func__);
+ if (keylen < 8) {
res = -EINVAL;
goto fail;
}
Powered by blists - more mailing lists