Re: general protection fault in rb_erase (2)

From: syzbot
Date: Thu Jun 06 2019 - 00:03:12 EST


syzbot has found a reproducer for the following crash on:

HEAD commit: 156c0591 Merge tag 'linux-kselftest-5.2-rc4' of git://git...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15790062a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=60564cb52ab29d5b
dashboard link: https://syzkaller.appspot.com/bug?extid=e8c40862180d8949d624
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11f031fea00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+e8c40862180d8949d624@xxxxxxxxxxxxxxxxxxxxxxxxx

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: 9547 Comm: syz-executor.4 Not tainted 5.2.0-rc3+ #20
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:rb_set_parent_color include/linux/rbtree_augmented.h:119 [inline]
RIP: 0010:____rb_erase_color lib/rbtree.c:363 [inline]
RIP: 0010:rb_erase+0x715/0x1c10 lib/rbtree.c:450
Code: 00 00 4c 89 f1 49 89 44 24 10 48 c1 e9 03 80 3c 19 00 0f 85 77 14 00 00 48 89 c1 4d 89 e5 4d 89 67 08 48 c1 e9 03 49 83 cd 01 <80> 3c 19 00 0f 85 63 0f 00 00 4c 89 e1 4c 89 28 48 c1 e9 03 80 3c
RSP: 0018:ffff8880ae809d50 EFLAGS: 00010082
RAX: a252000010b71f27 RBX: dffffc0000000000 RCX: 144a40000216e3e4
RDX: ffffed1015d04db8 RSI: ffff8880ae826dc0 RDI: ffff888079b6fac0
RBP: ffff8880ae809d98 R08: ffff888079b6fac8 R09: ffffed1015d06be0
R10: ffffed1015d06bdf R11: ffff8880ae835efb R12: ffff888079b6fab8
R13: ffff888079b6fab9 R14: ffff8880852c6048 R15: ffff8880852c6040
FS: 00005555563c1940(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000022f2e80 CR3: 000000008d675000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
timerqueue_del+0x86/0x150 lib/timerqueue.c:74
__remove_hrtimer+0xa8/0x1c0 kernel/time/hrtimer.c:975
__run_hrtimer kernel/time/hrtimer.c:1371 [inline]
__hrtimer_run_queues+0x2a8/0xdd0 kernel/time/hrtimer.c:1451
hrtimer_interrupt+0x314/0x770 kernel/time/hrtimer.c:1509
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1041 [inline]
smp_apic_timer_interrupt+0x111/0x550 arch/x86/kernel/apic/apic.c:1066
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:806
</IRQ>
Modules linked in:

======================================================