================================================================== BUG: KASAN: use-after-free in hci_cmd_timeout+0x203/0x210 net/bluetooth/hci_core.c:1474 Read of size 2 at addr ffff88806cf69408 by task kworker/1:5/3739 CPU: 1 PID: 3739 Comm: kworker/1:5 Not tainted 5.17.0-rc6-next-20220301-syzkaller #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+0xb5/0x448 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:448 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:465 hci_cmd_timeout+0x203/0x210 net/bluetooth/hci_core.c:1474 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:295 Allocated by task 0: (stack is not available) Freed by task 3701: 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+0x166/0x1a0 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1754 slab_free mm/slub.c:3523 [inline] kfree+0xd6/0x4d0 mm/slub.c:4576 skb_free_head net/core/skbuff.c:655 [inline] skb_release_data+0x6a1/0x7e0 net/core/skbuff.c:677 skb_release_all net/core/skbuff.c:742 [inline] __kfree_skb net/core/skbuff.c:756 [inline] kfree_skb_reason.part.0+0xc3/0x2f0 net/core/skbuff.c:776 kfree_skb_reason+0x85/0x110 include/linux/refcount.h:279 kfree_skb include/linux/skbuff.h:1189 [inline] hci_dev_open_sync+0x9e4/0x20c0 net/bluetooth/hci_sync.c:4015 hci_dev_do_open+0x32/0x70 net/bluetooth/hci_core.c:482 hci_power_on+0x133/0x640 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:295 The buggy address belongs to the object at ffff88806cf69400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff88806cf69400, ffff88806cf69600) The buggy address belongs to the physical page: page:ffffea0001b3da00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6cf68 head:ffffea0001b3da00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888010c41c80 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3683, tgid 3683 (syz-executor.3), ts 1268525797348, free_ts 14042533603 prep_new_page mm/page_alloc.c:2438 [inline] get_page_from_freelist+0xa7f/0x3ec0 mm/page_alloc.c:4179 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5397 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2268 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x26c/0x3c0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x8d0/0xf30 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] __kmalloc_node_track_caller+0x2cb/0x360 mm/slub.c:4971 kmalloc_reserve net/core/skbuff.c:354 [inline] pskb_expand_head+0x15e/0x1110 net/core/skbuff.c:1699 netlink_trim+0x1ea/0x240 net/netlink/af_netlink.c:1299 netlink_broadcast+0x5b/0xd50 net/netlink/af_netlink.c:1495 nlmsg_multicast include/net/netlink.h:1033 [inline] nlmsg_notify+0x8f/0x280 net/netlink/af_netlink.c:2537 rtmsg_fib+0x379/0x500 net/ipv4/fib_semantics.c:539 fib_table_insert+0x770/0x1bd0 net/ipv4/fib_trie.c:1399 fib_magic+0x455/0x540 net/ipv4/fib_frontend.c:1099 fib_add_ifaddr+0x49b/0x540 net/ipv4/fib_frontend.c:1143 fib_netdev_event+0x462/0x680 net/ipv4/fib_frontend.c:1481 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1353 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1403 free_unref_page_prepare mm/page_alloc.c:3325 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3420 free_contig_range+0xb1/0x180 mm/page_alloc.c:9419 destroy_args+0xa8/0x646 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x2a50/0x2ae2 mm/debug_vm_pgtable.c:1332 do_one_initcall+0x103/0x650 init/main.c:1301 do_initcall_level init/main.c:1376 [inline] do_initcalls init/main.c:1392 [inline] do_basic_setup init/main.c:1411 [inline] kernel_init_freeable+0x6b1/0x73a init/main.c:1618 kernel_init+0x1a/0x1d0 init/main.c:1507 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88806cf69300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806cf69380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88806cf69400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806cf69480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806cf69500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================