================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 Read of size 8 at addr ffff888055d64f60 by task syz-executor.4/20451 netlink: 'syz-executor.1': attribute type 4 has an invalid length. CPU: 1 PID: 20451 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 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] lock_sock_nested+0x3b/0x110 net/core/sock.c:2884 l2cap_sock_teardown_cb+0xa0/0x6d0 net/bluetooth/l2cap_sock.c:1348 l2cap_chan_del+0xbc/0xa50 net/bluetooth/l2cap_core.c:603 l2cap_conn_del+0x3a6/0x6e0 net/bluetooth/l2cap_core.c:1733 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7445 [inline] l2cap_disconn_cfm+0x98/0xd0 net/bluetooth/l2cap_core.c:7438 hci_disconn_cfm include/net/bluetooth/hci_core.h:1263 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1512 hci_dev_do_close+0x6bc/0x1020 net/bluetooth/hci_core.c:1687 hci_unregister_dev+0x14f/0x460 net/bluetooth/hci_core.c:3288 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xbf3/0x2be0 kernel/exit.c:870 do_group_exit+0x125/0x310 kernel/exit.c:967 __do_sys_exit_group kernel/exit.c:978 [inline] __se_sys_exit_group kernel/exit.c:976 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:976 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fc3b695a109 Code: Bad RIP value. RSP: 002b:00007ffee6371ae8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000064 RCX: 00007fc3b695a109 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 00007fc3b69b32ca R08: 000000000000000c R09: 0000555556bc83b8 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000016 R13: 00007ffee6372dc0 R14: 0000555556bc83b8 R15: 00007ffee6373ec0 Allocated by task 20451: __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node+0x4c/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] kvmalloc_array include/linux/mm.h:595 [inline] alloc_fdtable+0xcd/0x280 fs/file.c:115 dup_fd+0x6a2/0xbf0 fs/file.c:310 copy_files kernel/fork.c:1391 [inline] copy_process.part.0+0x1e75/0x8260 kernel/fork.c:1901 copy_process kernel/fork.c:1710 [inline] _do_fork+0x22f/0xf30 kernel/fork.c:2219 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 24205: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 kvfree+0x59/0x60 mm/util.c:452 __free_fdtable fs/file.c:31 [inline] put_files_struct fs/file.c:420 [inline] put_files_struct+0x267/0x350 fs/file.c:413 exit_files+0x7e/0xa0 fs/file.c:445 do_exit+0xbb9/0x2be0 kernel/exit.c:865 do_group_exit+0x125/0x310 kernel/exit.c:967 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 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 ffff888055d64ec0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff888055d64ec0, ffff888055d656c0) The buggy address belongs to the page: page:ffffea0001575900 count:1 mapcount:0 mapping:ffff88813bff0c40 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea00027e0d88 ffffea00022dc008 ffff88813bff0c40 raw: 0000000000000000 ffff888055d64640 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888055d64e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888055d64e80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888055d64f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888055d64f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888055d65000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================