syzbot


general protection fault in sctp_sched_rr_dequeue

Status: fixed on 2019/03/28 12:00
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+4c9934f20522c0efd657@syzkaller.appspotmail.com
Fix commit: 2e990dfd1397 sctp: remove sched init from sctp_stream_init
First crash: 1877d, last: 1867d
Cause bisection: introduced by (bisect log) :
commit 7efba10d6bd22030fb5931e50bf97496f932f00e
Author: Xin Long <lucien.xin@gmail.com>
Date: Mon Jan 28 07:08:46 2019 +0000

  sctp: add SCTP_FUTURE_ASOC and SCTP_CURRENT_ASSOC for SCTP_STREAM_SCHEDULER sockopt

Crash: general protection fault in sctp_sched_rr_dequeue (log)
Repro: C syz .config
  
Discussions (5)
Title Replies (including bot) Last reply
[PATCH 5.0 00/43] 5.0.3-stable review 50 (50) 2019/03/19 12:20
[PATCH 4.20 00/52] 4.20.17-stable review 56 (56) 2019/03/19 10:34
[PATCH 4.19 00/52] 4.19.30-stable review 57 (57) 2019/03/19 10:34
general protection fault in sctp_sched_rr_dequeue 3 (5) 2019/03/11 13:19
[PATCH net] sctp: remove sched init from sctp_stream_init 4 (4) 2019/03/08 19:25

Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 7593 Comm: syz-executor813 Not tainted 5.0.0+ #7
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:sctp_sched_rr_dequeue+0xd3/0x170 net/sctp/stream_sched_rr.c:141
Code: ea 03 80 3c 02 00 0f 85 a2 00 00 00 48 8b 5b 08 e8 62 20 ee fa 48 8d 7b 30 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 53 4c 8b 6b 30 4c 89 e7 49 83 ed 18 4c 89 ee e8 b4
RSP: 0018:ffff88809024f040 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8679cd9f
RDX: 0000000000000006 RSI: ffffffff8681c41e RDI: 0000000000000030
RBP: ffff88809024f058 R08: ffff888090514180 R09: 0000000000000002
R10: ffffed1015d05bcf R11: ffff8880ae82de7b R12: ffff88808fcd72e0
R13: ffff88808fcd6bc0 R14: dffffc0000000000 R15: ffff88809024f198
FS:  0000000000d97880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 00000000a5b8d000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 sctp_outq_dequeue_data net/sctp/outqueue.c:90 [inline]
 sctp_outq_flush_data net/sctp/outqueue.c:1079 [inline]
 sctp_outq_flush+0xba2/0x2790 net/sctp/outqueue.c:1205
 sctp_outq_uncork+0x6c/0x80 net/sctp/outqueue.c:772
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1820 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1220 [inline]
 sctp_do_sm+0x513/0x5390 net/sctp/sm_sideeffect.c:1191
 sctp_assoc_bh_rcv+0x343/0x660 net/sctp/associola.c:1074
 sctp_inq_push+0x1ea/0x290 net/sctp/inqueue.c:95
 sctp_backlog_rcv+0x189/0xbc0 net/sctp/input.c:354
 sk_backlog_rcv include/net/sock.h:937 [inline]
 __release_sock+0x12e/0x3a0 net/core/sock.c:2413
 release_sock+0x59/0x1c0 net/core/sock.c:2929
 sctp_wait_for_connect+0x316/0x540 net/sctp/socket.c:8999
 sctp_sendmsg_to_asoc+0x13e2/0x17d0 net/sctp/socket.c:1968
 sctp_sendmsg+0x10a9/0x17e0 net/sctp/socket.c:2114
 inet_sendmsg+0x147/0x5d0 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xdd/0x130 net/socket.c:632
 ___sys_sendmsg+0x806/0x930 net/socket.c:2137
 __sys_sendmsg+0x105/0x1d0 net/socket.c:2175
 __do_sys_sendmsg net/socket.c:2184 [inline]
 __se_sys_sendmsg net/socket.c:2182 [inline]
 __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2182
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440159
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffcaa5bef08 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440159
RDX: 0000000000000000 RSI: 000000002001afc8 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000002 R09: 00000000004002c8
R10: 0000000000000008 R11: 0000000000000246 R12: 00000000004019e0
R13: 0000000000401a70 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace ef0ebf2f1bb10a42 ]---
RIP: 0010:sctp_sched_rr_dequeue+0xd3/0x170 net/sctp/stream_sched_rr.c:141
Code: ea 03 80 3c 02 00 0f 85 a2 00 00 00 48 8b 5b 08 e8 62 20 ee fa 48 8d 7b 30 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 53 4c 8b 6b 30 4c 89 e7 49 83 ed 18 4c 89 ee e8 b4
RSP: 0018:ffff88809024f040 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8679cd9f
RDX: 0000000000000006 RSI: ffffffff8681c41e RDI: 0000000000000030
RBP: ffff88809024f058 R08: ffff888090514180 R09: 0000000000000002
R10: ffffed1015d05bcf R11: ffff8880ae82de7b R12: ffff88808fcd72e0
R13: ffff88808fcd6bc0 R14: dffffc0000000000 R15: ffff88809024f198
FS:  0000000000d97880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 00000000a5b8d000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/06 01:15 upstream 63bdf4284c38 16559f86 .config console log report syz C ci-upstream-kasan-gce-root
2019/03/06 00:50 upstream 63bdf4284c38 16559f86 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/03/06 00:50 upstream 63bdf4284c38 16559f86 .config console log report syz C ci-upstream-kasan-gce
2019/03/06 00:49 upstream 63bdf4284c38 16559f86 .config console log report syz C ci-upstream-kasan-gce-smack-root
2019/03/06 00:51 upstream 63bdf4284c38 16559f86 .config console log report syz C ci-upstream-kasan-gce-386
2019/03/06 00:49 net-old d9862cfbe209 16559f86 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/03/06 00:28 net-next-old d9862cfbe209 16559f86 .config console log report syz C ci-upstream-net-kasan-gce
2019/03/06 00:50 linux-next baf5a9d1f9b9 16559f86 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/03/06 22:33 net-next-old d9862cfbe209 18215b8d .config console log report ci-upstream-net-kasan-gce
2019/03/06 00:02 net-next-old d9862cfbe209 16559f86 .config console log report ci-upstream-net-kasan-gce
2019/03/16 02:20 linux-next cf08baa29613 bab43553 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.