================================================================== 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+0x88/0x520 kernel/locking/mutex.c:1227 Read of size 8 at addr ffff88803203d008 by task iou-sqp-12179/12183 CPU: 0 PID: 12183 Comm: iou-sqp-12179 Not tainted 5.12.0-rc2-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+0x176/0x24e lib/dump_stack.c:120 print_address_description+0x5f/0x3a0 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report+0x15e/0x210 mm/kasan/report.c:416 check_region_inline mm/kasan/generic.c:135 [inline] kasan_check_range+0x2b5/0x2f0 mm/kasan/generic.c:186 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+0x88/0x520 kernel/locking/mutex.c:1227 io_sq_thread+0x1510/0x1520 fs/io_uring.c:6773 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 12179: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] ____kasan_kmalloc+0xc2/0xf0 mm/kasan/common.c:506 kasan_kmalloc include/linux/kasan.h:233 [inline] kmem_cache_alloc_trace+0x21b/0x350 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 fs/io_uring.c:9484 [inline] __do_sys_io_uring_setup fs/io_uring.c:9490 [inline] __se_sys_io_uring_setup+0x1230/0x2980 fs/io_uring.c:9487 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 1036: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:357 ____kasan_slab_free+0x100/0x140 mm/kasan/common.c:360 kasan_slab_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x171/0x270 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kfree+0xcf/0x2d0 mm/slub.c:4213 io_put_sq_data fs/io_uring.c:7116 [inline] io_sq_thread_finish+0x56a/0x5c0 fs/io_uring.c:7139 io_ring_ctx_free fs/io_uring.c:8408 [inline] io_ring_exit_work+0x85/0x750 fs/io_uring.c:8539 process_one_work+0x789/0xfd0 kernel/workqueue.c:2275 worker_thread+0xac1/0x1300 kernel/workqueue.c:2421 kthread+0x39a/0x3c0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Last potentially related work creation: kasan_save_stack+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0x130/0x8e0 kernel/rcu/tree.c:3114 sctp_association_free+0x640/0x780 net/sctp/associola.c:381 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:930 [inline] sctp_cmd_interpreter+0x4258/0x5a10 net/sctp/sm_sideeffect.c:1318 sctp_side_effects+0x6c/0x1f0 net/sctp/sm_sideeffect.c:1185 sctp_do_sm+0x197/0x490 net/sctp/sm_sideeffect.c:1156 sctp_assoc_bh_rcv+0x42a/0x680 net/sctp/associola.c:1048 sctp_backlog_rcv+0x16e/0x4c0 net/sctp/input.c:344 sk_backlog_rcv include/net/sock.h:1016 [inline] __release_sock+0x1db/0x4d0 net/core/sock.c:2556 release_sock+0x5d/0x1c0 net/core/sock.c:3080 sctp_wait_for_connect+0x36a/0x630 net/sctp/socket.c:9177 __sctp_connect+0xe72/0x1200 net/sctp/socket.c:1230 sctp_connect+0xab/0x130 net/sctp/socket.c:4730 __sys_connect_file net/socket.c:1837 [inline] __sys_connect+0x2da/0x360 net/socket.c:1854 __do_sys_connect net/socket.c:1864 [inline] __se_sys_connect net/socket.c:1861 [inline] __x64_sys_connect+0x76/0x80 net/socket.c:1861 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0x130/0x8e0 kernel/rcu/tree.c:3114 sctp_association_free+0x640/0x780 net/sctp/associola.c:381 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:930 [inline] sctp_cmd_interpreter+0x4258/0x5a10 net/sctp/sm_sideeffect.c:1318 sctp_side_effects+0x6c/0x1f0 net/sctp/sm_sideeffect.c:1185 sctp_do_sm+0x197/0x490 net/sctp/sm_sideeffect.c:1156 sctp_assoc_bh_rcv+0x42a/0x680 net/sctp/associola.c:1048 sctp_backlog_rcv+0x16e/0x4c0 net/sctp/input.c:344 sk_backlog_rcv include/net/sock.h:1016 [inline] __release_sock+0x1db/0x4d0 net/core/sock.c:2556 release_sock+0x5d/0x1c0 net/core/sock.c:3080 sctp_wait_for_connect+0x36a/0x630 net/sctp/socket.c:9177 __sctp_connect+0xe72/0x1200 net/sctp/socket.c:1230 sctp_connect+0xab/0x130 net/sctp/socket.c:4730 __sys_connect_file net/socket.c:1837 [inline] __sys_connect+0x2da/0x360 net/socket.c:1854 __do_sys_connect net/socket.c:1864 [inline] __se_sys_connect net/socket.c:1861 [inline] __x64_sys_connect+0x76/0x80 net/socket.c:1861 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 ffff88803203d000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 8 bytes inside of 1024-byte region [ffff88803203d000, ffff88803203d400) The buggy address belongs to the page: page:ffffea0000c80e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x32038 head:ffffea0000c80e00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 0000000000000000 0000000400000001 ffff888010841dc0 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88803203cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803203cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88803203d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803203d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88803203d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================