================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x21c/0x334 kernel/locking/spinlock_debug.c:115 Read of size 4 at addr ffff0000d8de8104 by task kworker/u9:1/5861 CPU: 1 PID: 5861 Comm: kworker/u9:1 Not tainted 6.10.0-rc5-syzkaller-gb4a3f9b4863a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Workqueue: hci4 hci_rx_work Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x21c/0x334 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x64/0x7c kernel/locking/spinlock.c:162 __sock_queue_rcv_skb+0x3f4/0x95c net/core/sock.c:504 l2cap_sock_recv_cb+0x134/0x440 net/bluetooth/l2cap_sock.c:1507 l2cap_conless_channel net/bluetooth/l2cap_core.c:6774 [inline] l2cap_recv_frame+0x6dfc/0xc8e0 net/bluetooth/l2cap_core.c:6827 l2cap_recv_acldata+0x4a8/0x15dc net/bluetooth/l2cap_core.c:7510 hci_acldata_packet net/bluetooth/hci_core.c:3842 [inline] hci_rx_work+0x2b8/0xa78 net/bluetooth/hci_core.c:4079 process_one_work+0x79c/0x15b8 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:3393 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Allocated by task 9162: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4122 [inline] __kmalloc_noprof+0x2a0/0x494 mm/slub.c:4135 kmalloc_noprof include/linux/slab.h:664 [inline] sk_prot_alloc+0xc4/0x1f0 net/core/sock.c:2080 sk_alloc+0x44/0x3f0 net/core/sock.c:2133 bt_sock_alloc+0x4c/0x304 net/bluetooth/af_bluetooth.c:148 l2cap_sock_alloc net/bluetooth/l2cap_sock.c:1869 [inline] l2cap_sock_create+0x140/0x2b8 net/bluetooth/l2cap_sock.c:1909 bt_sock_create+0x14c/0x248 net/bluetooth/af_bluetooth.c:132 __sock_create+0x43c/0x884 net/socket.c:1571 sock_create net/socket.c:1622 [inline] __sys_socket_create net/socket.c:1659 [inline] __sys_socket+0x134/0x340 net/socket.c:1706 __do_sys_socket net/socket.c:1720 [inline] __se_sys_socket net/socket.c:1718 [inline] __arm64_sys_socket+0x7c/0x94 net/socket.c:1718 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Freed by task 9162: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:579 poison_slab_object+0x128/0x180 mm/kasan/common.c:240 __kasan_slab_free+0x3c/0x70 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2196 [inline] slab_free mm/slub.c:4437 [inline] kfree+0x154/0x3e0 mm/slub.c:4558 sk_prot_free net/core/sock.c:2116 [inline] __sk_destruct+0x4b8/0x74c net/core/sock.c:2208 sk_destruct net/core/sock.c:2223 [inline] __sk_free+0x388/0x4f4 net/core/sock.c:2234 sk_free+0x60/0xc8 net/core/sock.c:2245 sock_put include/net/sock.h:1879 [inline] l2cap_sock_kill+0x10c/0x214 net/bluetooth/l2cap_sock.c:1246 l2cap_sock_release+0x138/0x1b4 net/bluetooth/l2cap_sock.c:1417 __sock_release net/socket.c:659 [inline] sock_close+0xa4/0x1e8 net/socket.c:1421 __fput+0x334/0x760 fs/file_table.c:422 ____fput+0x20/0x30 fs/file_table.c:450 task_work_run+0x230/0x2e0 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x178/0x1f4 arch/arm64/kernel/entry-common.c:151 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:713 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 The buggy address belongs to the object at ffff0000d8de8000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 260 bytes inside of freed 2048-byte region [ffff0000d8de8000, ffff0000d8de8800) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x118de8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 05ffc00000000040 ffff0000c0002000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000080008 00000001ffffefff 0000000000000000 head: 05ffc00000000040 ffff0000c0002000 dead000000000100 dead000000000122 head: 0000000000000000 0000000000080008 00000001ffffefff 0000000000000000 head: 05ffc00000000003 fffffdffc3637a01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d8de8000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d8de8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d8de8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d8de8180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d8de8200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Unable to handle kernel paging request at virtual address dfff80000000002e KASAN: null-ptr-deref in range [0x0000000000000170-0x0000000000000177] Mem abort info: ESR = 0x0000000096000005 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x05: level 1 translation fault Data abort info: ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [dfff80000000002e] address between user and kernel address ranges Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 5861 Comm: kworker/u9:1 Tainted: G B 6.10.0-rc5-syzkaller-gb4a3f9b4863a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Workqueue: hci4 hci_rx_work pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : l2cap_publish_rx_avail net/bluetooth/l2cap_sock.c:1137 [inline] pc : l2cap_sock_recv_cb+0x154/0x440 net/bluetooth/l2cap_sock.c:1509 lr : l2cap_sock_recv_cb+0x134/0x440 net/bluetooth/l2cap_sock.c:1507 sp : ffff8000994671c0 x29: ffff8000994671c0 x28: ffff0000e1a94000 x27: 1fffe0001a0d7c05 x26: dfff800000000000 x25: 1fffe0001a0d7c94 x24: 0000000000000000 x23: 0000000000000000 x22: ffff0000d06be02e x21: ffff0000cc1db140 x20: ffff0000d06be000 x19: ffff0000d8de8000 x18: 1fffe000367ae9de x17: ffff80008f19d000 x16: ffff800080559634 x15: 0000000000000001 x14: 1fffe000367b1600 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000040000 x10: 0000000000027e67 x9 : ffff8000a8ee1000 x8 : 000000000000002e x7 : 1fffe000367ae9df x6 : ffff8000802aefb4 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff80008919467c x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000174 Call trace: l2cap_publish_rx_avail net/bluetooth/l2cap_sock.c:1137 [inline] l2cap_sock_recv_cb+0x154/0x440 net/bluetooth/l2cap_sock.c:1509 l2cap_conless_channel net/bluetooth/l2cap_core.c:6774 [inline] l2cap_recv_frame+0x6dfc/0xc8e0 net/bluetooth/l2cap_core.c:6827 l2cap_recv_acldata+0x4a8/0x15dc net/bluetooth/l2cap_core.c:7510 hci_acldata_packet net/bluetooth/hci_core.c:3842 [inline] hci_rx_work+0x2b8/0xa78 net/bluetooth/hci_core.c:4079 process_one_work+0x79c/0x15b8 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:3393 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Code: 97731000 f9400318 9105d300 d343fc08 (38fa6908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 97731000 bl 0xfffffffffdcc4000 4: f9400318 ldr x24, [x24] 8: 9105d300 add x0, x24, #0x174 c: d343fc08 lsr x8, x0, #3 * 10: 38fa6908 ldrsb w8, [x8, x26] <-- trapping instruction