syzbot


BUG: unable to handle kernel NULL pointer dereference in crypto_shash_setkey

Status: closed as invalid on 2018/09/05 12:51
Subsystems: crypto
[Documentation on labels]
First crash: 2594d, last: 2594d

Sample crash report:
BUG: unable to handle kernel NULL pointer dereference at 000000000000002c
PGD 800000019f7d1067 P4D 800000019f7d1067 PUD 1ba89d067 PMD 0 
Oops: 0000 [#1] SMP PTI
CPU: 1 PID: 12614 Comm: syz-executor3 Not tainted 4.18.0-rc4+ #27
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:crypto_tfm_alg_alignmask include/linux/crypto.h:693 [inline]
RIP: 0010:crypto_shash_alignmask include/crypto/hash.h:714 [inline]
RIP: 0010:crypto_shash_setkey+0x97/0x490 crypto/shash.c:60
Code: 98 49 8b 1e 4c 89 f7 e8 a7 35 f1 fd 48 8b 00 44 8b 3a 49 89 de 48 8d 5b 2c 48 89 45 88 48 85 c0 0f 85 c6 02 00 00 44 89 7d ac <44> 8b 23 48 89 df e8 3e 35 f1 fd 44 8b 38 44 8b 02 48 8b 45 b8 89 
RSP: 0018:ffff88021fd0ed40 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 000000000000002c RCX: ffff8801a1070c40
RDX: ffff8801a1070c40 RSI: aaaaaaaaaaaab000 RDI: ffffea0009d710c0
RBP: ffff88021fd0edd8 R08: 0000000000480020 R09: 0000000000000002
R10: 0000000000000002 R11: ffffffff810cc620 R12: 0000000000000000
R13: ffff88021fd3a040 R14: 0000000000000000 R15: 0000000000000000
FS:  00007f36a4b1c700(0000) GS:ffff88021fd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000000002c CR3: 00000001946bc000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 sctp_pack_cookie+0x745/0xba0 net/sctp/sm_make_chunk.c:1684
 sctp_make_init_ack+0x3db/0x3d20 net/sctp/sm_make_chunk.c:424
 sctp_sf_do_5_1B_init+0x1217/0x1ba0 net/sctp/sm_statefuns.c:431
 sctp_do_sm+0x2d9/0x9fe0 net/sctp/sm_sideeffect.c:1188
 sctp_endpoint_bh_rcv+0xd55/0x1040 net/sctp/endpointola.c:456
 sctp_inq_push+0x314/0x460 net/sctp/inqueue.c:95
 sctp_rcv+0x48d2/0x52c0 net/sctp/input.c:267
 sctp6_rcv+0x41/0x70 net/sctp/ipv6.c:1045
 ip6_input_finish+0x1353/0x22b0 net/ipv6/ip6_input.c:284
 NF_HOOK include/linux/netfilter.h:287 [inline]
 ip6_input+0x2a1/0x340 net/ipv6/ip6_input.c:327
 dst_input include/net/dst.h:450 [inline]
 ip6_rcv_finish+0x498/0x6e0 net/ipv6/ip6_input.c:71
 NF_HOOK include/linux/netfilter.h:287 [inline]
 ipv6_rcv+0x1ea9/0x2250 net/ipv6/ip6_input.c:208
 __netif_receive_skb_core+0x4a7a/0x4fc0 net/core/dev.c:4628
 __netif_receive_skb net/core/dev.c:4693 [inline]
 process_backlog+0x664/0xe60 net/core/dev.c:5373
 napi_poll net/core/dev.c:5771 [inline]
 net_rx_action+0x799/0x1ae0 net/core/dev.c:5837
 __do_softirq+0x55f/0x934 kernel/softirq.c:288
 do_softirq_own_stack+0x49/0x80 arch/x86/entry/entry_64.S:1054
 </IRQ>
 do_softirq kernel/softirq.c:332 [inline]
 __local_bh_enable_ip+0x134/0x170 kernel/softirq.c:185
 local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32
 rcu_read_unlock_bh include/linux/rcupdate.h:725 [inline]
 ip6_finish_output2+0x1e23/0x2280 net/ipv6/ip6_output.c:121
 ip6_finish_output+0xaf0/0xbb0 net/ipv6/ip6_output.c:154
 NF_HOOK_COND include/linux/netfilter.h:276 [inline]
 ip6_output+0x5c5/0x710 net/ipv6/ip6_output.c:171
 dst_output include/net/dst.h:444 [inline]
 NF_HOOK include/linux/netfilter.h:287 [inline]
 ip6_xmit+0x2211/0x2570 net/ipv6/ip6_output.c:277
 sctp_v6_xmit+0x48d/0x570 net/sctp/ipv6.c:225
 sctp_packet_transmit+0x42b3/0x4760 net/sctp/output.c:650
 sctp_packet_singleton net/sctp/outqueue.c:791 [inline]
 sctp_outq_flush_ctrl net/sctp/outqueue.c:922 [inline]
 sctp_outq_flush+0x9df/0x6090 net/sctp/outqueue.c:1203
 sctp_outq_uncork+0xd2/0xf0 net/sctp/outqueue.c:776
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1820 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1220 [inline]
 sctp_do_sm+0x9919/0x9fe0 net/sctp/sm_sideeffect.c:1191
 sctp_primitive_ASSOCIATE+0x172/0x1a0 net/sctp/primitive.c:88
 sctp_sendmsg_to_asoc+0x195a/0x2890 net/sctp/socket.c:1936
 sctp_sendmsg+0x3f3e/0x6500 net/sctp/socket.c:2124
 inet_sendmsg+0x3fc/0x760 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:641 [inline]
 sock_sendmsg net/socket.c:651 [inline]
 __sys_sendto+0x798/0x8e0 net/socket.c:1797
 __do_sys_sendto net/socket.c:1809 [inline]
 __se_sys_sendto net/socket.c:1805 [inline]
 __x64_sys_sendto+0x1a1/0x210 net/socket.c:1805
 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x455ab9
Code: 1d ba fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 eb b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00 
RSP: 002b:00007f36a4b1bc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f36a4b1c6d4 RCX: 0000000000455ab9
RDX: 0000000000000001 RSI: 0000000020e33fe0 RDI: 0000000000000015
RBP: 000000000072bea0 R08: 000000002005ffe4 R09: 000000000000001c
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000004c1164 R14: 00000000004d1860 R15: 0000000000000000
Modules linked in:
Dumping ftrace buffer:
   (ftrace buffer empty)
CR2: 000000000000002c
---[ end trace 18e0238bf0f31e5e ]---
RIP: 0010:crypto_tfm_alg_alignmask include/linux/crypto.h:693 [inline]
RIP: 0010:crypto_shash_alignmask include/crypto/hash.h:714 [inline]
RIP: 0010:crypto_shash_setkey+0x97/0x490 crypto/shash.c:60
Code: 98 49 8b 1e 4c 89 f7 e8 a7 35 f1 fd 48 8b 00 44 8b 3a 49 89 de 48 8d 5b 2c 48 89 45 88 48 85 c0 0f 85 c6 02 00 00 44 89 7d ac <44> 8b 23 48 89 df e8 3e 35 f1 fd 44 8b 38 44 8b 02 48 8b 45 b8 89 
RSP: 0018:ffff88021fd0ed40 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 000000000000002c RCX: ffff8801a1070c40
RDX: ffff8801a1070c40 RSI: aaaaaaaaaaaab000 RDI: ffffea0009d710c0
RBP: ffff88021fd0edd8 R08: 0000000000480020 R09: 0000000000000002
R10: 0000000000000002 R11: ffffffff810cc620 R12: 0000000000000000
R13: ffff88021fd3a040 R14: 0000000000000000 R15: 0000000000000000
FS:  00007f36a4b1c700(0000) GS:ffff88021fd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000000002c CR3: 00000001946bc000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/07/14 13:26 https://github.com/google/kmsan.git master 80ecacc456c1 92a49505 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.