Bluetooth: hci11: command 0x1003 tx timeout ================================================================== BUG: KASAN: use-after-free in hci_cmd_timeout+0x6a/0x1f0 net/bluetooth/hci_core.c:1494 Read of size 8 at addr ffff8880231bf5d8 by task kworker/u5:10/4258 CPU: 1 PID: 4258 Comm: kworker/u5:10 Not tainted 6.1.0-rc2-syzkaller-00062-ga970174d7a10 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Workqueue: hci6 hci_cmd_timeout Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x220 mm/kasan/report.c:395 kasan_report+0x139/0x170 mm/kasan/report.c:495 hci_cmd_timeout+0x6a/0x1f0 net/bluetooth/hci_core.c:1494 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 3725: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:325 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x1cc/0x300 mm/slub.c:3422 skb_clone+0x1e0/0x360 net/core/skbuff.c:1650 hci_cmd_work+0xba/0x490 net/bluetooth/hci_core.c:4080 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Freed by task 3726: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:511 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x94/0x1d0 mm/slub.c:3683 kfree_skb include/linux/skbuff.h:1216 [inline] hci_dev_open_sync+0x622/0x8e0 net/bluetooth/hci_sync.c:4699 hci_dev_do_open net/bluetooth/hci_core.c:483 [inline] hci_power_on+0x16a/0x610 net/bluetooth/hci_core.c:984 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the object at ffff8880231bf500 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 216 bytes inside of 240-byte region [ffff8880231bf500, ffff8880231bf5f0) The buggy address belongs to the physical page: page:ffffea00008c6fc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x231bf flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000762fc0 dead000000000003 ffff888144e97500 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 0, tgid 0 (swapper/1), ts 1713401420639, free_ts 1712752150142 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4287 __alloc_pages+0x259/0x560 mm/page_alloc.c:5554 alloc_slab_page+0x70/0xf0 mm/slub.c:1794 allocate_slab+0x5e/0x4b0 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x7f4/0xeb0 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] kmem_cache_alloc_node+0x283/0x340 mm/slub.c:3443 __alloc_skb+0xd5/0x620 net/core/skbuff.c:497 skb_copy+0xe8/0x750 net/core/skbuff.c:1715 mac80211_hwsim_tx_frame_no_nl+0x11b1/0x1b00 drivers/net/wireless/mac80211_hwsim.c:1719 mac80211_hwsim_tx_frame+0x1cb/0x220 drivers/net/wireless/mac80211_hwsim.c:2048 mac80211_hwsim_beacon_tx+0x5e1/0xa60 drivers/net/wireless/mac80211_hwsim.c:2111 __iterate_interfaces+0x231/0x4a0 net/mac80211/util.c:796 ieee80211_iterate_active_interfaces_atomic+0x9b/0x120 net/mac80211/util.c:832 mac80211_hwsim_beacon+0xc8/0x1d0 drivers/net/wireless/mac80211_hwsim.c:2137 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x50b/0xa60 kernel/time/hrtimer.c:1749 hrtimer_run_softirq+0x1a1/0x580 kernel/time/hrtimer.c:1766 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1458 [inline] free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1508 free_unref_page_prepare mm/page_alloc.c:3386 [inline] free_unref_page+0x7d/0x630 mm/page_alloc.c:3482 __vunmap+0x867/0x9d0 mm/vmalloc.c:2713 free_work+0x66/0x90 mm/vmalloc.c:97 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff8880231bf480: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff8880231bf500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880231bf580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ^ ffff8880231bf600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff8880231bf680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================