syzbot


general protection fault in sctp_sched_prio_sched

Status: fixed on 2019/08/05 13:45
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+c1a380d42b190ad1e559@syzkaller.appspotmail.com
Fix commit: 4d1415811e49 sctp: fix error handling on stream scheduler initialization
First crash: 1836d, last: 1822d
Cause bisection: introduced by (bisect log) :
commit 4ff40b86262b73553ee47cc3784ce8ba0f220bd8
Author: Xin Long <lucien.xin@gmail.com>
Date: Mon Jan 21 18:42:09 2019 +0000

  sctp: set chunk transport correctly when it's a new asoc

Crash: general protection fault in sctp_sched_prio_sched (log)
Repro: C syz .config
  
Discussions (9)
Title Replies (including bot) Last reply
[PATCH 5.2 00/66] 5.2.4-stable review 78 (78) 2019/07/29 15:12
[PATCH 5.1 00/62] 5.1.21-stable review 68 (68) 2019/07/29 09:02
[PATCH 4.19 00/50] 4.19.62-stable review 56 (56) 2019/07/29 09:02
[PATCH net] sctp: fix error handling on stream scheduler initialization 3 (3) 2019/07/02 02:02
Re: general protection fault in sctp_sched_prio_sched 3 (3) 2019/06/25 18:09
Reminder: 14 open syzbot bugs in "net/sctp" subsystem 1 (1) 2019/06/25 05:49
Re: general protection fault in sctp_sched_prio_sched 1 (1) 2019/06/18 14:53
Re: general protection fault in sctp_sched_prio_sched 1 (1) 2019/06/18 13:54
general protection fault in sctp_sched_prio_sched 0 (1) 2019/06/15 23:36

Sample crash report:
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8330 Comm: syz-executor666 Not tainted 5.2.0-rc3+ #52
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:sctp_sched_prio_sched+0x96/0x6f0 net/sctp/stream_sched_prio.c:132
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 0d 05 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 73 50 4d 8d 6e 20 4c 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 f4 04 00 00 4d 8b 7e 20 4d 85 ff 0f 84 f8 00 00
RSP: 0018:ffff88809e4e7448 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8880a9533b80 RCX: 1ffff11010347201
RDX: 0000000000000004 RSI: ffffffff8696a77e RDI: ffff8880a9533bd0
RBP: ffff88809e4e7488 R08: ffff88808bf8e300 R09: ffff88809e4e7580
R10: ffffed1013c9cee2 R11: 0000000000000003 R12: ffff8880a9533bc0
R13: 0000000000000020 R14: 0000000000000000 R15: ffff8880a4e92380
FS:  00007f48c9337700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f48c9315e78 CR3: 000000009db54000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 sctp_sched_prio_enqueue+0x117/0x170 net/sctp/stream_sched_prio.c:243
 sctp_cmd_send_msg net/sctp/sm_sideeffect.c:1101 [inline]
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1748 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1184 [inline]
 sctp_do_sm+0x2fd0/0x5190 net/sctp/sm_sideeffect.c:1155
 sctp_primitive_SEND+0xa0/0xd0 net/sctp/primitive.c:163
 sctp_sendmsg_to_asoc+0x1118/0x1f10 net/sctp/socket.c:1944
 sctp_sendmsg+0x109a/0x17d0 net/sctp/socket.c:2102
 inet_sendmsg+0x141/0x5d0 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xd7/0x130 net/socket.c:665
 sock_write_iter+0x27c/0x3e0 net/socket.c:994
 call_write_iter include/linux/fs.h:1872 [inline]
 new_sync_write+0x4d3/0x770 fs/read_write.c:483
 __vfs_write+0xe1/0x110 fs/read_write.c:496
 vfs_write+0x20c/0x580 fs/read_write.c:558
 ksys_write+0x14f/0x290 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x73/0xb0 fs/read_write.c:620
 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x447a69
Code: e8 cc e7 ff ff 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 3b 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f48c9336d88 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000006ddc38 RCX: 0000000000447a69
RDX: 0000000000010094 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 00000000006ddc30 R08: 00007f48c9337700 R09: 0000000000000000
R10: 00007f48c9337700 R11: 0000000000000246 R12: 00000000006ddc3c
R13: 00007f48c9336d90 R14: 00007f48c93379c0 R15: 00000000006ddc3c
Modules linked in:
---[ end trace 01e405583d741588 ]---
RIP: 0010:sctp_sched_prio_sched+0x96/0x6f0 net/sctp/stream_sched_prio.c:132
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 0d 05 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 73 50 4d 8d 6e 20 4c 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 f4 04 00 00 4d 8b 7e 20 4d 85 ff 0f 84 f8 00 00
RSP: 0018:ffff88809e4e7448 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8880a9533b80 RCX: 1ffff11010347201
RDX: 0000000000000004 RSI: ffffffff8696a77e RDI: ffff8880a9533bd0
RBP: ffff88809e4e7488 R08: ffff88808bf8e300 R09: ffff88809e4e7580
R10: ffffed1013c9cee2 R11: 0000000000000003 R12: ffff8880a9533bc0
R13: 0000000000000020 R14: 0000000000000000 R15: ffff8880a4e92380
FS:  00007f48c9337700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000460687 CR3: 000000009db54000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/15 15:53 net-old 35fc07aee8f6 442206d7 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/06/15 15:01 net-old 35fc07aee8f6 442206d7 .config console log report ci-upstream-net-this-kasan-gce
2019/06/29 16:30 net-next-old 5cdda5f1d6ad 7509bf36 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.