================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2f44/0x4380 kernel/locking/lockdep.c:3294 Read of size 8 at addr ffff888059a8d078 by task syz-executor.2/10901 CPU: 1 PID: 10901 Comm: syz-executor.2 Not tainted 4.19.128-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/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x222 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+0x88/0x2b9 mm/kasan/report.c:396 __lock_acquire+0x2f44/0x4380 kernel/locking/lockdep.c:3294 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:312 sock_orphan include/net/sock.h:1796 [inline] nr_release+0x5d/0x3a0 net/netrom/af_netrom.c:524 __sock_release+0xcd/0x2a0 net/socket.c:579 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2cd/0x890 fs/file_table.c:278 task_work_run+0x13f/0x1b0 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:0x416661 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 04 1b 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffe66aa4170 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000007 RCX: 0000000000416661 RDX: 0000000000000000 RSI: ffffffff871a08dd RDI: 0000000000000006 RBP: 0000000000000001 R08: ffffffff812fe1d4 R09: 000000001e0e8c53 R10: 00007ffe66aa4260 R11: 0000000000000293 R12: 000000000078c900 R13: 000000000078c900 R14: ffffffffffffffff R15: 000000000078c0ec Allocated by task 10910: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] sk_prot_alloc+0x1e2/0x2d0 net/core/sock.c:1466 sk_alloc+0x36/0xf20 net/core/sock.c:1520 nr_create+0xb2/0x5d0 net/netrom/af_netrom.c:436 __sock_create+0x3d5/0x740 net/socket.c:1276 sock_create net/socket.c:1316 [inline] __sys_socket+0xef/0x200 net/socket.c:1346 __do_sys_socket net/socket.c:1355 [inline] __se_sys_socket net/socket.c:1353 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1353 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10901: __cache_free mm/slab.c:3503 [inline] kfree+0xce/0x220 mm/slab.c:3822 sk_prot_free net/core/sock.c:1503 [inline] __sk_destruct+0x57a/0x780 net/core/sock.c:1583 sk_destruct+0xb9/0xf0 net/core/sock.c:1598 __sk_free+0xc2/0x2e0 net/core/sock.c:1609 sk_free+0x3b/0x50 net/core/sock.c:1620 sock_put include/net/sock.h:1707 [inline] nr_release+0x30a/0x3a0 net/netrom/af_netrom.c:557 __sock_release+0xcd/0x2a0 net/socket.c:579 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2cd/0x890 fs/file_table.c:278 task_work_run+0x13f/0x1b0 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 The buggy address belongs to the object at ffff888059a8cd00 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 888 bytes inside of 2048-byte region [ffff888059a8cd00, ffff888059a8d500) The buggy address belongs to the page: page:ffffea000166a300 count:1 mapcount:0 mapping:ffff88812c3dcc40 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea000162af08 ffffea0002a2de88 ffff88812c3dcc40 raw: 0000000000000000 ffff888059a8c480 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888059a8cf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888059a8cf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888059a8d000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888059a8d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888059a8d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================