syzbot


KMSAN: uninit-value in aesti_encrypt

Status: fixed on 2019/11/29 15:48
Subsystems: crypto
[Documentation on labels]
Reported-by: syzbot+6f50c99e8f6194bf363f@syzkaller.appspotmail.com
Fix commit: 683916f6a840 net/tls: fix sk_msg trim on fallback to copy mode
First crash: 1804d, last: 1692d
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
KMSAN: uninit-value in aes_encrypt (2) crypto C 52 1644d 1674d 0/26 closed as dup on 2019/11/19 02:55
Discussions (5)
Title Replies (including bot) Last reply
[PATCH 5.3 000/193] 5.3.11-stable review 200 (200) 2019/11/12 18:26
[PATCH net v2] net/tls: fix sk_msg trim on fallback to copy mode 3 (3) 2019/11/06 02:08
[PATCH net] net/tls: fix sk_msg trim on fallback to copy mode 14 (14) 2019/11/04 22:58
Reminder: 6 active syzbot reports in "net/tls" subsystem 1 (1) 2019/08/16 04:18
KMSAN: uninit-value in aesti_encrypt 4 (6) 2019/07/03 16:01
Last patch testing requests (1)
Created Duration User Patch Repo Result
2019/07/05 01:39 13m tranmanphong@gmail.com patch https://github.com/google/kmsan.git master report log

Sample crash report:
Local variable description: ----walk@crypto_ctr_crypt
Variable was created at:
 crypto_ctr_crypt+0xf9/0xaf0 include/linux/crypto.h:850
 crypto_skcipher_encrypt include/crypto/skcipher.h:493 [inline]
 crypto_ccm_encrypt+0x5fd/0x8d0 crypto/ccm.c:321
