bisecting fixing commit since a03957ab0fd5d7d03b512a72ab9106a1749f556e building syzkaller on 1bfa09b9672821334a7ed926244ebc39910b84f4 testing commit a03957ab0fd5d7d03b512a72ab9106a1749f556e with gcc (GCC) 8.1.0 kernel signature: 31edc5c82b38c8c22152ff0b5525e0b4c583741ec4a184cc4ef8ebf4b589b7f9 run #0: crashed: general protection fault in flex_array_get run #1: crashed: general protection fault in flex_array_get run #2: crashed: general protection fault in flex_array_get run #3: crashed: general protection fault in corrupted run #4: crashed: general protection fault in flex_array_get run #5: crashed: general protection fault in flex_array_get run #6: crashed: general protection fault in flex_array_get run #7: crashed: general protection fault in flex_array_get run #8: crashed: general protection fault in flex_array_get run #9: crashed: general protection fault in flex_array_get testing current HEAD 43d555d83c3f1fb8168367ca5b47c3a6570ca487 testing commit 43d555d83c3f1fb8168367ca5b47c3a6570ca487 with gcc (GCC) 8.1.0 kernel signature: 166d3a4a99d270b5240727e97937e3c5d4c81fe7111a16e574d03e8c55c958a7 all runs: crashed: general protection fault in flex_array_get revisions tested: 2, total time: 24m5.678023613s (build: 16m51.576457129s, test: 6m27.817660158s) the crash still happens on HEAD commit msg: Linux 4.19.169 crash: general protection fault in flex_array_get RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb481e1f6d4 R13: 00000000004c6075 R14: 00000000004da858 R15: 0000000000000005 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: 1 PID: 6694 Comm: syz-executor.1 Not tainted 4.19.169-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:flex_array_get+0x23/0x240 lib/flex_array.c:320 Code: 90 90 90 90 90 90 90 48 b8 00 00 00 00 00 fc ff df 55 48 89 fa 48 89 e5 48 c1 ea 03 41 56 41 55 41 54 53 48 89 fb 48 83 ec 10 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 8d 01 00 00 44 8b 33 45 85 f6 RSP: 0018:ffff8881ee9af5a8 EFLAGS: 00010282 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1103a7c2d96 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff8881ee9af5d8 R08: ffff8881ee9af908 R09: ffffed103ed24732 R10: ffffed103ed24732 R11: ffff8881f6923993 R12: ffff8881ce6e6640 R13: ffff8881c4c00f84 R14: ffff8881efac6980 R15: 1ffff11039cdcdb1 FS: 00007fe7777c3700(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000710d74 CR3: 00000001d4657003 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: sctp_stream_out include/net/sctp/structs.h:1474 [inline] sctp_sched_dequeue_done+0x1d8/0x300 net/sctp/stream_sched.c:255 __sctp_outq_teardown+0x660/0xc30 net/sctp/outqueue.c:268 sctp_outq_free+0x9/0x10 net/sctp/outqueue.c:292 sctp_association_free+0x1d5/0x720 net/sctp/associola.c:361 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:944 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1332 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x989/0x4e50 net/sctp/sm_sideeffect.c:1170 sctp_primitive_SHUTDOWN+0x7c/0xc0 net/sctp/primitive.c:104 sctp_close+0x354/0x750 net/sctp/socket.c:1560 inet_release+0xb9/0x1b0 net/ipv4/af_inet.c:427 __sock_release+0xc7/0x2a0 net/socket.c:579 sock_close+0x10/0x20 net/socket.c:1140 __fput+0x24c/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x10e/0x190 kernel/task_work.c:113 get_signal+0x13ba/0x1a30 kernel/signal.c:2400 do_signal+0x87/0x1960 arch/x86/kernel/signal.c:821 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access exit_to_usermode_loop+0x114/0x200 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x419/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458e29 Code: 2d b8 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 fb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe7777c2c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: 000000000001fff8 RBX: 00007fe7777c2c90 RCX: 0000000000458e29 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe7777c36d4 R13: 00000000004c6075 R14: 00000000004da858 R15: 0000000000000005 Modules linked in: general protection fault: 0000 [#2] PREEMPT SMP KASAN ---[ end trace 47e19707101cd391 ]--- CPU: 0 PID: 6698 Comm: syz-executor.4 Tainted: G D 4.19.169-syzkaller #0 RIP: 0010:flex_array_get+0x23/0x240 lib/flex_array.c:320 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:flex_array_get+0x23/0x240 lib/flex_array.c:320 Code: 90 90 90 90 90 90 90 48 b8 00 00 00 00 00 fc ff df 55 48 89 fa 48 89 e5 48 c1 ea 03 41 56 41 55 41 54 53 48 89 fb 48 83 ec 10 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 8d 01 00 00 44 8b 33 45 85 f6 RSP: 0018:ffff8881ce7b75a8 EFLAGS: 00010282 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1103e60a1e6 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff8881ce7b75d8 R08: ffff8881ce7b7908 R09: 0000000000000000 R10: ffffed1039cf6ec9 R11: 0000000000000000 R12: ffff8881ee198580 R13: ffff8881c4c81004 R14: ffff8881f3307800 R15: 1ffff1103dc33199 FS: 00007fb481e1f700(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007efdc2d72000 CR3: 00000001d91c3003 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: sctp_stream_out include/net/sctp/structs.h:1474 [inline] sctp_sched_dequeue_done+0x1d8/0x300 net/sctp/stream_sched.c:255 __sctp_outq_teardown+0x660/0xc30 net/sctp/outqueue.c:268 sctp_outq_free+0x9/0x10 net/sctp/outqueue.c:292 Code: 90 90 90 90 90 90 90 48 b8 00 00 00 00 00 fc ff df 55 48 89 fa 48 89 e5 48 c1 ea 03 41 56 41 55 41 54 53 48 89 fb 48 83 ec 10 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 8d 01 00 00 44 8b 33 45 85 f6 sctp_association_free+0x1d5/0x720 net/sctp/associola.c:361 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:944 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1332 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x989/0x4e50 net/sctp/sm_sideeffect.c:1170 RSP: 0018:ffff8881ee9af5a8 EFLAGS: 00010282 sctp_primitive_SHUTDOWN+0x7c/0xc0 net/sctp/primitive.c:104 sctp_close+0x354/0x750 net/sctp/socket.c:1560 inet_release+0xb9/0x1b0 net/ipv4/af_inet.c:427 __sock_release+0xc7/0x2a0 net/socket.c:579 sock_close+0x10/0x20 net/socket.c:1140 __fput+0x24c/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x10e/0x190 kernel/task_work.c:113 get_signal+0x13ba/0x1a30 kernel/signal.c:2400 do_signal+0x87/0x1960 arch/x86/kernel/signal.c:821 exit_to_usermode_loop+0x114/0x200 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x419/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458e29 Code: 2d b8 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 fb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fb481e1ec78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: 000000000001fff8 RBX: 00007fb481e1ec90 RCX: 0000000000458e29 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb481e1f6d4 R13: 00000000004c6075 R14: 00000000004da858 R15: 0000000000000005 Modules linked in: ---[ end trace 47e19707101cd392 ]--- RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1103a7c2d96 RIP: 0010:flex_array_get+0x23/0x240 lib/flex_array.c:320 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 Code: 90 90 90 90 90 90 90 48 b8 00 00 00 00 00 fc ff df 55 48 89 fa 48 89 e5 48 c1 ea 03 41 56 41 55 41 54 53 48 89 fb 48 83 ec 10 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 8d 01 00 00 44 8b 33 45 85 f6 RBP: ffff8881ee9af5d8 R08: ffff8881ee9af908 R09: ffffed103ed24732 RSP: 0018:ffff8881ee9af5a8 EFLAGS: 00010282 R10: ffffed103ed24732 R11: ffff8881f6923993 R12: ffff8881ce6e6640 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1103a7c2d96 R13: ffff8881c4c00f84 R14: ffff8881efac6980 R15: 1ffff11039cdcdb1 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 FS: 00007fe7777c3700(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 RBP: ffff8881ee9af5d8 R08: ffff8881ee9af908 R09: ffffed103ed24732 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000007121b4 CR3: 00000001d4657003 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400