================================================================== BUG: KASAN: use-after-free in __lt_find include/linux/rbtree_latch.h:120 [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:674 [inline] BUG: KASAN: use-after-free in is_bpf_text_address+0x250/0x3b0 kernel/bpf/core.c:709 Read of size 8 at addr ffff88809ab5fc48 by task syz-executor.0/12739 CPU: 1 PID: 12739 Comm: syz-executor.0 Not tainted 5.4.0-rc4 #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+0x1d8/0x2f8 lib/dump_stack.c:113 print_address_description+0x75/0x5c0 mm/kasan/report.c:374 __kasan_report+0x14b/0x1c0 mm/kasan/report.c:506 kasan_report+0x26/0x50 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __lt_find include/linux/rbtree_latch.h:120 [inline] latch_tree_find include/linux/rbtree_latch.h:208 [inline] bpf_prog_kallsyms_find kernel/bpf/core.c:674 [inline] is_bpf_text_address+0x250/0x3b0 kernel/bpf/core.c:709 kernel_text_address kernel/extable.c:147 [inline] __kernel_text_address+0x9a/0x110 kernel/extable.c:102 unwind_get_return_address+0x4c/0x90 arch/x86/kernel/unwind_frame.c:19 arch_stack_walk+0x98/0xe0 arch/x86/kernel/stacktrace.c:26 stack_trace_save+0xb6/0x150 kernel/stacktrace.c:123 save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc+0x11c/0x1b0 mm/kasan/common.c:510 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:518 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc mm/slab.c:3319 [inline] kmem_cache_alloc+0x1f5/0x2e0 mm/slab.c:3483 __d_alloc+0x2d/0x6e0 fs/dcache.c:1688 d_alloc_pseudo+0x1d/0x70 fs/dcache.c:1817 alloc_file_pseudo+0xc3/0x260 fs/file_table.c:225 sock_alloc_file+0xbb/0x250 net/socket.c:397 sock_map_fd net/socket.c:420 [inline] __sys_socket+0x14b/0x2e0 net/socket.c:1515 __do_sys_socket net/socket.c:1520 [inline] __se_sys_socket net/socket.c:1518 [inline] __x64_sys_socket+0x7a/0x90 net/socket.c:1518 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a59 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fd5b20eac18 EFLAGS: 00000246 ORIG_RAX: 0000000000000029 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459a59 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fd5b20eb6d4 R13: 00000000004c8c7f R14: 00000000004e0220 R15: 00000000ffffffff Allocated by task 12742: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc+0x11c/0x1b0 mm/kasan/common.c:510 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 kmem_cache_alloc_trace+0x221/0x2f0 mm/slab.c:3550 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:690 [inline] bpf_prog_alloc_no_stats+0xdc/0x2b0 kernel/bpf/core.c:88 jit_subprogs kernel/bpf/verifier.c:8716 [inline] fixup_call_args kernel/bpf/verifier.c:8845 [inline] bpf_check+0xbe9a/0xe790 kernel/bpf/verifier.c:9349 bpf_prog_load kernel/bpf/syscall.c:1709 [inline] __do_sys_bpf+0x7a4f/0xbef0 kernel/bpf/syscall.c:2866 __se_sys_bpf kernel/bpf/syscall.c:2825 [inline] __x64_sys_bpf+0x7a/0x90 kernel/bpf/syscall.c:2825 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7933: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x12a/0x1e0 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kfree+0x115/0x200 mm/slab.c:3756 bpf_jit_free+0x189/0x1f0 bpf_prog_free_deferred+0x1b9/0x380 kernel/bpf/core.c:1980 process_one_work+0x7ef/0x10e0 kernel/workqueue.c:2269 worker_thread+0xc01/0x1630 kernel/workqueue.c:2415 kthread+0x332/0x350 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff88809ab5fc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 72 bytes inside of 512-byte region [ffff88809ab5fc00, ffff88809ab5fe00) The buggy address belongs to the page: page:ffffea00026ad7c0 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000232c748 ffffea0002618708 ffff8880aa400a80 raw: 0000000000000000 ffff88809ab5f000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809ab5fb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809ab5fb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809ab5fc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809ab5fc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809ab5fd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================