syzbot


KMSAN: uninit-value in _copy_to_iter

Status: closed as invalid on 2018/04/22 15:44
Subsystems: crypto
[Documentation on labels]
First crash: 2152d, last: 2137d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in _copy_to_iter (3) can C 155 1314d 1315d 0/26 auto-obsoleted due to no activity on 2022/12/09 13:47
upstream KMSAN: uninit-value in _copy_to_iter (2) kvm net virtualization C 226 2090d 2135d 8/26 fixed on 2018/07/09 18:05

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in copyout lib/iov_iter.c:140 [inline]
BUG: KMSAN: uninit-value in _copy_to_iter+0x46d/0x28f0 lib/iov_iter.c:571
CPU: 1 PID: 3576 Comm: syzkaller424635 Not tainted 4.16.0+ #83
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x185/0x1d0 lib/dump_stack.c:53
 kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
 kmsan_internal_check_memory+0x125/0x1d0 mm/kmsan/kmsan.c:1157
 kmsan_copy_to_user+0x69/0x160 mm/kmsan/kmsan.c:1199
 copyout lib/iov_iter.c:140 [inline]
 _copy_to_iter+0x46d/0x28f0 lib/iov_iter.c:571
 copy_to_iter include/linux/uio.h:106 [inline]
 memcpy_to_msg include/linux/skbuff.h:3314 [inline]
 hash_recvmsg+0x88e/0xd50 crypto/algif_hash.c:226
 hash_recvmsg_nokey+0x129/0x160 crypto/algif_hash.c:371
 sock_recvmsg_nosec net/socket.c:803 [inline]
 sock_recvmsg net/socket.c:810 [inline]
 sock_read_iter+0x405/0x480 net/socket.c:887
 call_read_iter include/linux/fs.h:1776 [inline]
 new_sync_read fs/read_write.c:401 [inline]
 __vfs_read+0x6fb/0x8e0 fs/read_write.c:413
 vfs_read+0x36c/0x6c0 fs/read_write.c:447
 SYSC_read+0x172/0x360 fs/read_write.c:573
 SyS_read+0x55/0x80 fs/read_write.c:566
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x440c89
RSP: 002b:00000000007dff78 EFLAGS: 00000207 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007ffdfcb17250 RCX: 0000000000440c89
RDX: 00000000000000a6 RSI: 00000000200000c0 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000120080522 R09: 0000000120080522
R10: 0000000120080522 R11: 0000000000000207 R12: 0000000000402420
R13: 00000000004024b0 R14: 0000000000000000 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
 kmsan_save_stack mm/kmsan/kmsan.c:293 [inline]
 kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684
 kmsan_memcpy_origins+0x11d/0x170 mm/kmsan/kmsan.c:526
 __msan_memcpy+0x19f/0x1f0 mm/kmsan/kmsan_instr.c:470
 ghash_final+0x168/0x1d0 arch/x86/crypto/ghash-clmulni-intel_glue.c:141
 crypto_shash_final+0x198/0x1c0 crypto/shash.c:152
 ghash_async_final+0x26d/0x290 arch/x86/crypto/ghash-clmulni-intel_glue.c:211
 crypto_ahash_op+0x89a/0xc10 crypto/ahash.c:361
 crypto_ahash_final+0x8c/0xb0 crypto/ahash.c:366
 hash_recvmsg+0x56d/0xd50 crypto/algif_hash.c:220
 hash_recvmsg_nokey+0x129/0x160 crypto/algif_hash.c:371
 sock_recvmsg_nosec net/socket.c:803 [inline]
 sock_recvmsg net/socket.c:810 [inline]
 sock_read_iter+0x405/0x480 net/socket.c:887
 call_read_iter include/linux/fs.h:1776 [inline]
 new_sync_read fs/read_write.c:401 [inline]
 __vfs_read+0x6fb/0x8e0 fs/read_write.c:413
 vfs_read+0x36c/0x6c0 fs/read_write.c:447
 SYSC_read+0x172/0x360 fs/read_write.c:573
 SyS_read+0x55/0x80 fs/read_write.c:566
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
 kmsan_save_stack mm/kmsan/kmsan.c:293 [inline]
 kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:684
 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521
 ghash_update+0xfc6/0x1060 arch/x86/crypto/ghash-clmulni-intel_glue.c:110
 crypto_shash_update crypto/shash.c:117 [inline]
 shash_ahash_update+0x293/0x360 crypto/shash.c:239
 ghash_async_update+0x294/0x2b0 arch/x86/crypto/ghash-clmulni-intel_glue.c:193
 crypto_ahash_update include/crypto/hash.h:522 [inline]
 hash_sendpage+0x904/0xe10 crypto/algif_hash.c:173
 hash_sendpage_nokey+0x153/0x180 crypto/algif_hash.c:359
 kernel_sendpage net/socket.c:3234 [inline]
 sock_sendpage+0x1de/0x2c0 net/socket.c:855
 pipe_to_sendpage+0x31b/0x430 fs/splice.c:451
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x49a/0xf30 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0x1c6/0x2a0 fs/splice.c:832
 do_splice_from fs/splice.c:851 [inline]
 direct_splice_actor+0x19b/0x200 fs/splice.c:1018
 splice_direct_to_actor+0x764/0x1040 fs/splice.c:973
 do_splice_direct+0x335/0x540 fs/splice.c:1061
 do_sendfile+0x1067/0x1e40 fs/read_write.c:1413
 SYSC_sendfile64+0x1b3/0x300 fs/read_write.c:1468
 SyS_sendfile64+0x64/0x90 fs/read_write.c:1460
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:278 [inline]
 kmsan_alloc_meta_for_pages+0x161/0x3a0 mm/kmsan/kmsan.c:814
 kmsan_alloc_page+0x82/0xe0 mm/kmsan/kmsan.c:868
 __alloc_pages_nodemask+0xf5b/0x5dc0 mm/page_alloc.c:4283
 alloc_pages_vma+0xcc8/0x1800 mm/mempolicy.c:2019
 shmem_alloc_page mm/shmem.c:1471 [inline]
 shmem_alloc_and_acct_page+0x6d5/0x1000 mm/shmem.c:1496
 shmem_getpage_gfp+0x35db/0x5770 mm/shmem.c:1771
 shmem_getpage mm/shmem.c:131 [inline]
 shmem_fallocate+0xde2/0x1610 mm/shmem.c:2939
 vfs_fallocate+0x9dc/0xde0 fs/open.c:319
 SYSC_fallocate+0x119/0x1d0 fs/open.c:342
 SyS_fallocate+0x64/0x90 fs/open.c:336
 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2

