syzbot


KMSAN: uninit-value in sha512_generic_block_fn

Status: closed as invalid on 2018/04/22 15:44
Subsystems: crypto
[Documentation on labels]
First crash: 2488d, last: 2479d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in sha512_generic_block_fn (2) crypto C 24 1651d 1655d 0/28 closed as invalid on 2020/07/22 14:12

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in __arch_swab64 arch/x86/include/uapi/asm/swab.h:31 [inline]
BUG: KMSAN: uninit-value in __fswab64 include/uapi/linux/swab.h:68 [inline]
BUG: KMSAN: uninit-value in __swab64p include/uapi/linux/swab.h:192 [inline]
BUG: KMSAN: uninit-value in __be64_to_cpup include/uapi/linux/byteorder/little_endian.h:74 [inline]
BUG: KMSAN: uninit-value in get_unaligned_be64 include/linux/unaligned/access_ok.h:35 [inline]
BUG: KMSAN: uninit-value in LOAD_OP crypto/sha512_generic.c:73 [inline]
BUG: KMSAN: uninit-value in sha512_transform crypto/sha512_generic.c:101 [inline]
BUG: KMSAN: uninit-value in sha512_generic_block_fn+0x237f/0x2b90 crypto/sha512_generic.c:138
CPU: 1 PID: 6462 Comm: syz-executor5 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
 __msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676
 __arch_swab64 arch/x86/include/uapi/asm/swab.h:31 [inline]
 __fswab64 include/uapi/linux/swab.h:68 [inline]
 __swab64p include/uapi/linux/swab.h:192 [inline]
 __be64_to_cpup include/uapi/linux/byteorder/little_endian.h:74 [inline]
 get_unaligned_be64 include/linux/unaligned/access_ok.h:35 [inline]
 LOAD_OP crypto/sha512_generic.c:73 [inline]
 sha512_transform crypto/sha512_generic.c:101 [inline]
 sha512_generic_block_fn+0x237f/0x2b90 crypto/sha512_generic.c:138
 sha512_base_do_finalize include/crypto/sha512_base.h:114 [inline]
 sha512_final+0x260/0x490 crypto/sha512_generic.c:152
 crypto_sha512_finup+0x2c2/0x610 crypto/sha512_generic.c:160
 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
RIP: 0033:0x455319
RSP: 002b:00007f0fa793bc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f0fa793c6d4 RCX: 0000000000455319
RDX: 0000000020e64ff8 RSI: 0000000000000015 RDI: 0000000000000014
RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000008 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000004c6 R14: 00000000006fa330 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
 sha512_base_do_update include/crypto/sha512_base.h:90 [inline]
 crypto_sha512_finup+0x276/0x610 crypto/sha512_generic.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
==================================================================

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/04/15 06:08 https://github.com/google/kmsan.git master 35ff515e4bda 7a67784c .config console log report ci-upstream-kmsan-gce
2018/04/13 19:47 https://github.com/google/kmsan.git master 35ff515e4bda 0a0c5db6 .config console log report ci-upstream-kmsan-gce
2018/04/10 21:44 https://github.com/google/kmsan.git master 35ff515e4bda 8b8de427 .config console log report ci-upstream-kmsan-gce
2018/04/07 09:03 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 08:47 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 07:32 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 06:42 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 04:25 https://github.com/google/kmsan.git master e2ab7e8abba4 d613535f .config console log report ci-upstream-kmsan-gce
2018/04/07 00:55 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.