================================================================== 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 ffff88800baf1ad0 by task syz-executor.2/5938 CPU: 0 PID: 5938 Comm: syz-executor.2 Not tainted 5.10.147 #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:1497 [inline] io_queue_async_work+0x185/0x3d0 fs/io_uring.c:1507 __io_queue_sqe+0x909/0xd00 fs/io_uring.c:6357 io_queue_sqe+0x5bc/0x1020 fs/io_uring.c:6411 io_submit_sqe fs/io_uring.c:6480 [inline] io_submit_sqes+0x1311/0x2310 fs/io_uring.c:6708 __do_sys_io_uring_enter+0x108a/0x1910 fs/io_uring.c:9109 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f4ae56a4b19 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:00007f4ae2c1a188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 00007f4ae57b7f60 RCX: 00007f4ae56a4b19 RDX: 0000000000000000 RSI: 00000000000076d3 RDI: 0000000000000003 RBP: 00007f4ae56fef6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff206acd3f R14: 00007f4ae2c1a300 R15: 0000000000022000 Allocated by task 5938: 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:1874 [inline] io_submit_sqes+0x11c6/0x2310 fs/io_uring.c:6688 __do_sys_io_uring_enter+0x108a/0x1910 fs/io_uring.c:9109 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Freed by task 5941: 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:1929 io_free_req fs/io_uring.c:2154 [inline] io_double_put_req fs/io_uring.c:2294 [inline] io_put_req+0xab/0x100 fs/io_uring.c:2290 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 ffff88800baf1a00 which belongs to the cache io_kiocb of size 232 The buggy address is located 208 bytes inside of 232-byte region [ffff88800baf1a00, ffff88800baf1ae8) The buggy address belongs to the page: page:00000000f7030704 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xbaf1 flags: 0x100000000000200(slab) raw: 0100000000000200 dead000000000100 dead000000000122 ffff88800c1b2780 raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88800baf1980: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff88800baf1a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88800baf1a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ^ ffff88800baf1b00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff88800baf1b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== autofs4:pid:5955:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(1.37), cmd(0xc018937e) autofs4:pid:5955:validate_dev_ioctl: invalid device control module version supplied for cmd(0xc018937e) EXT4-fs (loop4): Unrecognized mount option "PåJZu‚/" or missing value EXT4-fs (loop4): Unrecognized mount option "PåJZu‚/" or missing value tmpfs: Unknown parameter 'appraise_type' tmpfs: Unknown parameter 'appraise_type' autofs4:pid:5984:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(1.37), cmd(0xc018937e) autofs4:pid:5984:validate_dev_ioctl: invalid device control module version supplied for cmd(0xc018937e) EXT4-fs (loop6): VFS: Can't find ext4 filesystem tmpfs: Unknown parameter 'appraise_type' EXT4-fs (loop4): Unrecognized mount option "PåJZu‚/" or missing value