================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in atomic64_read include/asm-generic/atomic-instrumented.h:837 [inline] BUG: KASAN: use-after-free in atomic_long_read include/asm-generic/atomic-long.h:29 [inline] BUG: KASAN: use-after-free in __mutex_unlock_slowpath+0x9c/0x590 kernel/locking/mutex.c:1227 Read of size 8 at addr ffff00000f71c008 by task iou-sqp-18082/18089 CPU: 0 PID: 18089 Comm: iou-sqp-18082 Not tainted 5.12.0-rc2-syzkaller #0 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x0/0x3e0 arch/arm64/include/asm/pointer_auth.h:76 show_stack+0x18/0x70 arch/arm64/kernel/stacktrace.c:191 __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x120/0x1a8 lib/dump_stack.c:120 print_address_description.constprop.0+0x2c/0x300 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report+0x1ec/0x200 mm/kasan/report.c:416 check_region_inline mm/kasan/generic.c:170 [inline] kasan_check_range+0xfc/0x1a4 mm/kasan/generic.c:186 __kasan_check_read+0x34/0x60 mm/kasan/shadow.c:31 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic64_read include/asm-generic/atomic-instrumented.h:837 [inline] atomic_long_read include/asm-generic/atomic-long.h:29 [inline] __mutex_unlock_slowpath+0x9c/0x590 kernel/locking/mutex.c:1227 mutex_unlock+0x68/0x104 kernel/locking/mutex.c:730 io_sq_thread+0x760/0x12c0 fs/io_uring.c:6773 ret_from_fork+0x10/0x3c arch/arm64/kernel/entry.S:958 Allocated by task 18082: stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:121 kasan_save_stack+0x28/0x60 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+0x88/0xb0 mm/kasan/common.c:515 kasan_kmalloc include/linux/kasan.h:233 [inline] kmem_cache_alloc_trace+0x250/0x464 mm/slub.c:2934 kmalloc include/linux/slab.h:554 [inline] kzalloc include/linux/slab.h:684 [inline] io_get_sq_data fs/io_uring.c:7177 [inline] io_sq_offload_create fs/io_uring.c:7873 [inline] io_uring_create fs/io_uring.c:9401 [inline] io_uring_setup+0xf90/0x218c fs/io_uring.c:9484 __do_sys_io_uring_setup fs/io_uring.c:9490 [inline] __se_sys_io_uring_setup fs/io_uring.c:9487 [inline] __arm64_sys_io_uring_setup+0x50/0x70 fs/io_uring.c:9487 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall arch/arm64/kernel/syscall.c:49 [inline] el0_svc_common.constprop.0+0xf0/0x2c0 arch/arm64/kernel/syscall.c:129 do_el0_svc+0xa4/0xd0 arch/arm64/kernel/syscall.c:168 el0_svc+0x24/0x34 arch/arm64/kernel/entry-common.c:416 el0_sync_handler+0x1a4/0x1b0 arch/arm64/kernel/entry-common.c:432 el0_sync+0x170/0x180 arch/arm64/kernel/entry.S:699 Freed by task 15374: stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:121 kasan_save_stack+0x28/0x60 mm/kasan/common.c:38 kasan_set_track+0x28/0x40 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x50 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free+0xfc/0x160 mm/kasan/common.c:325 __kasan_slab_free+0x14/0x20 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+0x8c/0x260 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kfree+0x154/0x7d0 mm/slub.c:4213 io_put_sq_data fs/io_uring.c:7116 [inline] io_sq_thread_finish+0x34c/0x4d0 fs/io_uring.c:7139 io_ring_ctx_free fs/io_uring.c:8408 [inline] io_ring_exit_work+0x70/0x740 fs/io_uring.c:8539 process_one_work+0x798/0x1764 kernel/workqueue.c:2275 worker_thread+0x3d4/0xcd0 kernel/workqueue.c:2421 kthread+0x320/0x3bc kernel/kthread.c:292 ret_from_fork+0x10/0x3c arch/arm64/kernel/entry.S:958 Last potentially related work creation: stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:121 kasan_save_stack+0x28/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xf8/0x130 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0xb4/0x8b0 kernel/rcu/tree.c:3114 qdisc_destroy+0x26c/0x5d0 net/sched/sch_generic.c:962 qdisc_put+0xb8/0xdc net/sched/sch_generic.c:974 dev_shutdown+0x1c8/0x640 net/sched/sch_generic.c:1322 unregister_netdevice_many+0x670/0x134c net/core/dev.c:10898 default_device_exit_batch+0x230/0x2d0 net/core/dev.c:11425 ops_exit_list+0xd0/0x124 net/core/net_namespace.c:178 cleanup_net+0x3a4/0x820 net/core/net_namespace.c:595 process_one_work+0x798/0x1764 kernel/workqueue.c:2275 worker_thread+0x3d4/0xcd0 kernel/workqueue.c:2421 kthread+0x320/0x3bc kernel/kthread.c:292 ret_from_fork+0x10/0x3c arch/arm64/kernel/entry.S:958 The buggy address belongs to the object at ffff00000f71c000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 8 bytes inside of 1024-byte region [ffff00000f71c000, ffff00000f71c400) The buggy address belongs to the page: page:00000000216f5fd5 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4f718 head:00000000216f5fd5 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff0000148cd901 flags: 0x1ffc00000010200(slab|head) raw: 01ffc00000010200 dead000000000100 dead000000000122 ffff00000c802780 raw: 0000000000000000 0000000080100010 00000001ffffffff ffff0000148cd901 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff00000f71bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff00000f71bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff00000f71c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff00000f71c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff00000f71c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================