================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3e6f/0x54c0 kernel/locking/lockdep.c:4770 Read of size 8 at addr ffff88801d4c88d0 by task syz-executor.5/13715 CPU: 1 PID: 13715 Comm: syz-executor.5 Not tainted 5.11.0-next-20210224-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0xfa/0x151 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 __lock_acquire+0x3e6f/0x54c0 kernel/locking/lockdep.c:4770 lock_acquire kernel/locking/lockdep.c:5510 [inline] lock_acquire+0x1ab/0x730 kernel/locking/lockdep.c:5475 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:159 try_to_wake_up+0x98/0x14a0 kernel/sched/core.c:3347 io_wqe_wake_worker+0x51f/0x6a0 fs/io-wq.c:249 io_wqe_enqueue+0x1ff/0x3c0 fs/io-wq.c:786 __io_queue_async_work+0x28a/0x580 fs/io_uring.c:1290 io_queue_async_work fs/io_uring.c:1300 [inline] __io_queue_sqe+0x8b3/0xd60 fs/io_uring.c:6246 io_queue_sqe+0x6f7/0xde0 fs/io_uring.c:6287 io_submit_sqe fs/io_uring.c:6457 [inline] io_submit_sqes+0x520e/0x63d0 fs/io_uring.c:6571 __do_sys_io_uring_enter+0x1154/0x1f50 fs/io_uring.c:9133 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x465ef9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1f4ae9c188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465ef9 RDX: 0000000000000000 RSI: 000000000000450c RDI: 0000000000000004 RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffceb3cf26f R14: 00007f1f4ae9c300 R15: 0000000000022000 Allocated by task 13715: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] __kasan_slab_alloc+0x75/0x90 mm/kasan/common.c:460 kasan_slab_alloc include/linux/kasan.h:223 [inline] slab_post_alloc_hook mm/slab.h:516 [inline] slab_alloc_node mm/slub.c:2907 [inline] kmem_cache_alloc_node+0x16d/0x3c0 mm/slub.c:2943 alloc_task_struct_node kernel/fork.c:170 [inline] dup_task_struct kernel/fork.c:860 [inline] copy_process+0x613/0x6fd0 kernel/fork.c:1940 kernel_clone+0xe7/0xab0 kernel/fork.c:2462 io_wq_fork_thread+0xa7/0xe0 fs/io-wq.c:601 io_wq_create+0x81c/0xab0 fs/io-wq.c:985 io_init_wq_offload fs/io_uring.c:7779 [inline] io_uring_alloc_task_context+0x185/0x510 fs/io_uring.c:7798 io_uring_add_task_file+0x261/0x350 fs/io_uring.c:8737 io_uring_install_fd fs/io_uring.c:9336 [inline] io_uring_create fs/io_uring.c:9487 [inline] io_uring_setup+0x14c7/0x2c20 fs/io_uring.c:9526 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 12130: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xf5/0x130 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x72/0x1b0 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kmem_cache_free+0x8b/0x730 mm/slub.c:3177 __put_task_struct+0x267/0x3f0 kernel/fork.c:742 put_task_struct include/linux/sched/task.h:111 [inline] delayed_put_task_struct+0x1f6/0x340 kernel/exit.c:173 rcu_do_batch kernel/rcu/tree.c:2559 [inline] rcu_core+0x722/0x1280 kernel/rcu/tree.c:2794 __do_softirq+0x29b/0x9f6 kernel/softirq.c:345 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0xb1/0x700 kernel/rcu/tree.c:3114 put_task_struct_rcu_user+0x7f/0xb0 kernel/exit.c:179 context_switch kernel/sched/core.c:4327 [inline] __schedule+0x914/0x21a0 kernel/sched/core.c:5075 schedule+0xcf/0x270 kernel/sched/core.c:5154 schedule_timeout+0x14a/0x250 kernel/time/timer.c:1892 io_wqe_worker fs/io-wq.c:485 [inline] task_thread.isra.0+0x920/0x1480 fs/io-wq.c:575 task_thread_bound+0x18/0x20 fs/io-wq.c:581 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0xb1/0x700 kernel/rcu/tree.c:3114 put_task_struct_rcu_user+0x7f/0xb0 kernel/exit.c:179 context_switch kernel/sched/core.c:4327 [inline] __schedule+0x914/0x21a0 kernel/sched/core.c:5075 preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:5235 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:35 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] _raw_spin_unlock_irqrestore+0x46/0x50 kernel/locking/spinlock.c:191 debug_object_active_state lib/debugobjects.c:940 [inline] debug_object_active_state+0x260/0x350 lib/debugobjects.c:909 debug_rcu_head_queue kernel/rcu/rcu.h:177 [inline] __call_rcu kernel/rcu/tree.c:3023 [inline] call_rcu+0x44/0x700 kernel/rcu/tree.c:3114 destroy_inode+0x129/0x1b0 fs/inode.c:289 iput_final fs/inode.c:1654 [inline] iput.part.0+0x57e/0x810 fs/inode.c:1680 iput+0x58/0x70 fs/inode.c:1670 dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:374 __dentry_kill+0x3c0/0x640 fs/dcache.c:580 dentry_kill fs/dcache.c:718 [inline] dput+0x63a/0xbc0 fs/dcache.c:886 find_next_child fs/libfs.c:264 [inline] simple_recursive_removal+0x136/0x6b0 fs/libfs.c:279 debugfs_remove fs/debugfs/inode.c:729 [inline] debugfs_remove+0x59/0x80 fs/debugfs/inode.c:723 ieee80211_debugfs_remove_netdev+0x43/0xc0 net/mac80211/debugfs_netdev.c:822 ieee80211_teardown_sdata+0x48/0x2d0 net/mac80211/iface.c:684 ieee80211_if_change_type+0x43b/0x6e0 net/mac80211/iface.c:1683 ieee80211_change_iface+0x26/0x210 net/mac80211/cfg.c:157 rdev_change_virtual_intf net/wireless/rdev-ops.h:69 [inline] cfg80211_change_iface+0x335/0xf30 net/wireless/util.c:1067 nl80211_set_interface+0x65c/0x8d0 net/wireless/nl80211.c:3912 genl_family_rcv_msg_doit+0x228/0x320 net/netlink/genetlink.c:739 genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0x328/0x580 net/netlink/genetlink.c:800 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 __sys_sendto+0x21c/0x320 net/socket.c:1977 __do_sys_sendto net/socket.c:1989 [inline] __se_sys_sendto net/socket.c:1985 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1985 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88801d4c8000 which belongs to the cache task_struct of size 6912 The buggy address is located 2256 bytes inside of 6912-byte region [ffff88801d4c8000, ffff88801d4c9b00) The buggy address belongs to the page: page:000000008f3fef0a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d4c8 head:000000008f3fef0a order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888140004000 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801d4c8780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801d4c8800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801d4c8880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801d4c8900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801d4c8980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================