syzbot


KMSAN: uninit-value in aes_encrypt (2)

Status: closed as dup on 2019/11/19 02:55
Subsystems: crypto
[Documentation on labels]
Reported-by: syzbot+9e3b178624a8a2f8fa28@syzkaller.appspotmail.com
First crash: 1713d, last: 1669d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
KMSAN: uninit-value in aesti_encrypt crypto C 54 1716d 1817d
Discussions (1)
Title Replies (including bot) Last reply
KMSAN: uninit-value in aes_encrypt (2) 5 (6) 2019/10/30 16:08
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in aes_encrypt crypto C 2 2263d 2263d 0/27 closed as invalid on 2018/06/27 14:58
upstream KMSAN: uninit-value in aes_encrypt (5) ext4 C 23 5d10h 51d 0/27 upstream: reported C repro on 2024/04/28 10:32
upstream KMSAN: uninit-value in aes_encrypt (4) net C 15041 161d 1376d 0/27 auto-obsoleted due to no activity on 2024/03/19 00:25
upstream KMSAN: uninit-value in aes_encrypt (3) crypto C 2 1430d 1431d 0/27 closed as invalid on 2020/07/22 14:12

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready
8021q: adding VLAN 0 to HW filter on device batadv0
=====================================================
BUG: KMSAN: uninit-value in subshift lib/crypto/aes.c:149 [inline]
BUG: KMSAN: uninit-value in aes_encrypt+0x12d5/0x1bd0 lib/crypto/aes.c:282
CPU: 0 PID: 12200 Comm: syz-executor134 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x14a/0x2f0 mm/kmsan/kmsan_report.c:110
 __msan_warning+0x73/0xf0 mm/kmsan/kmsan_instr.c:245
 subshift lib/crypto/aes.c:149 [inline]
 aes_encrypt+0x12d5/0x1bd0 lib/crypto/aes.c:282
 aesti_encrypt+0xe8/0x130 crypto/aes_ti.c:31
 crypto_cipher_encrypt_one include/linux/crypto.h:1763 [inline]
 crypto_cbcmac_digest_update+0x3cf/0x550 crypto/ccm.c:871
 crypto_shash_update crypto/shash.c:107 [inline]
 shash_ahash_finup+0x659/0xb20 crypto/shash.c:276
 shash_async_finup+0xbb/0x110 crypto/shash.c:291
 crypto_ahash_op+0x1cd/0x6e0 crypto/ahash.c:368
 crypto_ahash_finup+0x8c/0xb0 crypto/ahash.c:393
 crypto_ccm_auth+0x14b2/0x1570 crypto/ccm.c:230
 crypto_ccm_encrypt+0x283/0x840 crypto/ccm.c:309
 crypto_aead_encrypt+0xf2/0x180 crypto/aead.c:99
 tls_do_encryption net/tls/tls_sw.c:521 [inline]
 tls_push_record+0x341e/0x4e50 net/tls/tls_sw.c:730
 bpf_exec_tx_verdict+0x1454/0x1c80 net/tls/tls_sw.c:770
 tls_sw_sendmsg+0x158d/0x2710 net/tls/tls_sw.c:1033
 inet6_sendmsg+0x2d8/0x2e0 net/ipv6/af_inet6.c:576
 sock_sendmsg_nosec net/socket.c:637 [inline]
 sock_sendmsg net/socket.c:657 [inline]
 __sys_sendto+0x8fc/0xc70 net/socket.c:1952
 __do_sys_sendto net/socket.c:1964 [inline]
 __se_sys_sendto+0x107/0x130 net/socket.c:1960
 __x64_sys_sendto+0x6e/0x90 net/socket.c:1960
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x441cf9
Code: 43 02 00 85 c0 b8 00 00 00 00 48 0f 44 c3 5b c3 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 0b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00000000007eff08 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000441cf9
RDX: fffffffffffffee0 RSI: 00000000200005c0 RDI: 0000000000000003
RBP: 00000000007eff30 R08: 0000000000000000 R09: 00000000000000b6
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000403490
R13: 0000000000403520 R14: 0000000000000000 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_chain_origin+0xbd/0x170 mm/kmsan/kmsan.c:319
 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:179
 __crypto_xor+0x1e8/0x1470 crypto/algapi.c:992
 crypto_xor include/crypto/algapi.h:213 [inline]
 crypto_cbcmac_digest_update+0x2ba/0x550 crypto/ccm.c:865
 crypto_shash_update crypto/shash.c:107 [inline]
 shash_ahash_finup+0x659/0xb20 crypto/shash.c:276
 shash_async_finup+0xbb/0x110 crypto/shash.c:291
 crypto_ahash_op+0x1cd/0x6e0 crypto/ahash.c:368
 crypto_ahash_finup+0x8c/0xb0 crypto/ahash.c:393
 crypto_ccm_auth+0x14b2/0x1570 crypto/ccm.c:230
 crypto_ccm_encrypt+0x283/0x840 crypto/ccm.c:309
 crypto_aead_encrypt+0xf2/0x180 crypto/aead.c:99
 tls_do_encryption net/tls/tls_sw.c:521 [inline]
 tls_push_record+0x341e/0x4e50 net/tls/tls_sw.c:730
 bpf_exec_tx_verdict+0x1454/0x1c80 net/tls/tls_sw.c:770
 tls_sw_sendmsg+0x158d/0x2710 net/tls/tls_sw.c:1033
 inet6_sendmsg+0x2d8/0x2e0 net/ipv6/af_inet6.c:576
 sock_sendmsg_nosec net/socket.c:637 [inline]
 sock_sendmsg net/socket.c:657 [inline]
 __sys_sendto+0x8fc/0xc70 net/socket.c:1952
 __do_sys_sendto net/socket.c:1964 [inline]
 __se_sys_sendto+0x107/0x130 net/socket.c:1960
 __x64_sys_sendto+0x6e/0x90 net/socket.c:1960
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Uninit was created at:
 kmsan_save_stack_with_flags+0x3f/0x90 mm/kmsan/kmsan.c:151
 kmsan_internal_alloc_meta_for_pages mm/kmsan/kmsan_shadow.c:362 [inline]
 kmsan_alloc_page+0x153/0x370 mm/kmsan/kmsan_shadow.c:391
 __alloc_pages_nodemask+0x149d/0x60c0 mm/page_alloc.c:4794
 alloc_pages_current+0x68d/0x9a0 mm/mempolicy.c:2188
 alloc_pages include/linux/gfp.h:511 [inline]
 skb_page_frag_refill+0x2b0/0x580 net/core/sock.c:2372
 sk_page_frag_refill+0xa4/0x330 net/core/sock.c:2392
 sk_msg_alloc+0x203/0x1050 net/core/skmsg.c:37
 tls_alloc_encrypted_msg net/tls/tls_sw.c:284 [inline]
 tls_sw_sendmsg+0xb56/0x2710 net/tls/tls_sw.c:953
 inet6_sendmsg+0x2d8/0x2e0 net/ipv6/af_inet6.c:576
 sock_sendmsg_nosec net/socket.c:637 [inline]
 sock_sendmsg net/socket.c:657 [inline]
 __sys_sendto+0x8fc/0xc70 net/socket.c:1952
 __do_sys_sendto net/socket.c:1964 [inline]
 __se_sys_sendto+0x107/0x130 net/socket.c:1960
 __x64_sys_sendto+0x6e/0x90 net/socket.c:1960
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
=====================================================

