================================================================== BUG: KASAN: slab-out-of-bounds in device_for_each_child+0xa7/0x170 drivers/base/core.c:4044 Read of size 8 at addr ffff88806e8795f8 by task kbnepd bnep0/31364 CPU: 0 PID: 31364 Comm: kbnepd bnep0 Not tainted 6.9.0-rc5-syzkaller-00202-g78cfe547607a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 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 device_for_each_child+0xa7/0x170 drivers/base/core.c:4044 pm_runtime_set_memalloc_noio+0x114/0x260 drivers/base/power/runtime.c:248 netdev_unregister_kobject+0x178/0x250 net/core/net-sysfs.c:2106 unregister_netdevice_many_notify+0x11dd/0x16e0 net/core/dev.c:11135 unregister_netdevice_many net/core/dev.c:11163 [inline] unregister_netdevice_queue+0x303/0x370 net/core/dev.c:11042 unregister_netdevice include/linux/netdevice.h:3115 [inline] unregister_netdev+0x1c/0x30 net/core/dev.c:11181 bnep_session+0x2e09/0x3000 net/bluetooth/bnep/core.c:525 kthread+0x2f0/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88806e879400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 504 bytes inside of allocated 512-byte region [ffff88806e879400, ffff88806e879600) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6e878 head: order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff80000000840(slab|head|node=0|zone=1|lastcpupid=0xfff) page_type: 0xffffffff() raw: 00fff80000000840 ffff888015041c80 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 head: 00fff80000000840 ffff888015041c80 dead000000000122 0000000000000000 head: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 head: 00fff80000000002 ffffea0001ba1e01 dead000000000122 00000000ffffffff head: 0000000400000000 0000000000000000 00000000ffffffff 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 31403, tgid 1580014603 (syz-executor.2), ts 31403, free_ts 723111673213 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:2175 allocate_slab mm/slub.c:2338 [inline] new_slab+0x84/0x2f0 mm/slub.c:2391 ___slab_alloc+0xc73/0x1260 mm/slub.c:3525 __slab_alloc mm/slub.c:3610 [inline] __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] kmalloc_trace+0x269/0x360 mm/slub.c:3992 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] mca_alloc net/ipv6/mcast.c:880 [inline] __ipv6_dev_mc_inc+0x426/0xa90 net/ipv6/mcast.c:936 ipv6_add_dev+0xe1b/0x1220 net/ipv6/addrconf.c:470 addrconf_notify+0x6a7/0x1020 net/ipv6/addrconf.c:3651 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] register_netdevice+0x15b2/0x1a20 net/core/dev.c:10316 ipcaif_newlink+0x1f0/0x4d0 net/caif/chnl_net.c:453 rtnl_newlink_create net/core/rtnetlink.c:3494 [inline] __rtnl_newlink net/core/rtnetlink.c:3714 [inline] rtnl_newlink+0x158f/0x20a0 net/core/rtnetlink.c:3727 rtnetlink_rcv_msg+0x89b/0x10d0 net/core/rtnetlink.c:6595 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2559 page last free pid 31258 tgid 31258 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+0x986/0xab0 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 __folio_put_large+0x13f/0x190 mm/swap.c:132 __folio_put+0x299/0x390 mm/swap.c:140 folio_put include/linux/mm.h:1506 [inline] free_large_kmalloc+0x105/0x1c0 mm/slub.c:4361 kfree+0x1ca/0x3a0 mm/slub.c:4384 hci_release_dev+0x1516/0x16a0 net/bluetooth/hci_core.c:2833 bt_host_release+0x83/0x90 net/bluetooth/hci_sysfs.c:94 device_release+0x99/0x1c0 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22f/0x480 lib/kobject.c:737 vhci_release+0x8b/0xd0 drivers/bluetooth/hci_vhci.c:675 __fput+0x429/0x8a0 fs/file_table.c:422 task_work_run+0x24f/0x310 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa1b/0x27e0 kernel/exit.c:878 do_group_exit+0x207/0x2c0 kernel/exit.c:1027 __do_sys_exit_group kernel/exit.c:1038 [inline] __se_sys_exit_group kernel/exit.c:1036 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1036 Memory state around the buggy address: ffff88806e879480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806e879500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88806e879580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88806e879600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806e879680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================