Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | From | Edward Adam Davis <> | Subject | Re: [syzbot] [hfs?] KMSAN: uninit-value in hfsplus_listxattr (2) | Date | Tue, 9 Apr 2024 18:05:30 +0800 |
| |
please test uini in hfsplus_listxattr
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fec50db7033e
diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c index 9c9ff6b8c6f7..858029b1c173 100644 --- a/fs/hfsplus/xattr.c +++ b/fs/hfsplus/xattr.c @@ -698,7 +698,7 @@ ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size) return err; } - strbuf = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + + strbuf = kzalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + XATTR_MAC_OSX_PREFIX_LEN + 1, GFP_KERNEL); if (!strbuf) { res = -ENOMEM;
| ![\](/images/icornerr.gif) |