wlan1: authentication with 08:02:11:00:00:00 timed out ================================================================== BUG: KASAN: slab-use-after-free in __lock_acquire+0x8e/0xc10 kernel/locking/lockdep.c:5008 Read of size 8 at addr ffff8880737a6980 by task kworker/u4:5/712 CPU: 0 PID: 712 Comm: kworker/u4:5 Not tainted 6.7.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Workqueue: events_unbound cfg80211_wiphy_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x214/0x310 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x167/0x540 mm/kasan/report.c:475 kasan_report+0x142/0x180 mm/kasan/report.c:588 __lock_acquire+0x8e/0xc10 kernel/locking/lockdep.c:5008 lock_acquire+0x1a8/0x3a0 kernel/locking/lockdep.c:5753 __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/0x60 lib/lockref.c:50 dget include/linux/dcache.h:321 [inline] simple_recursive_removal+0x35/0x7c0 fs/libfs.c:518 debugfs_remove+0x49/0x70 fs/debugfs/inode.c:819 ieee80211_sta_debugfs_remove+0x40/0x60 net/mac80211/debugfs_sta.c:1287 __sta_info_destroy_part2+0x302/0x3c0 net/mac80211/sta_info.c:1471 __sta_info_destroy net/mac80211/sta_info.c:1487 [inline] sta_info_destroy_addr+0x1b2/0x1f0 net/mac80211/sta_info.c:1499 ieee80211_destroy_auth_data+0xfb/0x280 net/mac80211/mlme.c:3499 ieee80211_sta_work+0x1291/0x3420 net/mac80211/mlme.c:6736 cfg80211_wiphy_work+0x221/0x260 net/wireless/core.c:437 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x889/0x1260 kernel/workqueue.c:2703 worker_thread+0xa5f/0xf60 kernel/workqueue.c:2784 kthread+0x28f/0x300 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 Allocated by task 6968: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x80 mm/kasan/common.c:52 __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x67/0x3c0 mm/slab.h:763 slab_alloc_node mm/slub.c:3478 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc_lru+0x100/0x280 mm/slub.c:3509 __d_alloc+0x31/0x990 fs/dcache.c:1768 d_alloc fs/dcache.c:1848 [inline] d_alloc_parallel+0xf7/0x1560 fs/dcache.c:2637 __lookup_slow+0x117/0x3f0 fs/namei.c:1679 lookup_one_len+0x173/0x2b0 fs/namei.c:2746 start_creating+0x187/0x310 fs/debugfs/inode.c:386 debugfs_create_dir+0x25/0x3f0 fs/debugfs/inode.c:601 ieee80211_sta_debugfs_add+0x132/0x680 net/mac80211/debugfs_sta.c:1262 sta_info_insert_finish net/mac80211/sta_info.c:878 [inline] sta_info_insert_rcu+0xc29/0x1410 net/mac80211/sta_info.c:944 sta_info_insert+0x15/0x40 net/mac80211/sta_info.c:949 ieee80211_prep_connection+0x833/0xa00 net/mac80211/mlme.c:7237 ieee80211_mgd_auth+0xbe8/0x1260 net/mac80211/mlme.c:7413 rdev_auth net/wireless/rdev-ops.h:481 [inline] cfg80211_mlme_auth+0x56a/0xa40 net/wireless/mlme.c:291 cfg80211_conn_do_work+0x5e7/0xe20 net/wireless/sme.c:181 cfg80211_conn_work+0x279/0x4c0 net/wireless/sme.c:270 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x889/0x1260 kernel/workqueue.c:2703 worker_thread+0xa5f/0xf60 kernel/workqueue.c:2784 kthread+0x28f/0x300 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 Freed by task 0: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522 ____kasan_slab_free+0x122/0x1f0 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook mm/slub.c:1826 [inline] slab_free mm/slub.c:3809 [inline] kmem_cache_free+0x2f0/0x520 mm/slub.c:3831 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0xcca/0x15f0 kernel/rcu/tree.c:2431 __do_softirq+0x1be/0x586 kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492 __call_rcu_common kernel/rcu/tree.c:2681 [inline] call_rcu+0x159/0x8e0 kernel/rcu/tree.c:2795 __dentry_kill+0x560/0x730 fs/dcache.c:621 dentry_kill+0xbb/0x2a0 dput+0x194/0x360 fs/dcache.c:913 find_next_child fs/libfs.c:511 [inline] simple_recursive_removal+0x26d/0x7c0 fs/libfs.c:526 debugfs_remove+0x49/0x70 fs/debugfs/inode.c:819 ieee80211_debugfs_remove_netdev net/mac80211/debugfs_netdev.c:1022 [inline] ieee80211_debugfs_recreate_netdev+0x5b/0x5e0 net/mac80211/debugfs_netdev.c:1044 drv_remove_interface+0x118/0x4e0 net/mac80211/driver-ops.c:119 _ieee80211_change_mac net/mac80211/iface.c:278 [inline] ieee80211_change_mac+0xaf6/0x1110 net/mac80211/iface.c:310 dev_set_mac_address+0x3b7/0x620 net/core/dev.c:8863 dev_set_mac_address_user+0x31/0x50 net/core/dev.c:8882 dev_ifsioc+0xbd8/0xe70 net/core/dev_ioctl.c:541 dev_ioctl+0xab2/0x1220 net/core/dev_ioctl.c:786 sock_do_ioctl+0x240/0x460 net/socket.c:1234 sock_ioctl+0x602/0x8c0 net/socket.c:1339 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:857 do_syscall_64+0x4d/0x120 entry_SYSCALL_64_after_hwframe+0x6f/0x77 Second to last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492 __call_rcu_common kernel/rcu/tree.c:2681 [inline] call_rcu+0x159/0x8e0 kernel/rcu/tree.c:2795 __dentry_kill+0x560/0x730 fs/dcache.c:621 dentry_kill+0xbb/0x2a0 dput+0x194/0x360 fs/dcache.c:913 find_next_child fs/libfs.c:511 [inline] simple_recursive_removal+0x26d/0x7c0 fs/libfs.c:526 debugfs_remove+0x49/0x70 fs/debugfs/inode.c:819 ieee80211_sta_debugfs_remove+0x40/0x60 net/mac80211/debugfs_sta.c:1287 __sta_info_destroy_part2+0x302/0x3c0 net/mac80211/sta_info.c:1471 __sta_info_destroy net/mac80211/sta_info.c:1487 [inline] sta_info_destroy_addr+0x1b2/0x1f0 net/mac80211/sta_info.c:1499 ieee80211_destroy_auth_data+0xfb/0x280 net/mac80211/mlme.c:3499 ieee80211_sta_work+0x1291/0x3420 net/mac80211/mlme.c:6736 cfg80211_wiphy_work+0x221/0x260 net/wireless/core.c:437 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x889/0x1260 kernel/workqueue.c:2703 worker_thread+0xa5f/0xf60 kernel/workqueue.c:2784 kthread+0x28f/0x300 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 The buggy address belongs to the object at ffff8880737a68d0 which belongs to the cache dentry of size 312 The buggy address is located 176 bytes inside of freed 312-byte region [ffff8880737a68d0, ffff8880737a6a08) The buggy address belongs to the physical page: page:ffffea0001cde980 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x737a6 head:ffffea0001cde980 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88801e1cbe01 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff88814000a780 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000150015 00000001ffffffff ffff88801e1cbe01 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Reclaimable, gfp_mask 0x1d20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 5794, tgid 5794 (udevd), ts 115088098531, free_ts 11856689449 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x10f/0x130 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0x345c/0x3600 mm/page_alloc.c:3312 __alloc_pages+0x255/0x650 mm/page_alloc.c:4568 alloc_pages_mpol+0x3de/0x690 mm/mempolicy.c:2133 alloc_slab_page+0x6a/0x170 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x70/0x270 mm/slub.c:2070 ___slab_alloc+0x94b/0xee0 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc_lru+0x187/0x280 mm/slub.c:3509 __d_alloc+0x31/0x990 fs/dcache.c:1768 d_alloc fs/dcache.c:1848 [inline] d_alloc_parallel+0xf7/0x1560 fs/dcache.c:2637 lookup_open fs/namei.c:3402 [inline] open_last_lookups fs/namei.c:3546 [inline] path_openat+0x92f/0x3250 fs/namei.c:3776 do_filp_open+0x234/0x490 fs/namei.c:3809 do_sys_openat2+0x13e/0x1d0 fs/open.c:1440 do_sys_open fs/open.c:1455 [inline] __do_sys_openat fs/open.c:1471 [inline] __se_sys_openat fs/open.c:1466 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1466 do_syscall_64+0x4d/0x120 entry_SYSCALL_64_after_hwframe+0x6f/0x77 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x808/0x920 mm/page_alloc.c:2347 free_unref_page+0x37/0x3a0 mm/page_alloc.c:2487 free_contig_range+0x91/0x140 mm/page_alloc.c:6536 destroy_args+0x8a/0x890 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x466/0x770 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x211/0x6e0 init/main.c:1236 do_initcall_level+0x15a/0x280 init/main.c:1298 do_initcalls+0x3f/0x80 init/main.c:1314 kernel_init_freeable+0x3ec/0x580 init/main.c:1551 kernel_init+0x1d/0x2a0 init/main.c:1441 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 Memory state around the buggy address: ffff8880737a6880: fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb ffff8880737a6900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880737a6980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880737a6a00: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb ffff8880737a6a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================