================================================================== BUG: KASAN: use-after-free in hci_cmd_timeout+0x239/0x250 net/bluetooth/hci_core.c:1473 Read of size 8 at addr ffff88801e87ee90 by task kworker/0:3/3694 CPU: 0 PID: 3694 Comm: kworker/0:3 Not tainted 5.18.0-rc1-syzkaller-00350-g1862a69c9174 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events hci_cmd_timeout Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x467 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 hci_cmd_timeout+0x239/0x250 net/bluetooth/hci_core.c:1473 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 3686: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] __kasan_slab_alloc+0x85/0xb0 mm/kasan/common.c:469 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:749 [inline] slab_alloc mm/slab.c:3316 [inline] __kmem_cache_alloc_lru mm/slab.c:3493 [inline] kmem_cache_alloc+0x265/0x560 mm/slab.c:3513 skb_clone+0x170/0x3c0 net/core/skbuff.c:1520 hci_cmd_work+0x191/0x3c0 net/bluetooth/hci_core.c:3855 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Freed by task 47: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free+0x13d/0x180 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:200 [inline] __cache_free mm/slab.c:3439 [inline] kmem_cache_free.part.0+0xa9/0x240 mm/slab.c:3749 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:700 kfree_skb_reason+0x85/0x110 include/linux/refcount.h:279 kfree_skb include/linux/skbuff.h:1250 [inline] hci_dev_open_sync+0xabd/0x20b0 net/bluetooth/hci_sync.c:4022 hci_dev_do_open+0x32/0x70 net/bluetooth/hci_core.c:482 hci_power_on+0x133/0x630 net/bluetooth/hci_core.c:963 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff88801e87edc0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 208 bytes inside of 232-byte region [ffff88801e87edc0, ffff88801e87eea8) The buggy address belongs to the physical page: page:ffffea00007a1f80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1e87e flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000095c848 ffffea0001d56788 ffff8881400a3b00 raw: 0000000000000000 ffff88801e87e000 000000010000000c 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 0x362220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL|__GFP_THISNODE), pid 0, tgid 0 (swapper/0), ts 1600734922702, free_ts 1599586239581 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0xba2/0x3e00 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408 __alloc_pages_node include/linux/gfp.h:587 [inline] kmem_getpages mm/slab.c:1378 [inline] cache_grow_begin+0x75/0x350 mm/slab.c:2584 cache_alloc_refill+0x27f/0x380 mm/slab.c:2957 ____cache_alloc mm/slab.c:3040 [inline] ____cache_alloc mm/slab.c:3023 [inline] slab_alloc_node mm/slab.c:3241 [inline] kmem_cache_alloc_node+0x503/0x590 mm/slab.c:3607 __alloc_skb+0x215/0x340 net/core/skbuff.c:414 __netdev_alloc_skb+0x73/0x400 net/core/skbuff.c:494 netdev_alloc_skb include/linux/skbuff.h:3100 [inline] dev_alloc_skb include/linux/skbuff.h:3113 [inline] __ieee80211_beacon_get+0xa3c/0x1870 net/mac80211/tx.c:5167 ieee80211_beacon_get_tim+0x8f/0x930 net/mac80211/tx.c:5246 ieee80211_beacon_get include/net/mac80211.h:5023 [inline] mac80211_hwsim_beacon_tx+0x111/0x920 drivers/net/wireless/mac80211_hwsim.c:1908 __iterate_interfaces+0x1e5/0x560 net/mac80211/util.c:793 ieee80211_iterate_active_interfaces_atomic+0x70/0x180 net/mac80211/util.c:829 mac80211_hwsim_beacon+0xcd/0x1c0 drivers/net/wireless/mac80211_hwsim.c:1961 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x609/0xe50 kernel/time/hrtimer.c:1749 hrtimer_run_softirq+0x17b/0x360 kernel/time/hrtimer.c:1766 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1356 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1406 free_unref_page_prepare mm/page_alloc.c:3328 [inline] free_unref_page+0x19/0x6a0 mm/page_alloc.c:3423 slab_destroy mm/slab.c:1630 [inline] slabs_destroy+0x89/0xc0 mm/slab.c:1650 cache_flusharray mm/slab.c:3411 [inline] ___cache_free+0x34e/0x670 mm/slab.c:3474 qlink_free mm/kasan/quarantine.c:157 [inline] qlist_free_all+0x4f/0x1b0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:446 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:749 [inline] slab_alloc_node mm/slab.c:3253 [inline] kmem_cache_alloc_node+0x2ea/0x590 mm/slab.c:3607 __alloc_skb+0x215/0x340 net/core/skbuff.c:414 alloc_skb include/linux/skbuff.h:1300 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1191 [inline] netlink_sendmsg+0x98f/0xe00 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 ____sys_sendmsg+0x6e2/0x800 net/socket.c:2413 ___sys_sendmsg+0xf3/0x170 net/socket.c:2467 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2496 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff88801e87ed80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88801e87ee00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801e87ee80: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801e87ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801e87ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================