================================================================== 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: 7118 Comm: syz-executor7 Not tainted 4.16.0+ #84 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+0xfb/0x1e0 mm/kmsan/kmsan.c:1170 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 sock_recvmsg_nosec net/socket.c:803 [inline] sock_recvmsg+0x1d0/0x230 net/socket.c:810 ___sys_recvmsg+0x3fb/0x810 net/socket.c:2205 __sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313 SYSC_recvmmsg+0x29b/0x3e0 net/socket.c:2394 SyS_recvmmsg+0x76/0xa0 net/socket.c:2378 do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 RIP: 0033:0x455379 RSP: 002b:00007f0ffdcbac68 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f0ffdcbb6d4 RCX: 0000000000455379 RDX: 0000000000000007 RSI: 0000000020003480 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000020003640 R09: 0000000000000000 R10: 0000000040002003 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000049e R14: 00000000006f9f70 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 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:521 md5_transform+0x230b/0x2390 crypto/md5.c:137 md5_transform_helper crypto/md5.c:146 [inline] md5_update+0x3a5/0x590 crypto/md5.c:184 crypto_shash_update crypto/shash.c:117 [inline] shash_finup_unaligned+0x202/0x3f0 crypto/shash.c:159 crypto_shash_finup crypto/shash.c:173 [inline] shash_ahash_finup+0x468/0xa30 crypto/shash.c:266 shash_ahash_digest+0x5c6/0x600 crypto/shash.c:306 shash_async_digest+0x11c/0x1b0 crypto/shash.c:320 crypto_ahash_op+0x89a/0xc10 crypto/ahash.c:361 crypto_ahash_digest+0xe4/0x160 crypto/ahash.c:383 hash_sendpage+0xb40/0xe10 crypto/algif_hash.c:164 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 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 md5_transform+0x230b/0x2390 crypto/md5.c:137 md5_transform_helper crypto/md5.c:146 [inline] md5_update+0x3a5/0x590 crypto/md5.c:184 crypto_shash_update crypto/shash.c:117 [inline] shash_finup_unaligned+0x202/0x3f0 crypto/shash.c:159 crypto_shash_finup crypto/shash.c:173 [inline] shash_ahash_finup+0x468/0xa30 crypto/shash.c:266 shash_ahash_digest+0x5c6/0x600 crypto/shash.c:306 shash_async_digest+0x11c/0x1b0 crypto/shash.c:320 crypto_ahash_op+0x89a/0xc10 crypto/ahash.c:361 crypto_ahash_digest+0xe4/0x160 crypto/ahash.c:383 hash_sendpage+0xb40/0xe10 crypto/algif_hash.c:164 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 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 md5_transform+0x230b/0x2390 crypto/md5.c:137 md5_transform_helper crypto/md5.c:146 [inline] md5_update+0x3a5/0x590 crypto/md5.c:184 crypto_shash_update crypto/shash.c:117 [inline] shash_finup_unaligned+0x202/0x3f0 crypto/shash.c:159 crypto_shash_finup crypto/shash.c:173 [inline] shash_ahash_finup+0x468/0xa30 crypto/shash.c:266 shash_ahash_digest+0x5c6/0x600 crypto/shash.c:306 shash_async_digest+0x11c/0x1b0 crypto/shash.c:320 crypto_ahash_op+0x89a/0xc10 crypto/ahash.c:361 crypto_ahash_digest+0xe4/0x160 crypto/ahash.c:383 hash_sendpage+0xb40/0xe10 crypto/algif_hash.c:164 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 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 md5_transform+0x230b/0x2390 crypto/md5.c:137 md5_transform_helper crypto/md5.c:146 [inline] md5_update+0x3a5/0x590 crypto/md5.c:184 crypto_shash_update crypto/shash.c:117 [inline] shash_finup_unaligned+0x202/0x3f0 crypto/shash.c:159 crypto_shash_finup crypto/shash.c:173 [inline] shash_ahash_finup+0x468/0xa30 crypto/shash.c:266 shash_ahash_digest+0x5c6/0x600 crypto/shash.c:306 shash_async_digest+0x11c/0x1b0 crypto/shash.c:320 crypto_ahash_op+0x89a/0xc10 crypto/ahash.c:361 crypto_ahash_digest+0xe4/0x160 crypto/ahash.c:383 hash_sendpage+0xb40/0xe10 crypto/algif_hash.c:164 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 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 md5_transform+0x230b/0x2390 crypto/md5.c:137 md5_transform_helper crypto/md5.c:146 [inline] md5_update+0x3a5/0x590 crypto/md5.c:184 crypto_shash_update crypto/shash.c:117 [inline] shash_finup_unaligned+0x202/0x3f0 crypto/shash.c:159 crypto_shash_finup crypto/shash.c:173 [inline] shash_ahash_finup+0x468/0xa30 crypto/shash.c:266 shash_ahash_digest+0x5c6/0x600 crypto/shash.c:306 shash_async_digest+0x11c/0x1b0 crypto/shash.c:320 crypto_ahash_op+0x89a/0xc10 crypto/ahash.c:361 crypto_ahash_digest+0xe4/0x160 crypto/ahash.c:383 hash_sendpage+0xb40/0xe10 crypto/algif_hash.c:164 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 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 md5_transform+0x230b/0x2390 crypto/md5.c:137 md5_transform_helper crypto/md5.c:146 [inline] md5_update+0x233/0x590 crypto/md5.c:178 crypto_shash_update crypto/shash.c:117 [inline] shash_finup_unaligned+0x202/0x3f0 crypto/shash.c:159 crypto_shash_finup crypto/shash.c:173 [inline] shash_ahash_finup+0x468/0xa30 crypto/shash.c:266 shash_ahash_digest+0x5c6/0x600 crypto/shash.c:306 shash_async_digest+0x11c/0x1b0 crypto/shash.c:320 crypto_ahash_op+0x89a/0xc10 crypto/ahash.c:361 crypto_ahash_digest+0xe4/0x160 crypto/ahash.c:383 hash_sendpage+0xb40/0xe10 crypto/algif_hash.c:164 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 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 md5_update+0x207/0x590 crypto/md5.c:175 crypto_shash_update crypto/shash.c:117 [inline] shash_finup_unaligned+0x202/0x3f0 crypto/shash.c:159 crypto_shash_finup crypto/shash.c:173 [inline] shash_ahash_finup+0x468/0xa30 crypto/shash.c:266 shash_ahash_digest+0x5c6/0x600 crypto/shash.c:306 shash_async_digest+0x11c/0x1b0 crypto/shash.c:320 crypto_ahash_op+0x89a/0xc10 crypto/ahash.c:361 crypto_ahash_digest+0xe4/0x160 crypto/ahash.c:383 hash_sendpage+0xb40/0xe10 crypto/algif_hash.c:164 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 ==================================================================