Bluetooth: hci2: command 0x041b tx timeout Bluetooth: hci1: command 0x041b tx timeout Bluetooth: hci0: command 0x041b tx timeout BUG: sleeping function called from invalid context at net/core/sock.c:3490 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4318, name: kworker/u5:6 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 5 locks held by kworker/u5:6/4318: #0: ffff0000c3cda138 ((wq_completion)hci2#2){+.+.}-{0:0}, at: process_one_work+0x6bc/0x1484 kernel/workqueue.c:2265 #1: ffff8000213a7c20 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x6fc/0x1484 kernel/workqueue.c:2267 #2: ffff0000de874078 (&hdev->lock){+.+.}-{3:3}, at: hci_sync_conn_complete_evt+0xe8/0x9b0 net/bluetooth/hci_event.c:5021 #3: ffff0000d4dfb020 (&conn->lock#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #3: ffff0000d4dfb020 (&conn->lock#2){+.+.}-{2:2}, at: sco_conn_ready net/bluetooth/sco.c:1297 [inline] #3: ffff0000d4dfb020 (&conn->lock#2){+.+.}-{2:2}, at: sco_connect_cfm+0x24c/0x8ec net/bluetooth/sco.c:1384 #4: ffff0000dda1b130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1756 [inline] #4: ffff0000dda1b130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_ready net/bluetooth/sco.c:1310 [inline] #4: ffff0000dda1b130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_connect_cfm+0x3d8/0x8ec net/bluetooth/sco.c:1384 Preemption disabled at: [] spin_lock include/linux/spinlock.h:351 [inline] [] sco_conn_ready net/bluetooth/sco.c:1297 [inline] [] sco_connect_cfm+0x24c/0x8ec net/bluetooth/sco.c:1384 CPU: 1 PID: 4318 Comm: kworker/u5:6 Not tainted 6.1.129-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Workqueue: hci2 hci_rx_work Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 __might_resched+0x37c/0x4d8 kernel/sched/core.c:9957 __might_sleep+0x90/0xe4 kernel/sched/core.c:9886 lock_sock_nested+0x88/0x138 net/core/sock.c:3490 lock_sock include/net/sock.h:1756 [inline] sco_conn_ready net/bluetooth/sco.c:1310 [inline] sco_connect_cfm+0x3d8/0x8ec net/bluetooth/sco.c:1384 hci_connect_cfm include/net/bluetooth/hci_core.h:1809 [inline] hci_sync_conn_complete_evt+0x4f0/0x9b0 net/bluetooth/hci_event.c:5107 hci_event_func net/bluetooth/hci_event.c:7373 [inline] hci_event_packet+0x744/0x109c net/bluetooth/hci_event.c:7425 hci_rx_work+0x310/0xa84 net/bluetooth/hci_core.c:4086 process_one_work+0x804/0x1484 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x114/0x7680 kernel/locking/lockdep.c:4919 Read of size 8 at addr ffff0000dda1b0b0 by task kworker/u5:6/4318 CPU: 1 PID: 4318 Comm: kworker/u5:6 Tainted: G W 6.1.129-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Workqueue: hci2 hci_rx_work Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:427 kasan_report+0xd4/0x130 mm/kasan/report.c:531 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351 __lock_acquire+0x114/0x7680 kernel/locking/lockdep.c:4919 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x54/0x6c kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] lock_sock_nested+0x90/0x138 net/core/sock.c:3491 lock_sock include/net/sock.h:1756 [inline] sco_conn_ready net/bluetooth/sco.c:1310 [inline] sco_connect_cfm+0x3d8/0x8ec net/bluetooth/sco.c:1384 hci_connect_cfm include/net/bluetooth/hci_core.h:1809 [inline] hci_sync_conn_complete_evt+0x4f0/0x9b0 net/bluetooth/hci_event.c:5107 hci_event_func net/bluetooth/hci_event.c:7373 [inline] hci_event_packet+0x744/0x109c net/bluetooth/hci_event.c:7425 hci_rx_work+0x310/0xa84 net/bluetooth/hci_core.c:4086 process_one_work+0x804/0x1484 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 Allocated by task 4359: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xd8/0x1c4 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] sk_prot_alloc+0xc4/0x1f0 net/core/sock.c:2050 sk_alloc+0x44/0x3e0 net/core/sock.c:2103 bt_sock_alloc+0x4c/0x140 net/bluetooth/af_bluetooth.c:148 sco_sock_alloc net/bluetooth/sco.c:520 [inline] sco_sock_create+0xbc/0x338 net/bluetooth/sco.c:551 bt_sock_create+0x14c/0x248 net/bluetooth/af_bluetooth.c:132 __sock_create+0x43c/0x8a0 net/socket.c:1550 sock_create net/socket.c:1606 [inline] __sys_socket_create net/socket.c:1643 [inline] __sys_socket+0x120/0x32c net/socket.c:1671 __do_sys_socket net/socket.c:1684 [inline] __se_sys_socket net/socket.c:1682 [inline] __arm64_sys_socket+0x7c/0x94 net/socket.c:1682 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Freed by task 4359: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516 ____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0x2c0/0x4b4 mm/slub.c:3674 kfree+0xcc/0x1b8 mm/slab_common.c:988 sk_prot_free net/core/sock.c:2086 [inline] __sk_destruct+0x4bc/0x760 net/core/sock.c:2172 sk_destruct net/core/sock.c:2187 [inline] __sk_free+0x388/0x4f4 net/core/sock.c:2198 sk_free+0x60/0xc8 net/core/sock.c:2209 sock_put include/net/sock.h:2036 [inline] sco_sock_kill+0xfc/0x1b4 net/bluetooth/sco.c:440 sco_sock_release+0x1fc/0x2c0 net/bluetooth/sco.c:1279 __sock_release net/socket.c:654 [inline] sock_close+0xb8/0x1fc net/socket.c:1400 __fput+0x1c8/0x7c8 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x240/0x2f0 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x2080/0x2cb8 arch/arm64/kernel/signal.c:1132 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff0000dda1b000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 176 bytes inside of 2048-byte region [ffff0000dda1b000, ffff0000dda1b800) The buggy address belongs to the physical page: page:0000000055012322 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11da18 head:0000000055012322 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 dead000000000122 ffff0000c0002900 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000dda1af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000dda1b000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000dda1b080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000dda1b100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000dda1b180: 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 dfff800000000000 KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] Mem abort info: ESR = 0x0000000096000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 [dfff800000000000] address between user and kernel address ranges Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 4318 Comm: kworker/u5:6 Tainted: G B W 6.1.129-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Workqueue: hci2 hci_rx_work pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : apparmor_sk_clone_security+0xe8/0x390 security/apparmor/lsm.c:845 lr : apparmor_sk_clone_security+0xc8/0x390 security/apparmor/lsm.c:843 sp : ffff8000213a76f0 x29: ffff8000213a76f0 x28: 1ffff00004274ef0 x27: dfff800000000000 x26: 1fffe0001bb436a5 x25: ffff0000dda1d38a x24: 1fffe0001903f2e0 x23: dfff800000000000 x22: dfff800000000000 x21: 0000000000000000 x20: 0000000000000000 x19: ffff0000c81f9700 x18: ffff8000213a6f80 x17: ffff800008228274 x16: ffff800008973ea4 x15: ffff8000114f9560 x14: ffff800011519220 x13: ffff80000802a104 x12: 0000000000000001 x11: 0000000000ff0100 x10: 0000000000000000 x9 : ffff80000a7daf30 x8 : 0000000000000000 x7 : ffffffffffffffff x6 : ffff8000114e6480 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff80000a7daeac x2 : 0000000000000000 x1 : 0000000000000008 x0 : 0000000000000000 Call trace: apparmor_sk_clone_security+0xe8/0x390 security/apparmor/lsm.c:845 security_sk_clone+0x58/0x9c security/security.c:2341 sco_sock_init net/bluetooth/sco.c:503 [inline] sco_conn_ready net/bluetooth/sco.c:1320 [inline] sco_connect_cfm+0x56c/0x8ec net/bluetooth/sco.c:1384 hci_connect_cfm include/net/bluetooth/hci_core.h:1809 [inline] hci_sync_conn_complete_evt+0x4f0/0x9b0 net/bluetooth/hci_event.c:5107 hci_event_func net/bluetooth/hci_event.c:7373 [inline] hci_event_packet+0x744/0x109c net/bluetooth/hci_event.c:7425 hci_rx_work+0x310/0xa84 net/bluetooth/hci_core.c:4086 process_one_work+0x804/0x1484 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 Code: 710006df 5400102b 9774625e d343fe88 (38776908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 710006df cmp w22, #0x1 4: 5400102b b.lt 0x208 // b.tstop 8: 9774625e bl 0xfffffffffdd18980 c: d343fe88 lsr x8, x20, #3 * 10: 38776908 ldrb w8, [x8, x23] <-- trapping instruction