================================================================== 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 ffff8880469b8710 by task syz-executor.3/6800 CPU: 1 PID: 6800 Comm: syz-executor.3 Not tainted 5.10.159 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x167 lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x220 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:1498 [inline] io_queue_async_work+0x185/0x3d0 fs/io_uring.c:1508 __io_queue_sqe+0x909/0xd00 fs/io_uring.c:6358 io_queue_sqe+0x5bc/0x1020 fs/io_uring.c:6412 io_submit_sqe fs/io_uring.c:6481 [inline] io_submit_sqes+0x1311/0x2310 fs/io_uring.c:6709 __do_sys_io_uring_enter+0x108a/0x1920 fs/io_uring.c:9152 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f6cb4751b19 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:00007f6cb1cc7188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 00007f6cb4864f60 RCX: 00007f6cb4751b19 RDX: 0000000000000000 RSI: 00000000000076d3 RDI: 0000000000000003 RBP: 00007f6cb47abf6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff0468b9af R14: 00007f6cb1cc7300 R15: 0000000000022000 Allocated by task 6800: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc9/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:1875 [inline] io_submit_sqes+0x11c6/0x2310 fs/io_uring.c:6689 __do_sys_io_uring_enter+0x108a/0x1920 fs/io_uring.c:9152 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Freed by task 6803: 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/0x160 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:1930 io_free_req fs/io_uring.c:2155 [inline] io_double_put_req fs/io_uring.c:2295 [inline] io_put_req+0xab/0x100 fs/io_uring.c:2291 io_worker_handle_work+0xea8/0x1a30 fs/io-wq.c:581 io_wqe_worker+0xbd6/0x1010 fs/io-wq.c:615 kthread+0x38f/0x470 kernel/kthread.c:313 ret_from_fork+0x22/0x30 arch/x86/entry/entry_64.S:299 The buggy address belongs to the object at ffff8880469b8640 which belongs to the cache io_kiocb of size 232 The buggy address is located 208 bytes inside of 232-byte region [ffff8880469b8640, ffff8880469b8728) The buggy address belongs to the page: page:0000000059e07a0b refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x469b8 flags: 0x100000000000200(slab) raw: 0100000000000200 dead000000000100 dead000000000122 ffff88800ba79dc0 raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880469b8600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff8880469b8680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880469b8700: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880469b8780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880469b8800: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ==================================================================