From: Javier Garcia <rampxxxx@gmail.com>
To: slava@dubeyko.com, glaubitz@physik.fu-berlin.de, frank.li@vivo.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
shuah@kernel.org, Javier Garcia <rampxxxx@gmail.com>,
syzbot+e126b819d8187b282d44@syzkaller.appspotmail.com
Subject: [PATCH] hpfs: Initialize memory in `hfs_find_init`
Date: Sat, 27 Sep 2025 09:28:04 +0200 [thread overview]
Message-ID: <20250927072804.583940-1-rampxxxx@gmail.com> (raw)
Avoid the use of uninit-value in `hfsplys_strcasecmp` and `case_fold`.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-and-tested-by: syzbot+e126b819d8187b282d44@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e126b819d8187b282d44
Signed-off-by: Javier Garcia <rampxxxx@gmail.com>
---
fs/hfsplus/bfind.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfsplus/bfind.c b/fs/hfsplus/bfind.c
index 901e83d65d20..75f1c029c2ed 100644
--- a/fs/hfsplus/bfind.c
+++ b/fs/hfsplus/bfind.c
@@ -18,7 +18,7 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd)
fd->tree = tree;
fd->bnode = NULL;
- ptr = kmalloc(tree->max_key_len * 2 + 4, GFP_KERNEL);
+ ptr = kzalloc(tree->max_key_len * 2 + 4, GFP_KERNEL);
if (!ptr)
return -ENOMEM;
fd->search_key = ptr;
--
2.50.1
reply other threads:[~2025-09-27 7:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250927072804.583940-1-rampxxxx@gmail.com \
--to=rampxxxx@gmail.com \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=slava@dubeyko.com \
--cc=syzbot+e126b819d8187b282d44@syzkaller.appspotmail.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®