Edward Adam Davis
c733e24a61
hfsplus: fix uninit-value in copy_name
...
[ Upstream commit 0570730c16307a72f8241df12363f76600baf57d ]
[syzbot reported]
BUG: KMSAN: uninit-value in sized_strscpy+0xc4/0x160
sized_strscpy+0xc4/0x160
copy_name+0x2af/0x320 fs/hfsplus/xattr.c:411
hfsplus_listxattr+0x11e9/0x1a50 fs/hfsplus/xattr.c:750
vfs_listxattr fs/xattr.c:493 [inline]
listxattr+0x1f3/0x6b0 fs/xattr.c:840
path_listxattr fs/xattr.c:864 [inline]
__do_sys_listxattr fs/xattr.c:876 [inline]
__se_sys_listxattr fs/xattr.c:873 [inline]
__x64_sys_listxattr+0x16b/0x2f0 fs/xattr.c:873
x64_sys_call+0x2ba0/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:195
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was created at:
slab_post_alloc_hook mm/slub.c:3877 [inline]
slab_alloc_node mm/slub.c:3918 [inline]
kmalloc_trace+0x57b/0xbe0 mm/slub.c:4065
kmalloc include/linux/slab.h:628 [inline]
hfsplus_listxattr+0x4cc/0x1a50 fs/hfsplus/xattr.c:699
vfs_listxattr fs/xattr.c:493 [inline]
listxattr+0x1f3/0x6b0 fs/xattr.c:840
path_listxattr fs/xattr.c:864 [inline]
__do_sys_listxattr fs/xattr.c:876 [inline]
__se_sys_listxattr fs/xattr.c:873 [inline]
__x64_sys_listxattr+0x16b/0x2f0 fs/xattr.c:873
x64_sys_call+0x2ba0/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:195
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
[Fix]
When allocating memory to strbuf, initialize memory to 0.
Reported-and-tested-by: syzbot+efde959319469ff8d4d7@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Link: https://lore.kernel.org/r/tencent_8BBB6433BC9E1C1B7B4BDF1BF52574BA8808@qq.com
Reported-and-tested-by: syzbot+01ade747b16e9c8030e0@syzkaller.appspotmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-27 10:38:32 +02:00
..
2024-05-17 11:43:53 +02:00
2023-02-06 07:52:36 +01:00
2024-06-16 13:28:48 +02:00
2023-09-23 11:00:02 +02:00
2021-01-06 14:48:39 +01:00
2024-05-25 16:17:18 +02:00
2024-03-06 14:36:10 +00:00
2024-02-23 08:25:03 +01:00
2024-05-25 16:17:17 +02:00
2023-03-11 16:43:56 +01:00
2023-01-18 11:41:09 +01:00
2021-09-12 08:56:38 +02:00
2023-09-23 10:59:40 +02:00
2022-02-01 17:24:34 +01:00
2023-09-23 10:59:55 +02:00
2024-06-16 13:28:32 +02:00
2020-12-02 08:49:53 +01:00
2023-09-23 10:59:36 +02:00
2023-09-23 11:00:04 +02:00
2024-06-16 13:28:52 +02:00
2024-06-16 13:28:49 +02:00
2024-04-13 12:51:23 +02:00
2021-09-22 12:26:25 +02:00
2024-04-13 12:51:25 +02:00
2024-05-17 11:43:50 +02:00
2023-03-11 16:43:59 +01:00
2024-07-27 10:38:32 +02:00
2021-04-14 08:24:14 +02:00
2024-03-06 14:36:10 +00:00
2024-03-01 13:13:35 +01:00
2024-04-13 12:51:38 +02:00
2024-01-25 14:34:20 -08:00
2024-07-18 11:40:49 +02:00
2024-07-05 09:08:15 +02:00
2024-02-23 08:25:03 +01:00
2023-09-23 10:59:48 +02:00
2022-04-15 14:18:35 +02:00
2024-07-05 09:08:32 +02:00
2020-12-30 11:51:22 +01:00
2023-11-28 16:50:21 +00:00
2024-07-18 11:40:56 +02:00
2023-09-23 10:59:38 +02:00
2023-07-27 08:37:26 +02:00
2022-11-25 17:42:22 +01:00
2024-07-05 09:08:18 +02:00
2023-06-09 10:29:01 +02:00
2024-06-16 13:28:32 +02:00
2024-07-18 11:40:49 +02:00
2023-12-08 08:44:27 +01:00
2024-07-05 09:08:18 +02:00
2024-02-23 08:24:55 +01:00
2021-09-30 10:09:26 +02:00
2024-03-26 18:22:20 -04:00
2020-10-29 09:57:53 +01:00
2023-09-23 10:59:40 +02:00
2020-08-26 10:40:51 +02:00
2023-02-22 12:50:39 +01:00
2024-05-02 16:18:32 +02:00
2024-04-13 12:51:38 +02:00
2023-09-23 11:00:06 +02:00
2024-04-13 12:51:23 +02:00
2024-07-05 09:08:21 +02:00
2020-08-21 13:05:37 +02:00
2023-09-23 10:59:55 +02:00
2023-06-28 10:18:42 +02:00
2024-04-13 12:51:29 +02:00
2023-09-23 11:00:06 +02:00
2023-01-18 11:41:46 +01:00
2023-10-10 21:46:42 +02:00
2021-10-06 15:42:35 +02:00
2023-01-18 11:41:46 +01:00
2023-01-18 11:41:33 +01:00
2024-01-08 11:29:48 +01:00
2022-11-25 17:42:22 +01:00
2023-01-18 11:41:25 +01:00
2024-02-23 08:25:15 +01:00
2020-12-11 13:23:30 +01:00
2020-10-29 09:57:45 +01:00
2022-06-14 18:11:41 +02:00
2024-07-27 10:38:32 +02:00
2021-04-14 08:24:11 +02:00
2023-09-23 10:59:40 +02:00
2023-06-28 10:18:35 +02:00
2024-04-13 12:51:31 +02:00
2021-09-15 09:47:28 +02:00
2024-03-26 18:22:13 -04:00
2022-05-25 09:14:34 +02:00
2024-07-27 10:38:29 +02:00
2020-04-17 10:50:21 +02:00
2023-07-27 08:37:25 +02:00
2023-05-17 11:35:58 +02:00
2024-02-23 08:24:49 +01:00
2023-07-27 08:37:26 +02:00
2024-06-16 13:28:48 +02:00
2023-01-18 11:40:55 +01:00
2024-07-27 10:38:28 +02:00
2023-01-18 11:41:59 +01:00
2024-02-23 08:24:49 +01:00
2021-08-26 08:36:22 -04:00
2024-07-05 09:08:31 +02:00
2021-08-12 13:21:02 +02:00
2023-01-18 11:41:44 +01:00
2021-03-17 17:03:33 +01:00
2021-04-21 12:56:16 +02:00
2024-03-26 18:22:13 -04:00
2021-07-20 16:10:54 +02:00
2022-09-05 10:27:47 +02:00
2022-10-17 17:24:32 +02:00
2022-04-27 13:50:48 +02:00
2023-05-30 12:44:07 +01:00
2023-08-11 11:53:59 +02:00
2023-12-08 08:44:27 +01:00
2022-10-26 13:22:21 +02:00
2023-01-18 11:40:53 +01:00