wlan1: authentication with 08:02:11:00:00:00 timed out ================================================================== BUG: KASAN: slab-use-after-free in __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 Read of size 1 at addr ffff88803aaaae08 by task kworker/u32:5/101 CPU: 0 UID: 0 PID: 101 Comm: kworker/u32:5 Not tainted 6.16.0-rc4-syzkaller-g4c06e63b9203 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events_unbound cfg80211_wiphy_work Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xcd/0x680 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 __kasan_check_byte+0x36/0x50 mm/kasan/common.c:557 kasan_check_byte include/linux/kasan.h:399 [inline] lock_acquire kernel/locking/lockdep.c:5845 [inline] lock_acquire+0xfc/0x350 kernel/locking/lockdep.c:5828 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] lockref_get+0x15/0x50 lib/lockref.c:50 dget include/linux/dcache.h:345 [inline] simple_recursive_removal+0x3b/0x690 fs/libfs.c:611 debugfs_remove+0x5d/0x80 fs/debugfs/inode.c:805 ieee80211_sta_debugfs_remove+0x38/0x80 net/mac80211/debugfs_sta.c:1279 __sta_info_destroy_part2+0x32c/0x540 net/mac80211/sta_info.c:1501 __sta_info_destroy net/mac80211/sta_info.c:1517 [inline] __sta_info_destroy net/mac80211/sta_info.c:1508 [inline] sta_info_destroy_addr+0x98/0x150 net/mac80211/sta_info.c:1529 ieee80211_destroy_auth_data+0x17a/0x300 net/mac80211/mlme.c:4594 ieee80211_sta_work+0x2335/0x3060 net/mac80211/mlme.c:8304 ieee80211_iface_work+0x4a7/0x1020 net/mac80211/iface.c:1741 cfg80211_wiphy_work+0x3dc/0x550 net/wireless/core.c:435 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 60: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_lru_noprof+0x1d0/0x3b0 mm/slub.c:4216 __d_alloc+0x31/0xaa0 fs/dcache.c:1690 d_alloc+0x4a/0x1e0 fs/dcache.c:1769 d_alloc_parallel+0xe3/0x12e0 fs/dcache.c:2533 __lookup_slow+0x193/0x460 fs/namei.c:1802 lookup_noperm+0xe1/0x110 fs/namei.c:2963 start_creating.part.0+0x15a/0x3e0 fs/debugfs/inode.c:391 start_creating fs/debugfs/inode.c:364 [inline] debugfs_create_dir+0x6c/0x5f0 fs/debugfs/inode.c:586 ieee80211_sta_debugfs_add+0x13b/0x9a0 net/mac80211/debugfs_sta.c:1254 sta_info_insert_finish net/mac80211/sta_info.c:892 [inline] sta_info_insert_rcu+0xd8f/0x1b70 net/mac80211/sta_info.c:960 sta_info_insert+0x16/0xd0 net/mac80211/sta_info.c:965 ieee80211_prep_connection+0x1094/0x1840 net/mac80211/mlme.c:8848 ieee80211_mgd_auth+0xdcd/0x19c0 net/mac80211/mlme.c:9113 rdev_auth net/wireless/rdev-ops.h:486 [inline] cfg80211_mlme_auth+0x561/0x980 net/wireless/mlme.c:291 cfg80211_conn_do_work+0x64c/0xfd0 net/wireless/sme.c:183 cfg80211_conn_work+0x268/0x3e0 net/wireless/sme.c:273 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 23: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4745 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548 __call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3094 dentry_free+0xc2/0x160 fs/dcache.c:442 __dentry_kill+0x498/0x600 fs/dcache.c:688 dput.part.0+0x4b1/0x9b0 fs/dcache.c:911 dput+0x1f/0x30 fs/dcache.c:901 find_next_child+0x18f/0x280 fs/libfs.c:603 simple_recursive_removal+0x253/0x690 fs/libfs.c:619 debugfs_remove+0x5d/0x80 fs/debugfs/inode.c:805 ieee80211_debugfs_remove_netdev net/mac80211/debugfs_netdev.c:1021 [inline] ieee80211_debugfs_recreate_netdev+0xb5/0x17e0 net/mac80211/debugfs_netdev.c:1034 drv_remove_interface+0x2bf/0x640 net/mac80211/driver-ops.c:125 _ieee80211_change_mac net/mac80211/iface.c:277 [inline] ieee80211_change_mac+0xa52/0x1480 net/mac80211/iface.c:309 netif_set_mac_address+0x303/0x4a0 net/core/dev.c:9688 dev_set_mac_address_user+0xc6/0x270 net/core/dev_api.c:95 dev_ifsioc+0x1457/0x1f70 net/core/dev_ioctl.c:577 dev_ioctl+0x223/0x10e0 net/core/dev_ioctl.c:823 sock_do_ioctl+0x19d/0x280 net/socket.c:1204 sock_ioctl+0x227/0x6b0 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x18b/0x210 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88803aaaad38 which belongs to the cache dentry of size 312 The buggy address is located 208 bytes inside of freed 312-byte region [ffff88803aaaad38, ffff88803aaaae70) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3aaaa head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88802c062501 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801cef1cc0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000150015 00000000f5000000 ffff88802c062501 head: 00fff00000000040 ffff88801cef1cc0 0000000000000000 dead000000000001 head: 0000000000000000 0000000000150015 00000000f5000000 ffff88802c062501 head: 00fff00000000001 ffffea0000eaaa81 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_RECLAIMABLE|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5961, tgid 5961 (udevd), ts 53794724287, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab mm/slub.c:2619 [inline] new_slab+0x23b/0x330 mm/slub.c:2673 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3859 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949 __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] kmem_cache_alloc_lru_noprof+0xf4/0x3b0 mm/slub.c:4216 __d_alloc+0x31/0xaa0 fs/dcache.c:1690 d_alloc+0x4a/0x1e0 fs/dcache.c:1769 d_alloc_parallel+0xe3/0x12e0 fs/dcache.c:2533 lookup_open.isra.0+0x665/0x1580 fs/namei.c:3639 open_last_lookups fs/namei.c:3816 [inline] path_openat+0x893/0x2cb0 fs/namei.c:4052 do_filp_open+0x20b/0x470 fs/namei.c:4082 do_sys_openat2+0x11b/0x1d0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1463 page_owner free stack trace missing Memory state around the buggy address: ffff88803aaaad00: fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb ffff88803aaaad80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88803aaaae00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ^ ffff88803aaaae80: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 ffff88803aaaaf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================