bisecting fixing commit since c3038e718a19fc596f7b1baba0f83d5146dc7784 building syzkaller on 04ca72cd45348daab9d896bbec8ea4c2d13455ac testing commit c3038e718a19fc596f7b1baba0f83d5146dc7784 with gcc (GCC) 8.1.0 kernel signature: 739e26d8cfeef1cef03ce3c7a810c316b3c6403f8a69498511072e8b87e9c3a2 run #0: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #1: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #2: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #3: crashed: KASAN: use-after-free Read in bpf_prog_kallsyms_find run #4: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #5: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #6: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #7: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #8: crashed: KASAN: use-after-free Read in bpf_prog_kallsyms_find run #9: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find testing current HEAD a083db76118d20d070794ecf79af17843406c3f6 testing commit a083db76118d20d070794ecf79af17843406c3f6 with gcc (GCC) 8.1.0 kernel signature: d6be9a70922a3a7d454d5223d6b49f6092c9e0807a40532fc630105296e22316 run #0: crashed: KASAN: use-after-free Read in bpf_prog_kallsyms_find run #1: crashed: KASAN: use-after-free Read in bpf_prog_kallsyms_find run #2: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #3: crashed: WARNING in bpf_prog_kallsyms_find run #4: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #5: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #6: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #7: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #8: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find run #9: crashed: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find revisions tested: 2, total time: 31m33.37043973s (build: 19m13.430797142s, test: 11m2.039899549s) the crash still happens on HEAD commit msg: Linux 4.19.107 crash: BUG: unable to handle kernel paging request in bpf_prog_kallsyms_find BUG: unable to handle kernel paging request at ffffc90001959030 PGD 12c2f0067 P4D 12c2f0067 PUD 21bc31067 PMD 219f53067 PTE 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 29056 Comm: syz-executor.0 Not tainted 4.19.107-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:bpf_jit_binary_hdr include/linux/filter.h:699 [inline] RIP: 0010:bpf_get_prog_addr_region kernel/bpf/core.c:380 [inline] RIP: 0010:bpf_tree_comp kernel/bpf/core.c:437 [inline] RIP: 0010:__lt_find include/linux/rbtree_latch.h:115 [inline] RIP: 0010:latch_tree_find include/linux/rbtree_latch.h:208 [inline] RIP: 0010:bpf_prog_kallsyms_find+0xc3/0x2e0 kernel/bpf/core.c:511 Code: 03 42 80 3c 30 00 0f 85 1c 01 00 00 4d 8b 6f 50 49 8d 7d 30 48 89 f8 48 c1 e8 03 42 80 3c 30 00 0f 85 50 01 00 00 49 8d 7d 02 <49> 8b 5d 30 48 89 f8 49 89 f9 48 c1 e8 03 41 83 e1 07 42 0f b6 04 RSP: 0018:ffff88808b84f6f0 EFLAGS: 00010246 RAX: 1ffff9200032b206 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 000000000001d11c RDI: ffffc90001959002 RBP: ffff88808b84f730 R08: ffffffff87e0dbc0 R09: ffffed1015d64732 R10: ffffed1015d64732 R11: ffff8880aeb23993 R12: ffff888091921ab0 R13: ffffc90001959000 R14: dffffc0000000000 R15: ffff888091921ab0 FS: 00000000026c6940(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90001959030 CR3: 0000000097859000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: is_bpf_text_address+0x48/0xe0 kernel/bpf/core.c:546 kernel_text_address+0x79/0xf0 kernel/extable.c:152 __kernel_text_address+0xd/0x40 kernel/extable.c:107 unwind_get_return_address+0x61/0xa0 arch/x86/kernel/unwind_frame.c:18 __save_stack_trace+0x9c/0x100 arch/x86/kernel/stacktrace.c:45 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc mm/slab.c:3397 [inline] kmem_cache_alloc_trace+0x13b/0x740 mm/slab.c:3623 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] get_undo_list ipc/sem.c:1816 [inline] copy_semundo+0xf5/0x220 ipc/sem.c:2252 copy_process.part.34+0x1b7d/0x7390 kernel/fork.c:1882 copy_process kernel/fork.c:1694 [inline] _do_fork+0x15d/0xba0 kernel/fork.c:2207 __do_sys_clone kernel/fork.c:2314 [inline] __se_sys_clone kernel/fork.c:2308 [inline] __x64_sys_clone+0xba/0x140 kernel/fork.c:2308 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c909 Code: ff 48 85 f6 0f 84 d7 8c fb ff 48 83 ee 10 48 89 4e 08 48 89 3e 48 89 d7 4c 89 c2 4d 89 c8 4c 8b 54 24 08 b8 38 00 00 00 0f 05 <48> 85 c0 0f 8c ae 8c fb ff 74 01 c3 31 ed 48 f7 c7 00 00 01 00 75 RSP: 002b:00007ffdc77d1608 EFLAGS: 00000202 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007fb269427700 RCX: 000000000045c909 RDX: 00007fb2694279d0 RSI: 00007fb269426db0 RDI: 00000000003d0f00 RBP: 00007ffdc77d1820 R08: 00007fb269427700 R09: 00007fb269427700 R10: 00007fb2694279d0 R11: 0000000000000202 R12: 0000000000000000 R13: 00007ffdc77d16bf R14: 00007fb2694279c0 R15: 000000000075bf2c Modules linked in: CR2: ffffc90001959030 ---[ end trace 27fbc52088b3fbd8 ]--- RIP: 0010:bpf_jit_binary_hdr include/linux/filter.h:699 [inline] RIP: 0010:bpf_get_prog_addr_region kernel/bpf/core.c:380 [inline] RIP: 0010:bpf_tree_comp kernel/bpf/core.c:437 [inline] RIP: 0010:__lt_find include/linux/rbtree_latch.h:115 [inline] RIP: 0010:latch_tree_find include/linux/rbtree_latch.h:208 [inline] RIP: 0010:bpf_prog_kallsyms_find+0xc3/0x2e0 kernel/bpf/core.c:511 Code: 03 42 80 3c 30 00 0f 85 1c 01 00 00 4d 8b 6f 50 49 8d 7d 30 48 89 f8 48 c1 e8 03 42 80 3c 30 00 0f 85 50 01 00 00 49 8d 7d 02 <49> 8b 5d 30 48 89 f8 49 89 f9 48 c1 e8 03 41 83 e1 07 42 0f b6 04 RSP: 0018:ffff88808b84f6f0 EFLAGS: 00010246 RAX: 1ffff9200032b206 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 000000000001d11c RDI: ffffc90001959002 RBP: ffff88808b84f730 R08: ffffffff87e0dbc0 R09: ffffed1015d64732 R10: ffffed1015d64732 R11: ffff8880aeb23993 R12: ffff888091921ab0 R13: ffffc90001959000 R14: dffffc0000000000 R15: ffff888091921ab0 FS: 00000000026c6940(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90001959030 CR3: 0000000097859000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400