Re: [syzbot] [hfs?] KMSAN: uninit-value in __hfsplus_ext_cache_extent
From: Edward Adam Davis
Date: Thu Dec 28 2023 - 08:29:38 EST
please test uninit-value in __hfsplus_ext_cache_extent
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fbafc3e621c3
diff --git a/fs/hfsplus/bfind.c b/fs/hfsplus/bfind.c
index ca2ba8c9f82e..9d4ffff6d42e 100644
--- a/fs/hfsplus/bfind.c
+++ b/fs/hfsplus/bfind.c
@@ -23,6 +23,7 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd)
return -ENOMEM;
fd->search_key = ptr;
fd->key = ptr + tree->max_key_len + 2;
+ fd->key->ext.fork_type = 0;
hfs_dbg(BNODE_REFS, "find_init: %d (%p)\n",
tree->cnid, __builtin_return_address(0));
switch (tree->cnid) {