================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:193 [inline] BUG: KASAN: use-after-free in __lt_find include/linux/rbtree_latch.h:118 [inline] BUG: KASAN: use-after-free in latch_tree_find include/linux/rbtree_latch.h:208 [inline] BUG: KASAN: use-after-free in bpf_prog_kallsyms_find kernel/bpf/core.c:511 [inline] BUG: KASAN: use-after-free in bpf_prog_kallsyms_find+0x2a9/0x2c0 kernel/bpf/core.c:504 Read of size 8 at addr ffff8880a90d8d40 by task udevd/9059 CPU: 0 PID: 9059 Comm: udevd Not tainted 4.19.91-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __read_once_size include/linux/compiler.h:193 [inline] __lt_find include/linux/rbtree_latch.h:118 [inline] latch_tree_find include/linux/rbtree_latch.h:208 [inline] bpf_prog_kallsyms_find kernel/bpf/core.c:511 [inline] bpf_prog_kallsyms_find+0x2a9/0x2c0 kernel/bpf/core.c:504 is_bpf_text_address+0x78/0x170 kernel/bpf/core.c:546 kernel_text_address+0x73/0xf0 kernel/extable.c:152 __kernel_text_address+0xd/0x40 kernel/extable.c:107 unwind_get_return_address arch/x86/kernel/unwind_frame.c:18 [inline] unwind_get_return_address+0x61/0xa0 arch/x86/kernel/unwind_frame.c:13 __save_stack_trace+0x99/0x100 arch/x86/kernel/stacktrace.c:45 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x700 mm/slab.c:3559 prepare_creds+0x3e/0x410 kernel/cred.c:255 prepare_exec_creds+0x12/0xf0 kernel/cred.c:301 prepare_bprm_creds+0x74/0x120 fs/exec.c:1407 __do_execve_file.isra.0+0x33e/0x2150 fs/exec.c:1747 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f5299429207 Code: 77 19 f4 48 89 d7 44 89 c0 0f 05 48 3d 00 f0 ff ff 76 e0 f7 d8 64 41 89 01 eb d8 f7 d8 64 41 89 01 eb df b8 3b 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 02 f3 c3 48 8b 15 00 8c 2d 00 f7 d8 64 89 02 RSP: 002b:00007ffe852d1388 EFLAGS: 00000206 ORIG_RAX: 000000000000003b RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007f5299429207 RDX: 0000000001987c30 RSI: 00007ffe852d1480 RDI: 00007ffe852d2490 RBP: 0000000000625500 R08: 0000000000000e99 R09: 0000000000000e99 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000001987c30 R13: 0000000000000007 R14: 00000000017f6030 R15: 0000000000000005 Allocated by task 9053: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kmem_cache_alloc_trace+0x152/0x760 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] bpf_prog_alloc+0x216/0x2a0 kernel/bpf/core.c:90 jit_subprogs kernel/bpf/verifier.c:5814 [inline] fixup_call_args kernel/bpf/verifier.c:5933 [inline] bpf_check+0x3e7f/0x6259 kernel/bpf/verifier.c:6340 bpf_prog_load+0xdcb/0x1430 kernel/bpf/syscall.c:1445 __do_sys_bpf kernel/bpf/syscall.c:2411 [inline] __se_sys_bpf kernel/bpf/syscall.c:2373 [inline] __x64_sys_bpf+0x32b/0x4c0 kernel/bpf/syscall.c:2373 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 14: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 bpf_jit_free+0xa5/0x300 bpf_prog_free_deferred+0x1a6/0x420 kernel/bpf/core.c:1809 process_one_work+0x989/0x1750 kernel/workqueue.c:2153 worker_thread+0x98/0xe40 kernel/workqueue.c:2296 kthread+0x354/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8880a90d8d00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 64 bytes inside of 256-byte region [ffff8880a90d8d00, ffff8880a90d8e00) The buggy address belongs to the page: page:ffffea0002a43600 count:1 mapcount:0 mapping:ffff88812c31c7c0 index:0xffff8880a90d8300 audit: type=1800 audit(1577413059.217:357): pid=9026 uid=0 auid=4294967295 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 op=collect_data cause=failed comm="syz-executor.2" name=7374617409C0D2FEBCF9DF2DEAC8C177FF171248E91193513049F831550D6F7DE66CF637BDBF1311920C8A26EDA4DCC3783F9DB5116B34D31B0512A5608AAFF01E7952340CD6FD dev="sda1" ino=16564 res=0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea00027d79c8 ffffea0002a300c8 ffff88812c31c7c0 raw: ffff8880a90d8300 ffff8880a90d8080 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a90d8c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a90d8c80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a90d8d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a90d8d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a90d8e00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================