================================================================== BUG: KASAN: use-after-free in hci_cmd_timeout+0x203/0x210 net/bluetooth/hci_core.c:1474 Read of size 2 at addr ffff88806ce95808 by task kworker/1:10/3727 CPU: 1 PID: 3727 Comm: kworker/1:10 Not tainted 5.17.0-rc6-next-20220303-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+0xeb/0x495 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+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 3643: 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 ffff88806ce95800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff88806ce95800, ffff88806ce95a00) The buggy address belongs to the physical page: page:ffffea0001b3a500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6ce94 head:ffffea0001b3a500 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001b7e400 dead000000000002 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 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 3625, tgid 3625 (syz-executor.1), ts 174777187580, free_ts 12032703890 prep_new_page mm/page_alloc.c:2438 [inline] get_page_from_freelist+0xa7f/0x3ec0 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5400 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] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc_trace+0x310/0x3f0 mm/slub.c:3269 kmalloc include/linux/slab.h:584 [inline] kzalloc include/linux/slab.h:717 [inline] fib6_info_alloc+0xc1/0x210 net/ipv6/ip6_fib.c:156 ip6_route_info_create+0x33e/0x1aa0 net/ipv6/route.c:3760 ip6_route_add+0x24/0x150 net/ipv6/route.c:3854 addrconf_prefix_route+0x30a/0x4e0 net/ipv6/addrconf.c:2418 addrconf_add_linklocal+0x24b/0x590 net/ipv6/addrconf.c:3210 addrconf_addr_gen+0x387/0x3d0 net/ipv6/addrconf.c:3339 addrconf_dev_config+0x255/0x420 net/ipv6/addrconf.c:3384 addrconf_notify+0xdbb/0x1ba0 net/ipv6/addrconf.c:3624 notifier_call_chain+0xb5/0x200 kernel/notifier.c:84 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:9422 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: ffff88806ce95700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806ce95780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88806ce95800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806ce95880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806ce95900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================