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