Crashes (52):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/23 14:51 https://github.com/google/kmsan.git master 3c8ca70889aa d0686497 .config console log report syz C ci-upstream-kmsan-gce
2019/11/22 23:44 https://github.com/google/kmsan.git master b7a871998d3e 598ca6c8 .config console log report ci-upstream-kmsan-gce
2019/11/21 01:40 https://github.com/google/kmsan.git master 3db92f3b3586 8098ea0f .config console log report ci-upstream-kmsan-gce
2019/11/18 23:20 https://github.com/google/kmsan.git master 9c6a71628ab9 1daed50a .config console log report ci-upstream-kmsan-gce
2019/11/18 15:06 https://github.com/google/kmsan.git master 9c6a71628ab9 1daed50a .config console log report ci-upstream-kmsan-gce
2019/11/16 23:48 https://github.com/google/kmsan.git master 9c6a71628ab9 d5696d51 .config console log report ci-upstream-kmsan-gce
2019/11/14 02:39 https://github.com/google/kmsan.git master 9c6a71628ab9 048f2d49 .config console log report ci-upstream-kmsan-gce
2019/11/13 16:37 https://github.com/google/kmsan.git master 9c6a71628ab9 048f2d49 .config console log report ci-upstream-kmsan-gce
2019/11/13 05:44 https://github.com/google/kmsan.git master e741088f2efa 048f2d49 .config console log report ci-upstream-kmsan-gce
2019/11/13 04:23 https://github.com/google/kmsan.git master e741088f2efa 048f2d49 .config console log report ci-upstream-kmsan-gce
2019/11/12 22:43 https://github.com/google/kmsan.git master e741088f2efa 048f2d49 .config console log report ci-upstream-kmsan-gce
2019/11/12 13:10 https://github.com/google/kmsan.git master e741088f2efa 048f2d49 .config console log report ci-upstream-kmsan-gce
2019/11/12 01:12 https://github.com/google/kmsan.git master e741088f2efa 048f2d49 .config console log report ci-upstream-kmsan-gce
2019/11/11 21:38 https://github.com/google/kmsan.git master e741088f2efa 048f2d49 .config console log report ci-upstream-kmsan-gce
2019/11/11 17:36 https://github.com/google/kmsan.git master e741088f2efa 048f2d49 .config console log report ci-upstream-kmsan-gce
2019/11/11 15:13 https://github.com/google/kmsan.git master e741088f2efa dc438b91 .config console log report ci-upstream-kmsan-gce
2019/11/11 12:14 https://github.com/google/kmsan.git master e741088f2efa dc438b91 .config console log report ci-upstream-kmsan-gce
2019/11/11 08:47 https://github.com/google/kmsan.git master e741088f2efa dc438b91 .config console log report ci-upstream-kmsan-gce
2019/11/11 02:07 https://github.com/google/kmsan.git master e741088f2efa dc438b91 .config console log report ci-upstream-kmsan-gce
2019/11/11 00:55 https://github.com/google/kmsan.git master e741088f2efa dc438b91 .config console log report ci-upstream-kmsan-gce
2019/11/11 00:39 https://github.com/google/kmsan.git master e741088f2efa dc438b91 .config console log report ci-upstream-kmsan-gce
2019/11/09 20:13 https://github.com/google/kmsan.git master e741088f2efa dc438b91 .config console log report ci-upstream-kmsan-gce
2019/11/09 19:55 https://github.com/google/kmsan.git master e741088f2efa dc438b91 .config console log report ci-upstream-kmsan-gce
2019/11/09 07:27 https://github.com/google/kmsan.git master e741088f2efa dc438b91 .config console log report ci-upstream-kmsan-gce
2019/11/08 13:35 https://github.com/google/kmsan.git master e741088f2efa 1e35461e .config console log report ci-upstream-kmsan-gce
2019/11/07 15:17 https://github.com/google/kmsan.git master 10459ed9b198 d797d201 .config console log report ci-upstream-kmsan-gce
2019/11/07 08:03 https://github.com/google/kmsan.git master 10459ed9b198 d797d201 .config console log report ci-upstream-kmsan-gce
2019/11/04 06:19 https://github.com/google/kmsan.git master 6f88939b3fa3 b35fad31 .config console log report ci-upstream-kmsan-gce
2019/11/03 20:22 https://github.com/google/kmsan.git master 6f88939b3fa3 c9610487 .config console log report ci-upstream-kmsan-gce
2019/11/03 17:22 https://github.com/google/kmsan.git master 6f88939b3fa3 c9610487 .config console log report ci-upstream-kmsan-gce
2019/11/03 06:07 https://github.com/google/kmsan.git master 6f88939b3fa3 a41ca8fa .config console log report ci-upstream-kmsan-gce
2019/11/01 10:27 https://github.com/google/kmsan.git master 6f88939b3fa3 a41ca8fa .config console log report ci-upstream-kmsan-gce
2019/10/30 14:10 https://github.com/google/kmsan.git master 6f88939b3fa3 5ea87a66 .config console log report ci-upstream-kmsan-gce
2019/10/30 00:49 https://github.com/google/kmsan.git master 96c6c3194b1b 5ea87a66 .config console log report ci-upstream-kmsan-gce
2019/10/29 15:09 https://github.com/google/kmsan.git master 96c6c3194b1b 5ea87a66 .config console log report ci-upstream-kmsan-gce
2019/10/28 14:16 https://github.com/google/kmsan.git master d86c15562d02 25bb509e .config console log report ci-upstream-kmsan-gce
2019/10/27 22:51 https://github.com/google/kmsan.git master d86c15562d02 25bb509e .config console log report ci-upstream-kmsan-gce
2019/10/27 22:48 https://github.com/google/kmsan.git master d86c15562d02 25bb509e .config console log report ci-upstream-kmsan-gce
2019/10/27 20:42 https://github.com/google/kmsan.git master d86c15562d02 25bb509e .config console log report ci-upstream-kmsan-gce
2019/10/27 20:42 https://github.com/google/kmsan.git master d86c15562d02 25bb509e .config console log report ci-upstream-kmsan-gce
2019/10/27 20:33 https://github.com/google/kmsan.git master d86c15562d02 25bb509e .config console log report ci-upstream-kmsan-gce
2019/10/23 23:56 https://github.com/google/kmsan.git master ba606e9df216 b602d64b .config console log report ci-upstream-kmsan-gce
2019/10/23 19:21 https://github.com/google/kmsan.git master 3c8ca70889aa b602d64b .config console log report ci-upstream-kmsan-gce
2019/10/23 13:42 https://github.com/google/kmsan.git master 3c8ca70889aa d0686497 .config console log report ci-upstream-kmsan-gce
2019/10/12 10:04 https://github.com/google/kmsan.git master fa1690255288 426631dd .config console log report ci-upstream-kmsan-gce
2019/10/11 22:28 https://github.com/google/kmsan.git master dde8031634c3 426631dd .config console log report ci-upstream-kmsan-gce
2019/10/11 11:22 https://github.com/google/kmsan.git master c38191cb7026 1a3bad90 .config console log report ci-upstream-kmsan-gce
2019/10/09 14:55 https://github.com/google/kmsan.git master eff1487c45ce 312c6a5a .config console log report ci-upstream-kmsan-gce
2019/10/09 14:37 https://github.com/google/kmsan.git master eff1487c45ce 312c6a5a .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.