================================================================== BUG: KASAN: slab-use-after-free in __lock_acquire+0x340f/0x4430 Read of size 8 at addr ffff88800981b620 by task syz-executor.7/9719 CPU: 0 UID: 0 PID: 9719 Comm: syz-executor.7 Not tainted 6.12.0-rc7-next-20241115 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0xca/0x120 print_report+0xcb/0x620 kasan_report+0xbd/0xf0 __lock_acquire+0x340f/0x4430 lock_acquire.part.0+0xeb/0x320 _raw_spin_lock+0x2b/0x40 sco_sock_connect+0x347/0x9c0 __sys_connect_file+0x14b/0x1b0 __sys_connect+0x174/0x1a0 __x64_sys_connect+0x73/0xb0 do_syscall_64+0xbf/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f334473db19 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3341c92188 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f3344851020 RCX: 00007f334473db19 RDX: 0000000000000008 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007f3344797f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe56fc723f R14: 00007f3341c92300 R15: 0000000000022000 Allocated by task 9712: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_kmalloc+0x7f/0x90 sco_conn_add+0x11d/0x4a0 sco_sock_connect+0x320/0x9c0 __sys_connect_file+0x14b/0x1b0 __sys_connect+0x174/0x1a0 __x64_sys_connect+0x73/0xb0 do_syscall_64+0xbf/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 9712: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3a/0x60 __kasan_slab_free+0x38/0x50 kfree+0x132/0x480 sco_chan_del+0x1bc/0x1f0 __sco_sock_close+0x212/0x2e0 sco_sock_release+0xa1/0x3f0 __sock_release+0xb3/0x270 sock_close+0x1c/0x30 __fput+0x3fa/0xb40 task_work_run+0x173/0x280 get_signal+0x1cf/0x2320 arch_do_signal_or_restart+0x81/0x780 syscall_exit_to_user_mode+0x123/0x1e0 do_syscall_64+0xcc/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88800981b600 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 32 bytes inside of freed 256-byte region [ffff88800981b600, ffff88800981b700) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88800981b000 pfn:0x981a head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x100000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0100000000000040 ffff888008c41b40 ffffea00004c0200 dead000000000003 raw: ffff88800981b000 000000008010000e 00000001f5000000 0000000000000000 head: 0100000000000040 ffff888008c41b40 ffffea00004c0200 dead000000000003 head: ffff88800981b000 000000008010000e 00000001f5000000 0000000000000000 head: 0100000000000001 ffffea0000260681 ffffffffffffffff 0000000000000000 head: ffff888000000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88800981b500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88800981b580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88800981b600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88800981b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88800981b700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================