================================================================== BUG: KASAN: use-after-free in bq_enqueue kernel/bpf/cpumap.c:751 [inline] BUG: KASAN: use-after-free in cpu_map_enqueue+0x2dd/0x370 kernel/bpf/cpumap.c:775 Read of size 4 at addr ffff8881b8f00058 by task syz.3.4160/15899 CPU: 1 PID: 15899 Comm: syz.3.4160 Not tainted 6.1.124-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:427 kasan_report+0x136/0x160 mm/kasan/report.c:531 bq_enqueue kernel/bpf/cpumap.c:751 [inline] cpu_map_enqueue+0x2dd/0x370 kernel/bpf/cpumap.c:775 __xdp_do_redirect_frame net/core/filter.c:4324 [inline] xdp_do_redirect_frame+0x2f0/0x660 net/core/filter.c:4382 xdp_test_run_batch net/bpf/test_run.c:314 [inline] bpf_test_run_xdp_live+0xbf4/0x1ea0 net/bpf/test_run.c:362 bpf_prog_test_run_xdp+0x7d1/0x1130 net/bpf/test_run.c:1393 bpf_prog_test_run+0x32f/0x3a0 kernel/bpf/syscall.c:3690 __sys_bpf+0x3eb/0x6c0 kernel/bpf/syscall.c:5043 __do_sys_bpf kernel/bpf/syscall.c:5129 [inline] __se_sys_bpf kernel/bpf/syscall.c:5127 [inline] __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5127 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f7996585d29 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7997368038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f7996775fa0 RCX: 00007f7996585d29 RDX: 0000000000000050 RSI: 00000000200000c0 RDI: 000000000000000a RBP: 00007f7996601b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f7996775fa0 R15: 00007fff14ae0238 The buggy address belongs to the physical page: page:ffffea0006e3c000 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b8f00 flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000000000 ffffea0006e3c008 ffffea0006e3c008 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff8881b8efff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881b8efff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881b8f00000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881b8f00080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881b8f00100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================