bisecting fixing commit since 414e6c8e941caae43f7b25f8014c2b5e2100679d
building syzkaller on e22c3da3b05600c6c0f62142160839b4b7f82a62
testing commit 414e6c8e941caae43f7b25f8014c2b5e2100679d
compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: 57cc7b2c134b59da79d0054a3ab325e253d802d120d8d4ea17a9eac889634295
run #0: crashed: KASAN: slab-out-of-bounds Read in ip6_pol_route
run #1: crashed: general protection fault in process_one_work
run #2: crashed: general protection fault in process_one_work
run #3: crashed: BUG: corrupted list in insert_work
run #4: crashed: BUG: corrupted list in insert_work
run #5: crashed: general protection fault in process_one_work
run #6: crashed: BUG: unable to handle kernel paging request in dst_dev_put
run #7: crashed: BUG: corrupted list in insert_work
run #8: crashed: BUG: corrupted list in insert_work
run #9: crashed: BUG: corrupted list in insert_work
run #10: crashed: BUG: corrupted list in insert_work
run #11: crashed: BUG: corrupted list in insert_work
run #12: crashed: BUG: corrupted list in insert_work
run #13: crashed: BUG: corrupted list in insert_work
run #14: crashed: general protection fault in process_one_work
run #15: crashed: BUG: corrupted list in insert_work
run #16: crashed: BUG: corrupted list in process_one_work
run #17: crashed: BUG: corrupted list in insert_work
run #18: crashed: BUG: corrupted list in insert_work
run #19: crashed: BUG: corrupted list in insert_work
testing current HEAD de64d941a71a8421904c4474415ce7879596f313
testing commit de64d941a71a8421904c4474415ce7879596f313
compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: 10a378eb2c4d7495d341cf83da48d031d30db43fddea93ea08e4da4bcd52ad98
run #0: crashed: KASAN: slab-out-of-bounds Read in ip6_pol_route
run #1: crashed: general protection fault in dst_dev_put
run #2: crashed: BUG: corrupted list in process_one_work
run #3: crashed: general protection fault in process_one_work
run #4: crashed: BUG: corrupted list in process_one_work
run #5: crashed: BUG: corrupted list in process_one_work
run #6: crashed: BUG: corrupted list in insert_work
run #7: crashed: BUG: corrupted list in insert_work
run #8: crashed: general protection fault in process_one_work
run #9: crashed: BUG: corrupted list in insert_work
revisions tested: 2, total time: 24m14.511691583s (build: 12m55.500690928s, test: 10m34.354253842s)
the crash still happens on HEAD
commit msg: Merge 5.10.112 into android12-5.10-lts
crash: BUG: corrupted list in insert_work
list_add corruption. prev->next should be next (ffff8881f735c360), but was ffff88810d434070. (prev=ffff88810d434070).
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:26!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 875 Comm: syz-executor.5 Not tainted 5.10.112-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_add_valid.cold+0x3a/0x3c lib/list_debug.c:26
Code: 0b 48 89 f2 4c 89 e1 4c 89 ee 48 c7 c7 60 20 c0 84 e8 20 f1 fd ff 0f 0b 48 89 f1 48 c7 c7 e0 1f c0 84 4c 89 e6 e8 0c f1 fd ff <0f> 0b 4c 89 e6 48 c7 c7 80 21 c0 84 e8 fb f0 fd ff 0f 0b 4c 89 f2
RSP: 0018:ffffc90000160c68 EFLAGS: 00010086
RAX: 0000000000000075 RBX: ffff88810d434068 RCX: 0000000000000000
RDX: 0000000000000103 RSI: 0000000000000008 RDI: fffff5200002c180
RBP: ffffc90000160c80 R08: 0000000000000075 R09: ffffc9000016088f
R10: fffff5200002c111 R11: 0000000000013f98 R12: ffff8881f735c360
R13: ffff88810d434070 R14: ffff8881f735c360 R15: ffff8881f7355a40
FS: 00007f6648482700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f854233e718 CR3: 0000000119a4d000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__list_add include/linux/list.h:67 [inline]
list_add_tail include/linux/list.h:100 [inline]
insert_work+0xe6/0x380 kernel/workqueue.c:1352
__queue_work+0x42c/0xc30 kernel/workqueue.c:1514
queue_work_on+0x48/0x50 kernel/workqueue.c:1541
queue_work include/linux/workqueue.h:513 [inline]
css_release+0xb1/0x110 kernel/cgroup/cgroup.c:5161
percpu_ref_put_many include/linux/percpu-refcount.h:322 [inline]
percpu_ref_put include/linux/percpu-refcount.h:338 [inline]
percpu_ref_call_confirm_rcu lib/percpu-refcount.c:162 [inline]
percpu_ref_switch_to_atomic_rcu+0x2cf/0x470 lib/percpu-refcount.c:199
rcu_do_batch+0x414/0xbd0 kernel/rcu/tree.c:2485
rcu_core+0x46d/0xab0 kernel/rcu/tree.c:2722
rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2735
__do_softirq+0x1c6/0x61c kernel/softirq.c:305
asm_call_irq_on_stack+0xf/0x20
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0x61/0x80 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:402 [inline]
__irq_exit_rcu kernel/softirq.c:432 [inline]
irq_exit_rcu+0x95/0x170 kernel/softirq.c:444
sysvec_apic_timer_interrupt+0x3f/0xe0 arch/x86/kernel/apic/apic.c:1095
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635
RIP: 0010:preempt_schedule_irq+0x49/0x90 kernel/sched/core.c:5052
Code: 55 48 89 e5 41 54 53 65 48 8b 1c 25 00 6e 02 00 49 89 dc 49 c1 ec 03 49 01 c4 bf 01 00 00 00 e8 dd eb 2b fd fb bf 01 00 00 00 02 d9 ff ff fa bf 01 00 00 00 e8 97 c9 2b fd be 08 00 00 00 48
RSP: 0018:ffffc90001ecf7d8 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ffff888118bf6180 RCX: 1ffffffff0c627d0
RDX: 1ffff1102317ed70 RSI: 0000000000000000 RDI: 0000000000000001
RBP: ffffc90001ecf7e8 R08: 0000000000000000 R09: ffff888118bf6187
R10: ffffed102317ec30 R11: 0000000000000000 R12: ffffed102317ec30
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
irqentry_exit_cond_resched kernel/entry/common.c:357 [inline]
irqentry_exit_cond_resched kernel/entry/common.c:349 [inline]
irqentry_exit+0x53/0x60 kernel/entry/common.c:387
sysvec_reschedule_ipi+0x6a/0x70 arch/x86/kernel/smp.c:225
asm_sysvec_reschedule_ipi+0x12/0x20 arch/x86/include/asm/idtentry.h:640
RIP: 0010:dump_stack_lvl+0xa3/0xac lib/dump_stack.c:124
Code: 4c 89 e2 e8 c2 47 fd ff 85 db 75 1b be 04 00 00 00 48 c7 c7 e0 45 aa 85 e8 64 0e 8a fd c7 05 1a e4 a8 01 ff ff ff ff 41 55 9d <5b> 41 5c 41 5d 41 5e 5d c3 55 48 c7 c7 a0 5c c1 84 48 89 e5 e8 44
RSP: 0018:ffffc90001ecf8d8 EFLAGS: 00000286
RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff840161bc
RDX: fffffbfff0b548bc RSI: 0000000000000004 RDI: ffffffff85aa45e0
RBP: ffffc90001ecf8f8 R08: 0000000000000001 R09: 0000000000000003
R10: fffffbfff0b548bc R11: 0000000000013f48 R12: ffffffff84c15ca0
R13: 0000000000000286 R14: 00000000ffffffff R15: 0000000000000000
dump_stack+0x10/0x12 lib/dump_stack.c:135
fail_dump lib/fault-inject.c:52 [inline]
should_fail.cold+0x5/0xa lib/fault-inject.c:146
__should_failslab+0xb6/0x100 mm/failslab.c:33
should_failslab+0x9/0x20 mm/slab_common.c:1229
slab_pre_alloc_hook mm/slab.h:558 [inline]
slab_alloc_node mm/slub.c:2877 [inline]
slab_alloc mm/slub.c:2964 [inline]
kmem_cache_alloc_trace+0x2d/0x520 mm/slub.c:2981
kmalloc include/linux/slab.h:552 [inline]
kzalloc include/linux/slab.h:664 [inline]
percpu_ref_init+0xb6/0x300 lib/percpu-refcount.c:75
css_create kernel/cgroup/cgroup.c:5259 [inline]
cgroup_apply_control_enable+0x464/0xd60 kernel/cgroup/cgroup.c:3110
cgroup_apply_control kernel/cgroup/cgroup.c:3192 [inline]
cgroup_subtree_control_write+0x6d9/0xad0 kernel/cgroup/cgroup.c:3350
cgroup_file_write+0x193/0x740 kernel/cgroup/cgroup.c:3793
kernfs_fop_write_iter+0x2e4/0x460 fs/kernfs/file.c:296
call_write_iter include/linux/fs.h:1947 [inline]
new_sync_write+0x358/0x6d0 fs/read_write.c:518
vfs_write+0x4f5/0x750 fs/read_write.c:605
ksys_write+0x111/0x210 fs/read_write.c:658
__do_sys_write fs/read_write.c:670 [inline]
__se_sys_write fs/read_write.c:667 [inline]
__x64_sys_write+0x6e/0xb0 fs/read_write.c:667
do_syscall_64+0x32/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f664852d049
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6648482168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f6648640030 RCX: 00007f664852d049
RDX: 0000000000000006 RSI: 0000000020000140 RDI: 0000000000000004
RBP: 00007f66484821d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe13af10cf R14: 00007f6648482300 R15: 0000000000022000
Modules linked in:
---[ end trace fb5c08228dd8322c ]---
RIP: 0010:__list_add_valid.cold+0x3a/0x3c lib/list_debug.c:26
Code: 0b 48 89 f2 4c 89 e1 4c 89 ee 48 c7 c7 60 20 c0 84 e8 20 f1 fd ff 0f 0b 48 89 f1 48 c7 c7 e0 1f c0 84 4c 89 e6 e8 0c f1 fd ff <0f> 0b 4c 89 e6 48 c7 c7 80 21 c0 84 e8 fb f0 fd ff 0f 0b 4c 89 f2
RSP: 0018:ffffc90000160c68 EFLAGS: 00010086
RAX: 0000000000000075 RBX: ffff88810d434068 RCX: 0000000000000000
RDX: 0000000000000103 RSI: 0000000000000008 RDI: fffff5200002c180
RBP: ffffc90000160c80 R08: 0000000000000075 R09: ffffc9000016088f
R10: fffff5200002c111 R11: 0000000000013f98 R12: ffff8881f735c360
R13: ffff88810d434070 R14: ffff8881f735c360 R15: ffff8881f7355a40
FS: 00007f6648482700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f854233e718 CR3: 0000000119a4d000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
4: 41 54 push %r12
6: 53 push %rbx
7: 65 48 8b 1c 25 00 6e mov %gs:0x26e00,%rbx
e: 02 00
10: 49 89 dc mov %rbx,%r12
13: 49 c1 ec 03 shr $0x3,%r12
17: 49 01 c4 add %rax,%r12
1a: bf 01 00 00 00 mov $0x1,%edi
1f: e8 dd eb 2b fd callq 0xfd2bec01
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 02 d9 ff ff callq 0xffffd931 <-- trapping instruction
2f: fa cli
30: bf 01 00 00 00 mov $0x1,%edi
35: e8 97 c9 2b fd callq 0xfd2bc9d1
3a: be 08 00 00 00 mov $0x8,%esi
3f: 48 rex.W