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