mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+968ecf5dc01b3e0148ec@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [hfs?] KMSAN: uninit-value in hfsplus_cat_bin_cmp_key
Date: Wed,  6 Nov 2024 14:31:48 +0800	[thread overview]
Message-ID: <tencent_536FC3A5A458D765576F66CF736AC3616905@qq.com> (raw)
In-Reply-To: <672af85a.050a0220.2edce.151c.GAE@google.com>

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


  reply	other threads:[~2024-11-06  6:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06  5:02 syzbot
2024-11-06  6:31 ` Edward Adam Davis [this message]
2024-11-06  7:20   ` syzbot
2024-11-06  9:58 ` [PATCH] hfsplus: add check for cat key length Edward Adam Davis
2024-11-06 21:48   ` [syzbot] [hfs?] KMSAN: uninit-value in hfsplus_cat_bin_cmp_key syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_536FC3A5A458D765576F66CF736AC3616905@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+968ecf5dc01b3e0148ec@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®