From: syzbot <syzbot+93f4402297a457fc6895@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: Re: [syzbot] KMSAN: uninit-value in hfsplus_cat_read_inode
Date: Fri, 17 Apr 2026 09:20:53 -0700 [thread overview]
Message-ID: <69e25de5.a00a0220.1bd0ca.000a.GAE@google.com> (raw)
In-Reply-To: <0000000000001db56d06076f6861@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Re: [syzbot] KMSAN: uninit-value in hfsplus_cat_read_inode
Author: tristmd@gmail.com
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>From c548b434d782cb365bfeae52c7278548b16d6e85 Mon Sep 17 00:00:00 2001
From: Tristan Madani <tristan@talencesecurity.com>
Date: Fri, 17 Apr 2026 16:15:17 +0000
Subject: [PATCH] hfsplus: initialize subfolders field when HAS_FOLDER_COUNT is
not set
hfsplus_cat_read_inode() only initializes the subfolders field when
the HFSPLUS_HAS_FOLDER_COUNT flag is set. When it is not set, the
field retains stale data from previous use, which KMSAN detects as
uninit-value during rename operations.
Add an else branch to zero-initialize subfolders when the flag is
not set.
Reported-by: syzbot+93f4402297a457fc6895@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=93f4402297a457fc6895
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
fs/hfsplus/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index d05891e..356847a 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -592,6 +592,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd)
if (folder->flags & cpu_to_be16(HFSPLUS_HAS_FOLDER_COUNT)) {
HFSPLUS_I(inode)->subfolders =
be32_to_cpu(folder->subfolders);
+ } else {
+ HFSPLUS_I(inode)->subfolders = 0;
}
inode->i_op = &hfsplus_dir_inode_operations;
inode->i_fop = &hfsplus_dir_operations;
--
2.47.3
prev parent reply other threads:[~2026-04-17 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 11:48 [syzbot] [hfs?] KMSAN: uninit-value in hfsplus_rename_cat syzbot
2024-12-12 8:22 ` [syzbot] Re: KMSAN: uninit-value in hfsplus_rename_cat() syzbot
2026-04-17 10:12 ` Forwarded: [PATCH] hfsplus: initialize subfolders field when HAS_FOLDER_COUNT is syzbot
2026-04-17 16:20 ` syzbot [this message]
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=69e25de5.a00a0220.1bd0ca.000a.GAE@google.com \
--to=syzbot+93f4402297a457fc6895@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.