==================================================================
BUG: KMSAN: uninit-value in subshift crypto/aes_ti.c:145 [inline]
BUG: KMSAN: uninit-value in aesti_encrypt+0x1238/0x1bc0 crypto/aes_ti.c:289
CPU: 1 PID: 13693 Comm: syz-executor383 Not tainted 5.2.0+ #14
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+0x162/0x2d0 mm/kmsan/kmsan_report.c:109
 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:294
 subshift crypto/aes_ti.c:145 [inline]
 aesti_encrypt+0x1238/0x1bc0 crypto/aes_ti.c:289
 crypto_cipher_encrypt_one include/linux/crypto.h:1753 [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+0x272/0x8d0 crypto/ccm.c:309
 crypto_aead_encrypt include/crypto/aead.h:331 [inline]
 tls_do_encryption net/tls/tls_sw.c:521 [inline]
 tls_push_record+0x341a/0x4f70 net/tls/tls_sw.c:730
 bpf_exec_tx_verdict+0x1454/0x1c90 net/tls/tls_sw.c:770
 tls_sw_sendmsg+0x15bd/0x2740 net/tls/tls_sw.c:1033
 inet_sendmsg+0x48e/0x750 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg net/socket.c:665 [inline]
 __sys_sendto+0x905/0xb90 net/socket.c:1958
 __do_sys_sendto net/socket.c:1970 [inline]
 __se_sys_sendto+0x107/0x130 net/socket.c:1966
 __x64_sys_sendto+0x6e/0x90 net/socket.c:1966
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:302
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x449519
Code: e8 bc 15 03 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 1b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fc68d885cd8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000700028 RCX: 0000000000449519
RDX: ffffffffffffff7f RSI: 00000000200005c0 RDI: 0000000000000003
RBP: 0000000000700020 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000070002c
R13: 000000000080fc6f R14: 00007fc68d8869c0 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline]
 kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345
 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:190
 __crypto_xor+0x1e8/0x1470 crypto/algapi.c:1019
 crypto_xor include/crypto/algapi.h:214 [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+0x272/0x8d0 crypto/ccm.c:309
 crypto_aead_encrypt include/crypto/aead.h:331 [inline]
 tls_do_encryption net/tls/tls_sw.c:521 [inline]
 tls_push_record+0x341a/0x4f70 net/tls/tls_sw.c:730
 bpf_exec_tx_verdict+0x1454/0x1c90 net/tls/tls_sw.c:770
 tls_sw_sendmsg+0x15bd/0x2740 net/tls/tls_sw.c:1033
 inet_sendmsg+0x48e/0x750 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg net/socket.c:665 [inline]
 __sys_sendto+0x905/0xb90 net/socket.c:1958
 __do_sys_sendto net/socket.c:1970 [inline]
 __se_sys_sendto+0x107/0x130 net/socket.c:1966
 __x64_sys_sendto+0x6e/0x90 net/socket.c:1966
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:302
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Uninit was created at:
 kmsan_save_stack_with_flags+0x37/0x70 mm/kmsan/kmsan.c:187
 kmsan_internal_alloc_meta_for_pages+0x123/0x510 mm/kmsan/kmsan_hooks.c:114
 kmsan_alloc_page+0x7a/0xf0 mm/kmsan/kmsan_hooks.c:244
 __alloc_pages_nodemask+0x144d/0x6020 mm/page_alloc.c:4701
 alloc_pages_current+0x6a0/0x9b0 mm/mempolicy.c:2132
 alloc_pages include/linux/gfp.h:511 [inline]
 skb_page_frag_refill+0x2b0/0x580 net/core/sock.c:2351
 sk_page_frag_refill+0xa4/0x330 net/core/sock.c:2371
 sk_msg_alloc+0x203/0x1050 net/core/skmsg.c:37
 tls_alloc_encrypted_msg net/tls/tls_sw.c:284 [inline]
 tls_sw_sendmsg+0xb6a/0x2740 net/tls/tls_sw.c:953
 inet_sendmsg+0x48e/0x750 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg net/socket.c:665 [inline]
 __sys_sendto+0x905/0xb90 net/socket.c:1958
 __do_sys_sendto net/socket.c:1970 [inline]
 __se_sys_sendto+0x107/0x130 net/socket.c:1966
 __x64_sys_sendto+0x6e/0x90 net/socket.c:1966
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:302
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
==================================================================

Crashes (54):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/07/17 14:19 https://github.com/google/kmsan.git master 7280182c67ba 0d10349c .config console log report syz C ci-upstream-kmsan-gce
2019/06/27 17:13 https://github.com/google/kmsan.git master 41550654dedf 7509bf36 .config console log report syz C ci-upstream-kmsan-gce
2019/06/22 19:18 https://github.com/google/kmsan.git master 3351e2b9635b 34bf9440 .config console log report syz ci-upstream-kmsan-gce
2019/10/06 14:50 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
2019/10/05 03:24 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
2019/10/04 13:16 https://github.com/google/kmsan.git master 1e76a3e537c3 b2f369e5 .config console log report ci-upstream-kmsan-gce
2019/10/03 13:19 https://github.com/google/kmsan.git master 1e76a3e537c3 fc17ba49 .config console log report ci-upstream-kmsan-gce
2019/10/03 09:51 https://github.com/google/kmsan.git master 1e76a3e537c3 fc17ba49 .config console log report ci-upstream-kmsan-gce
2019/10/01 05:38 https://github.com/google/kmsan.git master f5f9d3ce4686 c7a4fb99 .config console log report ci-upstream-kmsan-gce
2019/09/30 06:07 https://github.com/google/kmsan.git master 124037e07586 c1ad5441 .config console log report ci-upstream-kmsan-gce
2019/09/28 23:29 https://github.com/google/kmsan.git master 124037e07586 eb6b9855 .config console log report ci-upstream-kmsan-gce
2019/09/26 13:50 https://github.com/google/kmsan.git master cebbfdbcf2b7 24d405a3 .config console log report ci-upstream-kmsan-gce
2019/09/25 09:42 https://github.com/google/kmsan.git master cebbfdbcf2b7 e38a6630 .config console log report ci-upstream-kmsan-gce
2019/09/23 03:24 https://github.com/google/kmsan.git master cebbfdbcf2b7 d96e88f3 .config console log report ci-upstream-kmsan-gce
2019/09/16 23:45 https://github.com/google/kmsan.git master cebbfdbcf2b7 51ca0454 .config console log report ci-upstream-kmsan-gce
2019/09/15 04:44 https://github.com/google/kmsan.git master cebbfdbcf2b7 32d59357 .config console log report ci-upstream-kmsan-gce
2019/09/14 13:04 https://github.com/google/kmsan.git master cebbfdbcf2b7 32d59357 .config console log report ci-upstream-kmsan-gce
2019/09/14 13:03 https://github.com/google/kmsan.git master cebbfdbcf2b7 32d59357 .config console log report ci-upstream-kmsan-gce
2019/09/14 13:03 https://github.com/google/kmsan.git master cebbfdbcf2b7 32d59357 .config console log report ci-upstream-kmsan-gce
2019/09/13 23:13 https://github.com/google/kmsan.git master cebbfdbcf2b7 32d59357 .config console log report ci-upstream-kmsan-gce
2019/09/12 19:10 https://github.com/google/kmsan.git master a8390a90e991 0b7672ee .config console log report ci-upstream-kmsan-gce
2019/08/24 08:34 https://github.com/google/kmsan.git master 61ccdad1fcdf 78ded196 .config console log report ci-upstream-kmsan-gce
2019/08/18 07:47 https://github.com/google/kmsan.git master 61ccdad1fcdf 55bf8926 .config console log report ci-upstream-kmsan-gce
2019/08/17 11:06 https://github.com/google/kmsan.git master 61ccdad1fcdf 8fd428a1 .config console log report ci-upstream-kmsan-gce
2019/08/17 01:14 https://github.com/google/kmsan.git master 61ccdad1fcdf 8fd428a1 .config console log report ci-upstream-kmsan-gce
2019/08/15 01:59 https://github.com/google/kmsan.git master 61ccdad1fcdf 0d298d6b .config console log report ci-upstream-kmsan-gce
2019/08/13 17:32 https://github.com/google/kmsan.git master 61ccdad1fcdf b65356b5 .config console log report ci-upstream-kmsan-gce
2019/08/13 08:48 https://github.com/google/kmsan.git master 61ccdad1fcdf 8620c2c2 .config console log report ci-upstream-kmsan-gce
2019/08/07 05:54 https://github.com/google/kmsan.git master ae0c578a3cdf cdde7486 .config console log report ci-upstream-kmsan-gce
2019/07/30 22:24 https://github.com/google/kmsan.git master beaab8a31e0d 7c7ded69 .config console log report ci-upstream-kmsan-gce
2019/07/30 09:13 https://github.com/google/kmsan.git master beaab8a31e0d f28bf2a5 .config console log report ci-upstream-kmsan-gce
2019/07/30 06:35 https://github.com/google/kmsan.git master beaab8a31e0d f67095ee .config console log report ci-upstream-kmsan-gce
2019/07/27 21:19 https://github.com/google/kmsan.git master beaab8a31e0d c85e1c5b .config console log report ci-upstream-kmsan-gce
2019/07/27 04:42 https://github.com/google/kmsan.git master beaab8a31e0d c85e1c5b .config console log report ci-upstream-kmsan-gce
2019/07/27 03:38 https://github.com/google/kmsan.git master beaab8a31e0d c85e1c5b .config console log report ci-upstream-kmsan-gce
2019/07/25 17:41 https://github.com/google/kmsan.git master beaab8a31e0d 732bc5a0 .config console log report ci-upstream-kmsan-gce
2019/07/25 06:25 https://github.com/google/kmsan.git master beaab8a31e0d 32329ceb .config console log report ci-upstream-kmsan-gce
2019/07/25 06:23 https://github.com/google/kmsan.git master beaab8a31e0d 32329ceb .config console log report ci-upstream-kmsan-gce
2019/07/24 10:39 https://github.com/google/kmsan.git master beaab8a31e0d 32329ceb .config console log report ci-upstream-kmsan-gce
2019/07/23 04:55 https://github.com/google/kmsan.git master beaab8a31e0d 55e0c077 .config console log report ci-upstream-kmsan-gce
2019/07/22 17:03 https://github.com/google/kmsan.git master beaab8a31e0d b3c615f5 .config console log report ci-upstream-kmsan-gce
2019/07/22 02:42 https://github.com/google/kmsan.git master beaab8a31e0d 1656845f .config console log report ci-upstream-kmsan-gce
2019/07/21 09:54 https://github.com/google/kmsan.git master beaab8a31e0d 1656845f .config console log report ci-upstream-kmsan-gce
2019/07/20 20:18 https://github.com/google/kmsan.git master beaab8a31e0d 1656845f .config console log report ci-upstream-kmsan-gce
2019/07/20 01:52 https://github.com/google/kmsan.git master beaab8a31e0d 1656845f .config console log report ci-upstream-kmsan-gce
2019/07/19 11:04 https://github.com/google/kmsan.git master beaab8a31e0d 7bb222f7 .config console log report ci-upstream-kmsan-gce
2019/07/18 08:49 https://github.com/google/kmsan.git master beaab8a31e0d 7bb222f7 .config console log report ci-upstream-kmsan-gce
2019/06/27 15:50 https://github.com/google/kmsan.git master 41550654dedf 7509bf36 .config console log report ci-upstream-kmsan-gce
2019/06/27 00:43 https://github.com/google/kmsan.git master 41550654dedf 7509bf36 .config console log report ci-upstream-kmsan-gce
2019/06/27 00:28 https://github.com/google/kmsan.git master 41550654dedf 7509bf36 .config console log report ci-upstream-kmsan-gce
2019/06/22 18:26 https://github.com/google/kmsan.git master 3351e2b9635b 34bf9440 .config console log report ci-upstream-kmsan-gce
2019/06/16 15:30 https://github.com/google/kmsan.git master 14cf4e4151b0 442206d7 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.