Edward Adam Davis
d02d8c1dac
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:46:14 +02:00
..
2024-05-17 11:50:55 +02:00
2023-02-01 08:27:06 +01:00
2024-06-16 13:39:53 +02:00
2023-09-23 11:09:54 +02:00
2024-07-27 10:46:12 +02:00
2024-03-06 14:38:50 +00:00
2024-02-23 08:55:09 +01:00
2024-07-05 09:14:40 +02:00
2023-03-10 09:39:50 +01:00
2022-12-31 13:14:15 +01:00
2022-11-10 18:15:37 +01:00
2024-01-25 14:52:27 -08:00
2022-02-01 17:27:01 +01:00
2023-09-19 12:22:52 +02:00
2024-06-16 13:39:16 +02:00
2024-01-25 14:52:33 -08:00
2024-03-15 10:48:15 -04:00
2024-03-01 13:21:56 +01:00
2024-04-10 16:19:21 +02:00
2023-09-23 11:09:57 +02:00
2024-06-16 13:40:00 +02:00
2024-07-05 09:14:28 +02:00
2024-04-10 16:18:35 +02:00
2021-10-04 22:13:12 +01:00
2024-04-10 16:18:38 +02:00
2024-06-16 13:39:20 +02:00
2023-03-10 09:39:57 +01:00
2024-07-27 10:46:14 +02:00
2024-03-06 14:38:50 +00:00
2023-12-08 08:48:05 +01:00
2024-04-13 13:01:44 +02:00
2024-01-25 14:52:29 -08:00
2024-07-18 13:07:29 +02:00
2024-07-05 09:14:14 +02:00
2024-02-23 08:54:51 +01:00
2024-07-05 09:14:37 +02:00
2024-04-27 17:05:23 +02:00
2022-04-13 20:59:10 +02:00
2021-12-29 12:28:59 +01:00
2024-07-05 09:14:50 +02:00
2021-10-04 22:02:17 +01:00
2024-07-05 09:14:21 +02:00
2024-07-18 13:07:43 +02:00
2023-09-19 12:22:27 +02:00
2024-04-10 16:19:19 +02:00
2022-11-26 09:24:52 +01:00
2024-07-18 13:07:35 +02:00
2024-07-05 09:14:45 +02:00
2024-06-16 13:39:16 +02:00
2024-07-18 13:07:29 +02:00
2023-11-28 16:56:29 +00:00
2024-07-05 09:14:21 +02:00
2024-04-13 13:01:43 +02:00
2021-09-21 08:36:48 -07:00
2024-03-26 18:21:27 -04:00
2023-07-23 13:47:33 +02:00
2023-09-19 12:22:30 +02:00
2021-12-14 10:57:12 +01:00
2023-02-22 12:57:07 +01:00
2024-04-27 17:05:28 +02:00
2024-04-13 13:01:44 +02:00
2023-09-23 11:10:02 +02:00
2024-04-10 16:18:35 +02:00
2024-07-05 09:14:28 +02:00
2024-04-10 16:19:38 +02:00
2023-09-19 12:22:52 +02:00
2024-02-23 08:54:32 +01:00
2024-03-01 13:21:43 +01:00
2024-04-10 16:18:46 +02:00
2023-09-23 11:10:01 +02:00
2023-10-06 13:18:24 +02:00
2022-11-03 23:59:12 +09:00
2022-06-09 10:22:26 +02:00
2022-12-31 13:14:39 +01:00
2022-11-26 09:24:51 +01:00
2022-12-31 13:14:30 +01:00
2022-04-08 14:24:18 +02:00
2022-09-28 11:11:56 +02:00
2024-07-27 10:46:13 +02:00
2023-09-19 12:22:30 +02:00
2024-06-16 13:39:15 +02:00
2024-04-10 16:19:31 +02:00
2024-03-26 18:21:14 -04:00
2022-10-26 12:34:58 +02:00
2024-07-27 10:46:09 +02:00
2023-07-23 13:47:34 +02:00
2023-11-20 11:08:13 +01:00
2023-12-08 08:48:04 +01:00
2023-08-30 16:18:19 +02:00
2024-02-23 08:54:25 +01:00
2024-04-10 16:19:01 +02:00
2021-10-18 20:22:03 -10:00
2022-12-31 13:14:03 +01:00
2024-07-27 10:46:06 +02:00
2022-12-14 11:37:31 +01:00
2023-01-12 11:59:20 +01:00
2024-02-23 08:54:26 +01:00
2024-01-25 14:52:35 -08:00
2024-07-05 09:14:50 +02:00
2024-04-10 16:19:42 +02:00
2023-01-12 11:58:47 +01:00
2022-07-02 16:41:17 +02:00
2022-07-02 16:41:14 +02:00
2022-12-19 12:36:39 +01:00
2022-07-21 21:24:14 +02:00
2024-03-26 18:21:15 -04:00
2022-07-12 16:35:08 +02:00
2021-12-14 10:57:15 +01:00
2022-10-26 12:34:17 +02:00
2022-04-27 14:38:57 +02:00
2023-05-24 17:36:54 +01:00
2023-08-11 15:13:58 +02:00
2022-04-27 14:38:50 +02:00
2024-07-18 13:07:42 +02:00
2022-12-31 13:14:01 +01:00