syzbot


general protection fault in sctp_v6_get_dst

Status: fixed on 2018/01/22 13:19
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+7b7b518b1228d2743963@syzkaller.appspotmail.com
Fix commit: c5006b8aa745 sctp: do not allow the v4 socket to bind a v4mapped v6 address
First crash: 2297d, last: 2297d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 3.16 000/254] 3.16.55-rc1 review 261 (261) 2018/03/03 15:48
[PATCH 3.2 000/140] 3.2.100-rc1 review 142 (142) 2018/02/28 16:57
[PATCH 4.9 00/66] 4.9.79-stable review 72 (72) 2018/02/28 15:46
[PATCH 4.4 00/74] 4.4.114-stable review 90 (90) 2018/02/19 20:06
[PATCH 3.18 00/52] 3.18.93-stable review 62 (62) 2018/01/31 08:52
[PATCH 4.14 00/71] 4.14.16-stable review 77 (77) 2018/01/30 14:52
[PATCH net] sctp: do not allow the v4 socket to bind a v4mapped v6 address 3 (3) 2018/01/16 19:25
general protection fault in sctp_v6_get_dst 2 (4) 2018/01/11 12:40
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in sctp_v6_get_dst (2) sctp 8 1784d 1864d 0/26 closed as invalid on 2019/10/04 04:21

Sample crash report:
device lo entered promiscuous mode
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 3509 Comm: syzkaller056104 Not tainted 4.15.0-rc7+ #256
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:183 [inline]
RIP: 0010:sctp_v6_get_dst+0x59e/0x1c60 net/sctp/ipv6.c:271
RSP: 0018:ffff8801db305e10 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff850f177b
RDX: 000000000000000f RSI: 0000000063950237 RDI: ffff8801db32376c
RBP: ffff8801db306180 R08: 1ffff1003b660b03 R09: 0000000000000002
R10: ffff8801db305ce0 R11: ffffffff850f1728 R12: ffff8801bfd0c4f0
R13: 000000000000204e R14: ffff8801bfcb21c0 R15: ffff8801bfd0c4c0
FS:  00007fcbcfcb2700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020aaff09 CR3: 00000001c0066002 CR4: 00000000001606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 sctp_transport_route+0xa8/0x430 net/sctp/transport.c:293
 sctp_assoc_add_peer+0x4fe/0x1100 net/sctp/associola.c:655
 sctp_process_init+0x119/0x2390 net/sctp/sm_make_chunk.c:2328
 sctp_sf_do_5_1B_init+0x8c9/0xe80 net/sctp/sm_statefuns.c:411
 sctp_do_sm+0x18a/0x6a20 net/sctp/sm_sideeffect.c:1190
 sctp_endpoint_bh_rcv+0x379/0x8f0 net/sctp/endpointola.c:456
 sctp_inq_push+0x23b/0x300 net/sctp/inqueue.c:95
 sctp_rcv+0x29f3/0x35d0 net/sctp/input.c:267
 sctp6_rcv+0x15/0x30 net/sctp/ipv6.c:1006
 ip6_input_finish+0x37e/0x17a0 net/ipv6/ip6_input.c:284
 NF_HOOK include/linux/netfilter.h:250 [inline]
 ip6_input+0xe9/0x560 net/ipv6/ip6_input.c:327
 dst_input include/net/dst.h:466 [inline]
 ip6_rcv_finish+0x1a9/0x7a0 net/ipv6/ip6_input.c:71
 NF_HOOK include/linux/netfilter.h:250 [inline]
 ipv6_rcv+0xf37/0x1fa0 net/ipv6/ip6_input.c:208
 __netif_receive_skb_core+0x1a41/0x3460 net/core/dev.c:4473
 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4538
 process_backlog+0x203/0x740 net/core/dev.c:5217
 napi_poll net/core/dev.c:5615 [inline]
 net_rx_action+0x792/0x1910 net/core/dev.c:5681
 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285
 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1133
 </IRQ>
 do_softirq.part.21+0x14d/0x190 kernel/softirq.c:329
 do_softirq kernel/softirq.c:177 [inline]
 __local_bh_enable_ip+0x1ee/0x230 kernel/softirq.c:182
 local_bh_enable include/linux/bottom_half.h:32 [inline]
 rcu_read_unlock_bh include/linux/rcupdate.h:727 [inline]
 ip6_finish_output2+0xba6/0x23a0 net/ipv6/ip6_output.c:121
 ip6_finish_output+0x302/0x930 net/ipv6/ip6_output.c:146
 NF_HOOK_COND include/linux/netfilter.h:239 [inline]
 ip6_output+0x1eb/0x840 net/ipv6/ip6_output.c:163
 dst_output include/net/dst.h:460 [inline]
 NF_HOOK include/linux/netfilter.h:250 [inline]
 ip6_xmit+0xd84/0x2090 net/ipv6/ip6_output.c:269
 sctp_v6_xmit+0x438/0x630 net/sctp/ipv6.c:225
 sctp_packet_transmit+0x2270/0x3760 net/sctp/output.c:637
 sctp_outq_flush+0xab6/0x4060 net/sctp/outqueue.c:913
 sctp_outq_uncork+0x5a/0x70 net/sctp/outqueue.c:778
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1822 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1222 [inline]
 sctp_do_sm+0x50e/0x6a20 net/sctp/sm_sideeffect.c:1193
 sctp_primitive_ASSOCIATE+0x9d/0xd0 net/sctp/primitive.c:88
 sctp_sendmsg+0x143d/0x3360 net/sctp/socket.c:2001
 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763
 sock_sendmsg_nosec net/socket.c:636 [inline]
 sock_sendmsg+0xca/0x110 net/socket.c:646
 SYSC_sendto+0x361/0x5c0 net/socket.c:1727
 SyS_sendto+0x40/0x50 net/socket.c:1695
 entry_SYSCALL_64_fastpath+0x23/0x9a
RIP: 0033:0x4456c9
RSP: 002b:00007fcbcfcb1d98 EFLAGS: 00000212 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00000000006dac3c RCX: 00000000004456c9
RDX: 0000000000000001 RSI: 0000000020aaff09 RDI: 0000000000000007
RBP: 0000000000000000 R08: 0000000020abf000 R09: 000000000000001c
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006dac38
R13: 0000800000000001 R14: 0100000000000000 R15: 0000000000000008
Code: 10 00 00 e8 05 00 61 fc 48 8b 85 e8 fc ff ff 48 83 c0 78 48 89 c2 48 89 85 c0 fc ff ff 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 e9 15 00 00 48 8b 85 e8 fc ff ff 4c 8d b5 30 
RIP: __read_once_size include/linux/compiler.h:183 [inline] RSP: ffff8801db305e10
RIP: sctp_v6_get_dst+0x59e/0x1c60 net/sctp/ipv6.c:271 RSP: ffff8801db305e10
---[ end trace 78ff473f379b223f ]---

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/01/10 18:27 upstream cf1fb158230e 02a19b64 .config console log report syz C ci-upstream-kasan-gce
2018/01/10 18:27 upstream cf1fb158230e 02a19b64 .config console log report syz C ci-upstream-kasan-gce-386
2018/01/10 18:14 net-next-old 61ad64080e03 02a19b64 .config console log report syz C ci-upstream-net-kasan-gce
2018/01/10 18:28 mmots 69eed2290e1d 02a19b64 .config console log report syz C ci-upstream-mmots-kasan-gce
2018/01/10 18:27 linux-next b4464bcab38d 02a19b64 .config console log report syz C ci-upstream-next-kasan-gce
2018/01/10 17:22 net-next-old 61ad64080e03 02a19b64 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.