================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3e6f/0x54c0 kernel/locking/lockdep.c:4771 Read of size 8 at addr ffff88801d04ac78 by task iou-sqp-14261/14262 CPU: 0 PID: 14262 Comm: iou-sqp-14261 Not tainted 5.12.0-rc2-next-20210309-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+0x141/0x1d7 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:4771 lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x1ab/0x740 kernel/locking/lockdep.c:5476 down_write+0x92/0x150 kernel/locking/rwsem.c:1406 io_sq_thread+0x1220/0x1b10 fs/io_uring.c:6718 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 14261: 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_kmalloc mm/kasan/common.c:506 [inline] ____kasan_kmalloc mm/kasan/common.c:465 [inline] __kasan_kmalloc+0x99/0xc0 mm/kasan/common.c:515 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:686 [inline] io_get_sq_data fs/io_uring.c:7120 [inline] io_sq_offload_create fs/io_uring.c:7785 [inline] io_uring_create fs/io_uring.c:9397 [inline] io_uring_setup+0x1552/0x2860 fs/io_uring.c:9477 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 13034: 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+0x92/0x210 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kfree+0xe5/0x7f0 mm/slub.c:4215 io_put_sq_data fs/io_uring.c:7062 [inline] io_sq_thread_finish+0x4b0/0x5f0 fs/io_uring.c:7080 io_ring_ctx_free fs/io_uring.c:8310 [inline] io_ring_exit_work+0x333/0xcf0 fs/io_uring.c:8480 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 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 insert_work+0x48/0x370 kernel/workqueue.c:1331 __queue_work+0x5c1/0xed0 kernel/workqueue.c:1497 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1471 [inline] __run_timers.part.0+0x4a6/0xa50 kernel/time/timer.c:1745 __run_timers kernel/time/timer.c:1726 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1758 __do_softirq+0x29b/0x9f6 kernel/softirq.c:345 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 kvfree_call_rcu+0x74/0x8c0 kernel/rcu/tree.c:3597 drop_sysctl_table+0x3c0/0x4e0 fs/proc/proc_sysctl.c:1646 unregister_sysctl_table fs/proc/proc_sysctl.c:1684 [inline] unregister_sysctl_table+0xc2/0x190 fs/proc/proc_sysctl.c:1659 neigh_sysctl_unregister+0x5b/0x80 net/core/neighbour.c:3714 addrconf_ifdown.isra.0+0xfa8/0x15b0 net/ipv6/addrconf.c:3849 addrconf_notify+0x55c/0x23e0 net/ipv6/addrconf.c:3631 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2063 call_netdevice_notifiers_extack net/core/dev.c:2075 [inline] call_netdevice_notifiers net/core/dev.c:2089 [inline] unregister_netdevice_many+0x951/0x1770 net/core/dev.c:10905 default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:11425 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:178 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:595 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff88801d04ac00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 120 bytes inside of 512-byte region [ffff88801d04ac00, ffff88801d04ae00) The buggy address belongs to the page: page:0000000070af04e1 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d048 head:0000000070af04e1 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010841c80 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801d04ab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801d04ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801d04ac00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801d04ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801d04ad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================