In the Linux kernel, the following vulnerability has been resolved:
hfsplus: fix uninit-value in copy_name
[syzbot reported]
BUG: KMSAN: uninit-value in sized_strscpy+0xc4/0x160sized_strscpy+0xc4/0x160copy_name+0x2af/0x320fs/hfsplus/xattr.c:411hfsplus_listxattr+0x11e9/0x1a50fs/hfsplus/xattr.c:750vfs_listxattrfs/xattr.c:493[inline]listxattr+0x1f3/0x6b0fs/xattr.c:840path_listxattrfs/xattr.c:864[inline]__do_sys_listxattrfs/xattr.c:876[inline]__se_sys_listxattrfs/xattr.c:873[inline]__x64_sys_listxattr+0x16b/0x2f0fs/xattr.c:873x64_sys_call+0x2ba0/0x3b50arch/x86/include/generated/asm/syscalls_64.h:195do_syscall_x64arch/x86/entry/common.c:52[inline]do_syscall_64+0xcf/0x1e0arch/x86/entry/common.c:83entry_SYSCALL_64_after_hwframe+0x77/0x7fUninit was created at:slab_post_alloc_hookmm/slub.c:3877[inline]slab_alloc_nodemm/slub.c:3918[inline]kmalloc_trace+0x57b/0xbe0mm/slub.c:4065kmallocinclude/linux/slab.h:628[inline]hfsplus_listxattr+0x4cc/0x1a50fs/hfsplus/xattr.c:699vfs_listxattrfs/xattr.c:493[inline]listxattr+0x1f3/0x6b0fs/xattr.c:840path_listxattrfs/xattr.c:864[inline]__do_sys_listxattrfs/xattr.c:876[inline]__se_sys_listxattrfs/xattr.c:873[inline]__x64_sys_listxattr+0x16b/0x2f0fs/xattr.c:873x64_sys_call+0x2ba0/0x3b50arch/x86/include/generated/asm/syscalls_64.h:195do_syscall_x64arch/x86/entry/common.c:52[inline]do_syscall_64+0xcf/0x1e0arch/x86/entry/common.c:83entry_SYSCALL_64_after_hwframe+0x77/0x7f
[Fix]
When allocating memory to strbuf, initialize memory to 0.