================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 Read of size 8 at addr ffff88809bc58708 by task syz-executor201/2979 CPU: 1 PID: 2979 Comm: syz-executor201 Not tainted 4.19.211-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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:168 spin_lock_bh include/linux/spinlock.h:334 [inline] psock_map_pop.constprop.0+0x28/0x1f0 kernel/bpf/sockmap.c:302 bpf_tcp_remove+0x47d/0xa00 kernel/bpf/sockmap.c:366 bpf_tcp_unhash+0x11c/0x380 kernel/bpf/sockmap.c:384 tcp_set_state+0x1a8/0x7d0 net/ipv4/tcp.c:2244 tcp_done+0xa9/0x2a0 net/ipv4/tcp.c:3789 tcp_rcv_state_process+0x23c2/0x4c50 net/ipv4/tcp_input.c:6225 tcp_v4_do_rcv+0x31f/0x870 net/ipv4/tcp_ipv4.c:1569 sk_backlog_rcv include/net/sock.h:952 [inline] __release_sock+0x134/0x3a0 net/core/sock.c:2362 release_sock+0x54/0x1b0 net/core/sock.c:2901 inet_shutdown+0x1e0/0x3a0 net/ipv4/af_inet.c:889 __sys_shutdown+0xf3/0x1a0 net/socket.c:2077 __do_sys_shutdown net/socket.c:2085 [inline] __se_sys_shutdown net/socket.c:2083 [inline] __x64_sys_shutdown+0x50/0x70 net/socket.c:2083 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f60e11930a9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc70271d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000030 RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f60e11930a9 RDX: 00007f60e11930a9 RSI: 0000000000000001 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000010 R09: 0000000000000010 R10: 0000000000000010 R11: 0000000000000246 R12: 000000000009809b R13: 00007ffc70271d6c R14: 00007ffc70271d80 R15: 00007ffc70271d70 Allocated by task 2979: kmem_cache_alloc_node_trace+0x151/0x3b0 mm/slab.c:3668 kmalloc_node include/linux/slab.h:553 [inline] kzalloc_node include/linux/slab.h:720 [inline] smap_init_psock kernel/bpf/sockmap.c:1636 [inline] __sock_map_ctx_update_elem.constprop.0+0x366/0xea0 kernel/bpf/sockmap.c:1940 sock_hash_ctx_update_elem.isra.0+0x69d/0x1100 kernel/bpf/sockmap.c:2411 sock_hash_update_elem+0x210/0x480 kernel/bpf/sockmap.c:2495 map_update_elem kernel/bpf/syscall.c:821 [inline] __do_sys_bpf kernel/bpf/syscall.c:2414 [inline] __se_sys_bpf+0x2cf1/0x3a20 kernel/bpf/syscall.c:2384 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8141: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff88809bc584c0 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 584 bytes inside of 1024-byte region [ffff88809bc584c0, ffff88809bc588c0) The buggy address belongs to the page: page:ffffea00026f1600 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002629a88 ffffea00026f0a08 ffff88813bff0ac0 raw: 0000000000000000 ffff88809bc58040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809bc58600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809bc58680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809bc58700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809bc58780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809bc58800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================