Bluetooth: hci8: Opcode 0x1003 failed: -110 ================================================================== BUG: KASAN: use-after-free in hci_cmd_timeout+0x6a/0x1f0 net/bluetooth/hci_core.c:1494 Read of size 8 at addr ffff88807581e358 by task kworker/u5:2/11927 CPU: 0 PID: 11927 Comm: kworker/u5:2 Not tainted 6.1.0-rc5-syzkaller-00326-g77c51ba552a1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: hci7 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 3666: 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 48: 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 ffff88807581e280 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 216 bytes inside of 240-byte region [ffff88807581e280, ffff88807581e370) The buggy address belongs to the physical page: page:ffffea0001d60780 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7581e flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00008a1b80 dead000000000005 ffff88801787c500 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 56, tgid 56 (kworker/u4:4), ts 487973054133, free_ts 487970053465 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4288 __alloc_pages+0x259/0x560 mm/page_alloc.c:5555 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 alloc_skb include/linux/skbuff.h:1267 [inline] nlmsg_new include/net/netlink.h:970 [inline] inet6_netconf_notify_devconf+0xf8/0x1b0 net/ipv6/addrconf.c:581 __addrconf_sysctl_unregister net/ipv6/addrconf.c:7116 [inline] addrconf_sysctl_unregister net/ipv6/addrconf.c:7140 [inline] addrconf_ifdown+0x18a2/0x1bc0 net/ipv6/addrconf.c:3903 addrconf_notify+0x3be/0xfe0 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1945 [inline] call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers net/core/dev.c:1997 [inline] unregister_netdevice_many+0xfde/0x1a30 net/core/dev.c:10847 sit_exit_batch_net+0x495/0x4e0 net/ipv6/sit.c:1885 ops_exit_list net/core/net_namespace.c:174 [inline] cleanup_net+0x80c/0xc50 net/core/net_namespace.c:601 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x7d/0x630 mm/page_alloc.c:3483 __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: ffff88807581e200: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff88807581e280: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807581e300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ^ ffff88807581e380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88807581e400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================