Re: general protection fault in scheduler_tick

From: Dmitry Vyukov
Date: Mon Jul 09 2018 - 01:49:16 EST


On Mon, Jul 9, 2018 at 5:09 AM, syzbot
<syzbot+c840410f5e0567496967@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit: 526674536360 Add linux-next specific files for 20180706
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=17f63968400000
> kernel config: https://syzkaller.appspot.com/x/.config?x=c8d1cfc0cb798e48
> dashboard link: https://syzkaller.appspot.com/bug?extid=c840410f5e0567496967
> compiler: gcc (GCC) 8.0.1 20180413 (experimental)
> syzkaller repro:https://syzkaller.appspot.com/x/repro.syz?x=16e50594400000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=129180c8400000
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+c840410f5e0567496967@xxxxxxxxxxxxxxxxxxxxxxxxx


#syz fix: bpf: sockhash, disallow bpf_tcp_close and update in parallel

> 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
> CPU: 0 PID: -1996936928 Comm: ïï× ïïïutor Not tainted
> 4.18.0-rc3-next-20180706+ #1
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
> Google 01/01/2011
> RIP: 0010:scheduler_tick+0x170/0x430 kernel/sched/core.c:3078
> Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 9a 02 00 00 48 ba 00 00 00 00
> 00 fc ff df 49 8b 47 78 48 8d 78 78 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85
> 5f 02 00 00 48 8b 40 78 31 d2 4c 89 fe 48 89 df
> RSP: 0018:ffff8801dae07a00 EFLAGS: 00010006
> RAX: 0000000000000000 RBX: ffff8801dae2c980 RCX: 000000000000000f
> RDX: dffffc0000000000 RSI: 0000000000000008 RDI: 0000000000000078
> RBP: ffff8801dae07ae0 R08: ffff88021fff8018 R09: ffff88021fff801b
> R10: ffffed0043fff001 R11: 0000000000000000 R12: 0000000000000000
> R13: ffff8801dae07a38 R14: ffff8801dae07ab8 R15: ffff8801a9d7e080
> FS: 00007ff7f2704700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000000000000130 CR3: 0000000008e6a000 CR4: 00000000001406f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <IRQ>
> update_process_times+0x51/0x70 kernel/time/timer.c:1641
> tick_sched_handle+0x9f/0x180 kernel/time/tick-sched.c:164
> tick_sched_timer+0x45/0x130 kernel/time/tick-sched.c:1274
> __run_hrtimer kernel/time/hrtimer.c:1398 [inline]
> __hrtimer_run_queues+0x3eb/0x10c0 kernel/time/hrtimer.c:1460
> hrtimer_interrupt+0x2f3/0x750 kernel/time/hrtimer.c:1518
> local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline]
> smp_apic_timer_interrupt+0x165/0x730 arch/x86/kernel/apic/apic.c:1050
> apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:867
> </IRQ>
> Modules linked in:
> Dumping ftrace buffer:
> (ftrace buffer empty)
> ---[ end trace 40913575008fbda0 ]---
> RIP: 0010:scheduler_tick+0x170/0x430 kernel/sched/core.c:3078
> Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 9a 02 00 00 48 ba 00 00 00 00
> 00 fc ff df 49 8b 47 78 48 8d 78 78 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85
> 5f 02 00 00 48 8b 40 78 31 d2 4c 89 fe 48 89 df
> RSP: 0018:ffff8801dae07a00 EFLAGS: 00010006
> RAX: 0000000000000000 RBX: ffff8801dae2c980 RCX: 000000000000000f
> RDX: dffffc0000000000 RSI: 0000000000000008 RDI: 0000000000000078
> RBP: ffff8801dae07ae0 R08: ffff88021fff8018 R09: ffff88021fff801b
> R10: ffffed0043fff001 R11: 0000000000000000 R12: 0000000000000000
> R13: ffff8801dae07a38 R14: ffff8801dae07ab8 R15: ffff8801a9d7e080
> FS: 00007ff7f2704700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000000000000130 CR3: 0000000008e6a000 CR4: 00000000001406f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
>
>
> ---
> This bug is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxxx
>
> syzbot will keep track of this bug report. See:
> https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
> syzbot.
> syzbot can test patches for this bug, for details see:
> https://goo.gl/tpsmEJ#testing-patches
>
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-bugs+unsubscribe@xxxxxxxxxxxxxxxxx
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-bugs/000000000000fcc4db05708855b0%40google.com.
> For more options, visit https://groups.google.com/d/optout.