Hello,
syzbot found the following crash on:
HEAD commit: d2d741e5d189 kmsan: add initialization for shmem pages
git tree:
https://github.com/google/kmsan.git/master
console output:
https://syzkaller.appspot.com/x/log.txt?x=12db433b800000
kernel config:
https://syzkaller.appspot.com/x/.config?x=48f9de3384bcd0f
dashboard link:
https://syzkaller.appspot.com/bug?extid=adaa00fe5d0738baf2b4
compiler: clang version 7.0.0 (trunk 329391)
syzkaller repro:
https://syzkaller.appspot.com/x/repro.syz?x=11616047800000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=16c9a53b800000
CC: [
da...@davemloft.net her...@gondor.apana.org.au
linux-...@vger.kernel.org linux-...@vger.kernel.org]
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+adaa00...@syzkaller.appspotmail.com
==================================================================
BUG: KMSAN: uninit-value in gf128mul_4k_lle+0x2b6/0x320
crypto/gf128mul.c:391
CPU: 0 PID: 4464 Comm: syzkaller799785 Not tainted 4.16.0+ #87
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:683
gf128mul_4k_lle+0x2b6/0x320 crypto/gf128mul.c:391
ghash_update+0xa26/0x1160 crypto/ghash-generic.c:75
crypto_shash_update crypto/shash.c:117 [inline]
shash_ahash_update crypto/shash.c:239 [inline]
shash_async_update+0x290/0x360 crypto/shash.c:247
crypto_ahash_update include/crypto/hash.h:522 [inline]
gcm_hash_update crypto/gcm.c:235 [inline]
gcm_hash_assoc_remain_continue crypto/gcm.c:344 [inline]
gcm_hash_init_continue crypto/gcm.c:402 [inline]
gcm_hash+0x8b5/0x24a0 crypto/gcm.c:430
gcm_encrypt_continue crypto/gcm.c:455 [inline]
crypto_gcm_encrypt+0xa13/0xaf0 crypto/gcm.c:484
big_key_crypt+0x73d/0x780 include/crypto/aead.h:370
big_key_preparse+0x3df/0xec0 security/keys/big_key.c:243
key_create_or_update+0x7a8/0x1a40 security/keys/key.c:849
SYSC_add_key+0x6c2/0x960 security/keys/keyctl.c:122
SyS_add_key+0x77/0xa0 security/keys/keyctl.c:62
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x43fcd9
RSP: 002b:00007fff1f67b858 EFLAGS: 00000207 ORIG_RAX: 00000000000000f8
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fcd9
RDX: 0000000020000180 RSI: 0000000020000140 RDI: 0000000020000100
RBP: 00000000006ca018 R08: 00000000fffffffc R09: 00000000004002c8
R10: 00000000000004d1 R11: 0000000000000207 R12: 0000000000401600
R13: 0000000000401690 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
__msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:528
__crypto_xor+0x23c/0x16b0 crypto/algapi.c:1012
crypto_xor include/crypto/algapi.h:210 [inline]
ghash_update+0x9e4/0x1160 crypto/ghash-generic.c:74
crypto_shash_update crypto/shash.c:117 [inline]
shash_ahash_update crypto/shash.c:239 [inline]
shash_async_update+0x290/0x360 crypto/shash.c:247
crypto_ahash_update include/crypto/hash.h:522 [inline]
gcm_hash_update crypto/gcm.c:235 [inline]
gcm_hash_assoc_remain_continue crypto/gcm.c:344 [inline]
gcm_hash_init_continue crypto/gcm.c:402 [inline]
gcm_hash+0x8b5/0x24a0 crypto/gcm.c:430
gcm_encrypt_continue crypto/gcm.c:455 [inline]
crypto_gcm_encrypt+0xa13/0xaf0 crypto/gcm.c:484
big_key_crypt+0x73d/0x780 include/crypto/aead.h:370
big_key_preparse+0x3df/0xec0 security/keys/big_key.c:243
key_create_or_update+0x7a8/0x1a40 security/keys/key.c:849
SYSC_add_key+0x6c2/0x960 security/keys/keyctl.c:122
SyS_add_key+0x77/0xa0 security/keys/keyctl.c:62
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:528
__crypto_xor+0x23c/0x16b0 crypto/algapi.c:1012
crypto_xor include/crypto/algapi.h:210 [inline]
crypto_ctr_crypt_inplace+0x29a/0x3a0 crypto/ctr.c:115
crypto_ctr_crypt+0x54c/0x7d0 crypto/ctr.c:142
skcipher_crypt_blkcipher crypto/skcipher.c:623 [inline]
skcipher_encrypt_blkcipher+0x222/0x320 crypto/skcipher.c:632
crypto_skcipher_encrypt include/crypto/skcipher.h:443 [inline]
crypto_gcm_encrypt+0x53e/0xaf0 crypto/gcm.c:483
big_key_crypt+0x73d/0x780 include/crypto/aead.h:370
big_key_preparse+0x3df/0xec0 security/keys/big_key.c:243
key_create_or_update+0x7a8/0x1a40 security/keys/key.c:849
SYSC_add_key+0x6c2/0x960 security/keys/keyctl.c:122
SyS_add_key+0x77/0xa0 security/keys/keyctl.c:62
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_current+0x6b5/0x970 mm/mempolicy.c:2055
alloc_pages include/linux/gfp.h:494 [inline]
big_key_alloc_buffer+0x241/0xa00 security/keys/big_key.c:178
big_key_preparse+0x20a/0xec0 security/keys/big_key.c:227
key_create_or_update+0x7a8/0x1a40 security/keys/key.c:849
SYSC_add_key+0x6c2/0x960 security/keys/keyctl.c:122
SyS_add_key+0x77/0xa0 security/keys/keyctl.c:62
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
==================================================================
---
This bug is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches