BUG: sleeping function called from invalid context at net/core/sock.c:3258 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4200, name: kworker/u5:8 5 locks held by kworker/u5:8/4200: #0: ffff888019dc0138 ((wq_completion)hci3#2){+.+.}-{0:0}, at: process_one_work+0x760/0x1000 kernel/workqueue.c:-1 #1: ffffc90002fffd00 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x7a3/0x1000 kernel/workqueue.c:2285 #2: ffffffff8d37ece8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_connect_cfm+0x2c/0x130 include/net/bluetooth/hci_core.h:1502 #3: ffff888024434e20 (&conn->lock#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline] #3: ffff888024434e20 (&conn->lock#2){+.+.}-{2:2}, at: sco_conn_ready net/bluetooth/sco.c:1119 [inline] #3: ffff888024434e20 (&conn->lock#2){+.+.}-{2:2}, at: sco_connect_cfm+0x26c/0xa40 net/bluetooth/sco.c:1204 #4: ffff88807d2e5120 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1730 [inline] #4: ffff88807d2e5120 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_ready net/bluetooth/sco.c:1132 [inline] #4: ffff88807d2e5120 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_connect_cfm+0x464/0xa40 net/bluetooth/sco.c:1204 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 4200 Comm: kworker/u5:8 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: hci3 hci_rx_work Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 ___might_sleep+0x47c/0x600 kernel/sched/core.c:9658 lock_sock_nested+0x5b/0x100 net/core/sock.c:3258 lock_sock include/net/sock.h:1730 [inline] sco_conn_ready net/bluetooth/sco.c:1132 [inline] sco_connect_cfm+0x464/0xa40 net/bluetooth/sco.c:1204 hci_connect_cfm+0x8f/0x130 include/net/bluetooth/hci_core.h:1505 hci_conn_request_evt+0x6a2/0x9f0 net/bluetooth/hci_event.c:2914 hci_event_packet+0x743/0x12f0 net/bluetooth/hci_event.c:6405 hci_rx_work+0x255/0xa10 net/bluetooth/hci_core.c:5160 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0xf7/0x7c60 kernel/locking/lockdep.c:4882 Read of size 8 at addr ffff88807d2e50a0 by task kworker/u5:8/4200 CPU: 0 PID: 4200 Comm: kworker/u5:8 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: hci3 hci_rx_work Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 __lock_acquire+0xf7/0x7c60 kernel/locking/lockdep.c:4882 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x32/0x50 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:369 [inline] lock_sock_nested+0x68/0x100 net/core/sock.c:3259 lock_sock include/net/sock.h:1730 [inline] sco_conn_ready net/bluetooth/sco.c:1132 [inline] sco_connect_cfm+0x464/0xa40 net/bluetooth/sco.c:1204 hci_connect_cfm+0x8f/0x130 include/net/bluetooth/hci_core.h:1505 hci_conn_request_evt+0x6a2/0x9f0 net/bluetooth/hci_event.c:2914 hci_event_packet+0x743/0x12f0 net/bluetooth/hci_event.c:6405 hci_rx_work+0x255/0xa10 net/bluetooth/hci_core.c:5160 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 4348: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:612 [inline] sk_prot_alloc+0xe7/0x210 net/core/sock.c:1866 sk_alloc+0x2f/0x310 net/core/sock.c:1922 sco_sock_alloc net/bluetooth/sco.c:491 [inline] sco_sock_create+0xba/0x300 net/bluetooth/sco.c:526 bt_sock_create+0x155/0x220 net/bluetooth/af_bluetooth.c:130 __sock_create+0x47b/0x900 net/socket.c:1486 sock_create net/socket.c:1542 [inline] __sys_socket+0xe2/0x170 net/socket.c:1584 __do_sys_socket net/socket.c:1593 [inline] __se_sys_socket net/socket.c:1591 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1591 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 4347: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xea/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 sk_prot_free net/core/sock.c:1905 [inline] __sk_destruct+0x578/0x840 net/core/sock.c:1991 sco_sock_release+0x254/0x310 net/bluetooth/sco.c:1101 __sock_release net/socket.c:649 [inline] sock_close+0xd5/0x240 net/socket.c:1336 __fput+0x234/0x930 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88807d2e5000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 160 bytes inside of 2048-byte region [ffff88807d2e5000, ffff88807d2e5800) The buggy address belongs to the page: page:ffffea0001f4b800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7d2e0 head:ffffea0001f4b800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888016842000 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4258, ts 72475919324, free_ts 72412115805 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] __kmalloc_node_track_caller+0x1fc/0x3a0 mm/slub.c:4963 kmalloc_reserve net/core/skbuff.c:356 [inline] __alloc_skb+0x22c/0x750 net/core/skbuff.c:427 alloc_skb include/linux/skbuff.h:1162 [inline] mld_newpack+0x12a/0xb90 net/ipv6/mcast.c:1745 add_grhead+0x5a/0x240 net/ipv6/mcast.c:1856 add_grec+0x1341/0x15d0 net/ipv6/mcast.c:1994 mld_send_initial_cr+0xed/0x240 net/ipv6/mcast.c:2241 mld_dad_work+0x41/0x270 net/ipv6/mcast.c:2267 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3225 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc_trace+0x103/0x2a0 mm/slub.c:3250 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] nsim_fib6_rt_create drivers/net/netdevsim/fib.c:545 [inline] nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:750 [inline] nsim_fib6_event drivers/net/netdevsim/fib.c:854 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:887 [inline] nsim_fib_event_work+0x1109/0x3240 drivers/net/netdevsim/fib.c:1483 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 process_scheduled_works kernel/workqueue.c:2373 [inline] worker_thread+0xdca/0x12a0 kernel/workqueue.c:2459 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff88807d2e4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807d2e5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807d2e5080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807d2e5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807d2e5180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================