================================================================== BUG: KASAN: use-after-free in wq_list_add_after fs/io-wq.h:44 [inline] BUG: KASAN: use-after-free in io_wqe_insert_work fs/io-wq.c:892 [inline] BUG: KASAN: use-after-free in io_wqe_enqueue+0x772/0x820 fs/io-wq.c:913 Read of size 8 at addr ffff8880383a5200 by task syz-executor.6/15604 CPU: 0 PID: 15604 Comm: syz-executor.6 Not tainted 5.10.123 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x210 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x37/0x7c mm/kasan/report.c:562 wq_list_add_after fs/io-wq.h:44 [inline] io_wqe_insert_work fs/io-wq.c:892 [inline] io_wqe_enqueue+0x772/0x820 fs/io-wq.c:913 __io_queue_async_work fs/io_uring.c:1490 [inline] io_queue_async_work+0x185/0x3d0 fs/io_uring.c:1500 __io_queue_sqe+0x905/0xd00 fs/io_uring.c:6341 io_queue_sqe+0x5bc/0x1020 fs/io_uring.c:6395 io_submit_sqe fs/io_uring.c:6464 [inline] io_submit_sqes+0x130d/0x2310 fs/io_uring.c:6692 __do_sys_io_uring_enter+0x1086/0x1900 fs/io_uring.c:9093 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fcb0e2a5b19 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:00007fcb0b81b188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 00007fcb0e3b8f60 RCX: 00007fcb0e2a5b19 RDX: 0000000004000000 RSI: 00000000000076d3 RDI: 0000000000000003 RBP: 00007fcb0e2fff6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe5e92abcf R14: 00007fcb0b81b300 R15: 0000000000022000 Allocated by task 15604: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:532 [inline] kmem_cache_alloc_bulk+0x147/0x320 mm/slub.c:3343 io_alloc_req fs/io_uring.c:1867 [inline] io_submit_sqes+0x11c2/0x2310 fs/io_uring.c:6672 __do_sys_io_uring_enter+0x1086/0x1900 fs/io_uring.c:9093 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 15609: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x110/0x150 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1542 [inline] slab_free_freelist_hook+0xa9/0x180 mm/slub.c:1576 slab_free mm/slub.c:3149 [inline] kmem_cache_free+0xa7/0x310 mm/slub.c:3165 __io_free_req+0x216/0x310 fs/io_uring.c:1922 io_free_req fs/io_uring.c:2147 [inline] io_double_put_req fs/io_uring.c:2287 [inline] io_put_req+0xab/0x100 fs/io_uring.c:2283 io_worker_handle_work+0xea8/0x1a30 fs/io-wq.c:581 io_wqe_worker+0xbd2/0x1000 fs/io-wq.c:615 kthread+0x38f/0x470 kernel/kthread.c:313 ret_from_fork+0x22/0x30 arch/x86/entry/entry_64.S:296 The buggy address belongs to the object at ffff8880383a5140 which belongs to the cache io_kiocb of size 216 The buggy address is located 192 bytes inside of 216-byte region [ffff8880383a5140, ffff8880383a5218) The buggy address belongs to the page: page:00000000f017725b refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x383a5 flags: 0x100000000000200(slab) raw: 0100000000000200 ffffea00011ffe80 0000000400000004 ffff88800c2bd3c0 raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880383a5100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff8880383a5180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880383a5200: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880383a5280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880383a5300: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ================================================================== EXT4-fs (loop0): VFS: Can't find ext4 filesystem