================================================================== BUG: KASAN: slab-use-after-free in __mutex_waiter_is_first kernel/locking/mutex.c:199 [inline] BUG: KASAN: slab-use-after-free in __mutex_lock_common+0xd18/0x2678 kernel/locking/mutex.c:694 Read of size 8 at addr ffff0000d7b640a8 by task khidpd_15c30006/7669 CPU: 0 UID: 0 PID: 7669 Comm: khidpd_15c30006 Tainted: G L syzkaller #0 PREEMPT Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 __mutex_waiter_is_first kernel/locking/mutex.c:199 [inline] __mutex_lock_common+0xd18/0x2678 kernel/locking/mutex.c:694 __mutex_lock kernel/locking/mutex.c:776 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:828 l2cap_unregister_user+0x74/0x190 net/bluetooth/l2cap_core.c:1729 hidp_session_thread+0x3d0/0x490 net/bluetooth/hidp/core.c:1304 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Allocated by task 7699: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:78 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:570 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x70/0x88 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_node_noprof+0x418/0x6c8 mm/slub.c:5315 kmalloc_reserve+0xc4/0x268 net/core/skbuff.c:586 __alloc_skb+0x208/0x3b0 net/core/skbuff.c:690 __netdev_alloc_skb+0xc8/0x6cc net/core/skbuff.c:754 netdev_alloc_skb include/linux/skbuff.h:3484 [inline] dev_alloc_skb include/linux/skbuff.h:3497 [inline] __ieee80211_beacon_get+0xa94/0x146c net/mac80211/tx.c:5654 ieee80211_beacon_get_tim+0xb8/0x244 net/mac80211/tx.c:5776 ieee80211_beacon_get include/net/mac80211.h:5669 [inline] mac80211_hwsim_beacon_tx+0x314/0x6e0 drivers/net/wireless/virtual/mac80211_hwsim.c:2361 __iterate_interfaces+0x250/0x504 net/mac80211/util.c:761 ieee80211_iterate_active_interfaces_atomic+0xd4/0x180 net/mac80211/util.c:797 mac80211_hwsim_beacon+0xc8/0x184 drivers/net/wireless/virtual/mac80211_hwsim.c:2395 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x404/0xb78 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x160/0x400 kernel/time/hrtimer.c:1858 handle_softirqs+0x31c/0xc88 kernel/softirq.c:622 __do_softirq+0x14/0x20 kernel/softirq.c:656 Freed by task 7699: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:78 kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x74/0xa4 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6670 [inline] kmem_cache_free+0x184/0x6e4 mm/slub.c:6781 skb_kfree_head net/core/skbuff.c:1066 [inline] skb_free_head+0xbc/0x198 net/core/skbuff.c:1080 skb_release_data+0x4d4/0x664 net/core/skbuff.c:1107 skb_release_all net/core/skbuff.c:1182 [inline] __kfree_skb net/core/skbuff.c:1196 [inline] consume_skb+0xb0/0x130 net/core/skbuff.c:1428 mac80211_hwsim_tx_frame+0x1c8/0x1f4 drivers/net/wireless/virtual/mac80211_hwsim.c:2265 __mac80211_hwsim_beacon_tx+0x3b4/0x5ac drivers/net/wireless/virtual/mac80211_hwsim.c:2314 mac80211_hwsim_beacon_tx+0x33c/0x6e0 drivers/net/wireless/virtual/mac80211_hwsim.c:2365 __iterate_interfaces+0x250/0x504 net/mac80211/util.c:761 ieee80211_iterate_active_interfaces_atomic+0xd4/0x180 net/mac80211/util.c:797 mac80211_hwsim_beacon+0xc8/0x184 drivers/net/wireless/virtual/mac80211_hwsim.c:2395 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x404/0xb78 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x160/0x400 kernel/time/hrtimer.c:1858 handle_softirqs+0x31c/0xc88 kernel/softirq.c:622 __do_softirq+0x14/0x20 kernel/softirq.c:656 The buggy address belongs to the object at ffff0000d7b64000 which belongs to the cache skbuff_small_head of size 704 The buggy address is located 168 bytes inside of freed 704-byte region [ffff0000d7b64000, ffff0000d7b642c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x117b64 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c1e26000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080130013 00000000f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c1e26000 dead000000000122 0000000000000000 head: 0000000000000000 0000000080130013 00000000f5000000 0000000000000000 head: 05ffc00000000002 fffffdffc35ed901 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d7b63f80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ffff0000d7b64000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d7b64080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d7b64100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d7b64180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.h:68:9 index 5139 is out of range for type 'unsigned long[8]' CPU: 0 UID: 0 PID: 7669 Comm: khidpd_15c30006 Tainted: G B L syzkaller #0 PREEMPT Tainted: [B]=BAD_PAGE, [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 ubsan_epilogue+0x14/0x48 lib/ubsan.c:233 __ubsan_handle_out_of_bounds+0xd0/0xfc lib/ubsan.c:455 decode_tail kernel/locking/qspinlock.h:68 [inline] queued_spin_lock_slowpath+0x9f0/0xae8 kernel/locking/qspinlock.c:285 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x2a8/0x2cc kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x64/0x7c kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:557 [inline] set_task_blocked_on include/linux/sched.h:2165 [inline] __mutex_lock_common+0xd24/0x2678 kernel/locking/mutex.c:701 __mutex_lock kernel/locking/mutex.c:776 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:828 l2cap_unregister_user+0x74/0x190 net/bluetooth/l2cap_core.c:1729 hidp_session_thread+0x3d0/0x490 net/bluetooth/hidp/core.c:1304 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 ---[ end trace ]--- Unable to handle kernel paging request at virtual address ffff80008f7d1940 KASAN: probably user-memory-access in range [0x000000047be8ca00-0x000000047be8ca07] Mem abort info: ESR = 0x0000000096000047 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x07: level 3 translation fault Data abort info: ISV = 0, ISS = 0x00000047, ISS2 = 0x00000000 CM = 0, WnR = 1, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000206d55000 [ffff80008f7d1940] pgd=0000000000000000, p4d=100000020f59c003, pud=100000020f59d003, pmd=100000020f5a1003, pte=0000000000000000 Internal error: Oops: 0000000096000047 [#1] SMP Modules linked in: CPU: 0 UID: 0 PID: 7669 Comm: khidpd_15c30006 Tainted: G B L syzkaller #0 PREEMPT Tainted: [B]=BAD_PAGE, [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 pstate: 834000c5 (Nzcv daIF +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : queued_spin_lock_slowpath+0x858/0xae8 kernel/locking/qspinlock.c:288 lr : decode_tail kernel/locking/qspinlock.h:68 [inline] lr : queued_spin_lock_slowpath+0x9f0/0xae8 kernel/locking/qspinlock.c:285 sp : ffff8000a5b67820 x29: ffff8000a5b678c0 x28: 1fffe0001af6c80c x27: ffff80008f7d1940 x26: ffff80008f7d1940 x25: dfff800000000000 x24: ffff700014b6cf08 x23: ffff00019bbfe948 x22: 1fffe0003377fd28 x21: ffff00019bbfe940 x20: ffff0000c6d65590 x19: ffff0000d7b64060 x18: 1fffe00033781890 x17: 363a682e6b636f6c x16: ffff800082e5e68c x15: ffff70001261fc64 x14: 1ffff0001261fc64 x13: 0000000000000004 x12: ffffffffffffffff x11: ffff70001261fc64 x10: ffff80008f7d1940 x9 : 0000000000000000 x8 : 0000000000000000 x7 : 0000000000000001 x6 : ffff8000805761f8 x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000803c861c x2 : 0000000000000001 x1 : 0000000000000004 x0 : ffff00019bbfe948 Call trace: queued_spin_lock_slowpath+0x858/0xae8 kernel/locking/qspinlock.c:291 (P) queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x2a8/0x2cc kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x64/0x7c kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:557 [inline] set_task_blocked_on include/linux/sched.h:2165 [inline] __mutex_lock_common+0xd24/0x2678 kernel/locking/mutex.c:701 __mutex_lock kernel/locking/mutex.c:776 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:828 l2cap_unregister_user+0x74/0x190 net/bluetooth/l2cap_core.c:1729 hidp_session_thread+0x3d0/0x490 net/bluetooth/hidp/core.c:1304 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Code: aa1a03e0 974803de aa1703e0 52800081 (f9000355) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: aa1a03e0 mov x0, x26 4: 974803de bl 0xfffffffffd200f7c 8: aa1703e0 mov x0, x23 c: 52800081 mov w1, #0x4 // #4 * 10: f9000355 str x21, [x26] <-- trapping instruction