Bytes 0-3 of 16 are uninitialized
==================================================================

Crashes (32):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/04/11 06:43 https://github.com/google/kmsan.git master 35ff515e4bda 8b8de427 .config console log report syz C ci-upstream-kmsan-gce
2018/04/22 00:49 https://github.com/google/kmsan.git master a7f95e9c8a95 d23fcf6c .config console log report ci-upstream-kmsan-gce
2018/04/21 19:33 https://github.com/google/kmsan.git master a7f95e9c8a95 d23fcf6c .config console log report ci-upstream-kmsan-gce
2018/04/21 09:55 https://github.com/google/kmsan.git master 48c6a2b0ab1b ca03d688 .config console log report ci-upstream-kmsan-gce
2018/04/21 07:02 https://github.com/google/kmsan.git master 48c6a2b0ab1b ca03d688 .config console log report ci-upstream-kmsan-gce
2018/04/20 23:43 https://github.com/google/kmsan.git master 48c6a2b0ab1b cc402841 .config console log report ci-upstream-kmsan-gce
2018/04/20 11:00 https://github.com/google/kmsan.git master 48c6a2b0ab1b eae05cb0 .config console log report ci-upstream-kmsan-gce
2018/04/19 12:39 https://github.com/google/kmsan.git master 48c6a2b0ab1b 3642839c .config console log report ci-upstream-kmsan-gce
2018/04/18 23:52 https://github.com/google/kmsan.git master 48c6a2b0ab1b 829f0234 .config console log report ci-upstream-kmsan-gce
2018/04/18 22:33 https://github.com/google/kmsan.git master 48c6a2b0ab1b 829f0234 .config console log report ci-upstream-kmsan-gce
2018/04/18 04:53 https://github.com/google/kmsan.git master 48c6a2b0ab1b b80fd3b5 .config console log report ci-upstream-kmsan-gce
2018/04/17 23:02 https://github.com/google/kmsan.git master 48c6a2b0ab1b b80fd3b5 .config console log report ci-upstream-kmsan-gce
2018/04/17 20:54 https://github.com/google/kmsan.git master 48c6a2b0ab1b b80fd3b5 .config console log report ci-upstream-kmsan-gce
2018/04/17 11:53 https://github.com/google/kmsan.git master 48c6a2b0ab1b b80fd3b5 .config console log report ci-upstream-kmsan-gce
2018/04/17 07:44 https://github.com/google/kmsan.git master 48c6a2b0ab1b b80fd3b5 .config console log report ci-upstream-kmsan-gce
2018/04/16 10:32 https://github.com/google/kmsan.git master 48c6a2b0ab1b 802ac912 .config console log report ci-upstream-kmsan-gce
2018/04/15 00:59 https://github.com/google/kmsan.git master 35ff515e4bda 7a67784c .config console log report ci-upstream-kmsan-gce
2018/04/14 21:51 https://github.com/google/kmsan.git master 35ff515e4bda 7a67784c .config console log report ci-upstream-kmsan-gce
2018/04/14 14:50 https://github.com/google/kmsan.git master 35ff515e4bda 7a67784c .config console log report ci-upstream-kmsan-gce
2018/04/13 23:33 https://github.com/google/kmsan.git master 35ff515e4bda 7a67784c .config console log report ci-upstream-kmsan-gce
2018/04/13 17:24 https://github.com/google/kmsan.git master 35ff515e4bda 0a0c5db6 .config console log report ci-upstream-kmsan-gce
2018/04/13 00:49 https://github.com/google/kmsan.git master 35ff515e4bda eb2295de .config console log report ci-upstream-kmsan-gce
2018/04/11 08:48 https://github.com/google/kmsan.git master 35ff515e4bda 8b8de427 .config console log report ci-upstream-kmsan-gce
2018/04/11 06:23 https://github.com/google/kmsan.git master 35ff515e4bda 8b8de427 .config console log report ci-upstream-kmsan-gce
2018/04/07 09:05 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 08:43 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 08:30 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 07:15 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 07:07 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 03:23 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 02:27 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 00:33 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.