================================================================== BUG: KASAN: slab-use-after-free in hci_cmd_timeout+0x1d9/0x1e0 net/bluetooth/hci_core.c:1526 Read of size 2 at addr ffff8880345852b8 by task kworker/u9:5/5104 CPU: 1 PID: 5104 Comm: kworker/u9:5 Not tainted 6.9.0-syzkaller-02100-g4b95dc87362a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Workqueue: hci0 hci_cmd_timeout Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 hci_cmd_timeout+0x1d9/0x1e0 net/bluetooth/hci_core.c:1526 process_one_work kernel/workqueue.c:3267 [inline] process_scheduled_works+0xa10/0x17c0 kernel/workqueue.c:3348 worker_thread+0x86d/0xd70 kernel/workqueue.c:3429 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 5109: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3871 [inline] slab_alloc_node mm/slub.c:3918 [inline] kmem_cache_alloc+0x174/0x350 mm/slub.c:3925 skb_clone+0x20c/0x390 net/core/skbuff.c:2075 hci_send_cmd_sync net/bluetooth/hci_core.c:4219 [inline] hci_cmd_work+0x29e/0x670 net/bluetooth/hci_core.c:4239 process_one_work kernel/workqueue.c:3267 [inline] process_scheduled_works+0xa10/0x17c0 kernel/workqueue.c:3348 worker_thread+0x86d/0xd70 kernel/workqueue.c:3429 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Freed by task 22823: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4353 [inline] kmem_cache_free+0x10b/0x2d0 mm/slub.c:4417 kfree_skb include/linux/skbuff.h:1268 [inline] __hci_req_sync+0x62f/0x950 net/bluetooth/hci_request.c:184 hci_req_sync+0xa9/0xd0 net/bluetooth/hci_request.c:206 hci_inquiry+0x44b/0x870 net/bluetooth/hci_core.c:425 sock_do_ioctl+0x158/0x460 net/socket.c:1222 sock_ioctl+0x629/0x8e0 net/socket.c:1341 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:904 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:890 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888034585280 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 56 bytes inside of freed 240-byte region [ffff888034585280, ffff888034585370) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x34585 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888019a95780 dead000000000100 dead000000000122 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 0x152cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 11573, tgid 11573 (kworker/u8:13), ts 540273268279, free_ts 540172904341 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0x3410/0x35b0 mm/page_alloc.c:3317 __alloc_pages+0x256/0x6c0 mm/page_alloc.c:4575 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page+0x5f/0x160 mm/slub.c:2190 allocate_slab mm/slub.c:2353 [inline] new_slab+0x84/0x2f0 mm/slub.c:2406 ___slab_alloc+0xb07/0x12e0 mm/slub.c:3592 __slab_alloc mm/slub.c:3682 [inline] __slab_alloc_node mm/slub.c:3735 [inline] slab_alloc_node mm/slub.c:3908 [inline] kmem_cache_alloc_node+0x24a/0x390 mm/slub.c:3961 __alloc_skb+0x1c3/0x440 net/core/skbuff.c:658 alloc_skb include/linux/skbuff.h:1319 [inline] nlmsg_new include/net/netlink.h:1010 [inline] rtmsg_ifinfo_build_skb+0x89/0x290 net/core/rtnetlink.c:4048 unregister_netdevice_many_notify+0xe3e/0x16e0 net/core/dev.c:11109 unregister_netdevice_many net/core/dev.c:11163 [inline] default_device_exit_batch+0xa0f/0xa90 net/core/dev.c:11640 ops_exit_list net/core/net_namespace.c:178 [inline] cleanup_net+0x89d/0xcc0 net/core/net_namespace.c:640 process_one_work kernel/workqueue.c:3267 [inline] process_scheduled_works+0xa10/0x17c0 kernel/workqueue.c:3348 worker_thread+0x86d/0xd70 kernel/workqueue.c:3429 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 page last free pid 11573 tgid 11573 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1141 [inline] free_unref_page_prepare+0x97b/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 discard_slab mm/slub.c:2452 [inline] __put_partials+0xeb/0x130 mm/slub.c:2920 put_cpu_partial+0x17c/0x250 mm/slub.c:2995 __slab_free+0x2ea/0x3d0 mm/slub.c:4224 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x5e/0xc0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3871 [inline] slab_alloc_node mm/slub.c:3918 [inline] kmalloc_trace+0x16f/0x370 mm/slub.c:4065 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] mld_add_delrec net/ipv6/mcast.c:742 [inline] igmp6_leave_group net/ipv6/mcast.c:2624 [inline] igmp6_group_dropped+0x3a6/0xef0 net/ipv6/mcast.c:722 __ipv6_dev_mc_dec+0x2bd/0x340 net/ipv6/mcast.c:978 addrconf_leave_solict net/ipv6/addrconf.c:2251 [inline] __ipv6_ifa_notify+0x912/0x11f0 net/ipv6/addrconf.c:6282 addrconf_ifdown+0xeea/0x1bc0 net/ipv6/addrconf.c:3978 addrconf_notify+0x3cb/0x1020 notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:1988 [inline] call_netdevice_notifiers net/core/dev.c:2002 [inline] dev_close_many+0x33c/0x4c0 net/core/dev.c:1543 Memory state around the buggy address: ffff888034585180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888034585200: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc >ffff888034585280: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888034585300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff888034585380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================