audit: type=1804 audit(1658951325.092:119): pid=12525 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir3208298819/syzkaller.o1vwaR/4128/file0" dev="sda1" ino=15694 res=1 ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 Read of size 8 at addr ffff888093b3ab48 by task syz-executor.4/12487 CPU: 0 PID: 12487 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 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 audit: type=1804 audit(1658951325.382:120): pid=12521 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir2418607544/syzkaller.vJQtJV/4060/file0" dev="sda1" ino=15688 res=1 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_close+0x12b/0x390 kernel/bpf/sockmap.c:403 inet_release+0xd7/0x1e0 net/ipv4/af_inet.c:427 __sock_release+0xcd/0x2a0 net/socket.c:599 sock_close+0x15/0x20 net/socket.c:1214 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f05fc414e4b Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007fff63966010 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f05fc414e4b RDX: 0000000000000000 RSI: 0000001b30824a8c RDI: 0000000000000003 RBP: 00007f05fc576960 R08: 0000000000000000 R09: 00000000ee5a3a10 R10: 0000000000000000 R11: 0000000000000293 R12: 00000000002b2779 R13: 00007fff63966110 R14: 00007f05fc575030 R15: 0000000000000032 Allocated by task 12492: 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 25883: __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 ffff888093b3a900 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 584 bytes inside of 1024-byte region [ffff888093b3a900, ffff888093b3ad00) The buggy address belongs to the page: page:ffffea00024ece80 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002a62208 ffffea0002929088 ffff88813bff0ac0 raw: 0000000000000000 ffff888093b3a000 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888093b3aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888093b3aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888093b3ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888093b3ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888093b3ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================