RSP: 002b:00007f7f43f74188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000000 RSI: 0000000000000302 RDI: 0000000000000003 RBP: 00007f7f43f741d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffd336c51af R14: 00007f7f43f74300 R15: 0000000000022000 ================================================================== BUG: KASAN: use-after-free in io_queue_link_head+0x4ce/0x5c0 fs/io_uring.c:2542 Read of size 8 at addr ffff8881f11b47d0 by task syz-executor.3/4763 CPU: 1 PID: 4763 Comm: syz-executor.3 Not tainted 5.4.108-syzkaller-00855-g708026dc169c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x24e lib/dump_stack.c:118 print_address_description+0x9b/0x650 mm/kasan/report.c:384 __kasan_report+0x182/0x260 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:641 io_queue_link_head+0x4ce/0x5c0 fs/io_uring.c:2542 io_ring_submit fs/io_uring.c:2945 [inline] __do_sys_io_uring_enter fs/io_uring.c:3853 [inline] __se_sys_io_uring_enter+0x702/0x1e50 fs/io_uring.c:3814 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x466459 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:00007f7f43f74188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000000 RSI: 0000000000000302 RDI: 0000000000000003 RBP: 00007f7f43f741d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffd336c51af R14: 00007f7f43f74300 R15: 0000000000022000 Allocated by task 4763: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x137/0x1e0 mm/kasan/common.c:517 slab_post_alloc_hook mm/slab.h:584 [inline] kmem_cache_alloc_bulk+0x18e/0x290 mm/slub.c:3283 io_get_req+0x17a/0x590 fs/io_uring.c:652 io_submit_sqe+0x83/0xe80 fs/io_uring.c:2579 io_ring_submit fs/io_uring.c:2967 [inline] __do_sys_io_uring_enter fs/io_uring.c:3853 [inline] __se_sys_io_uring_enter+0x8b6/0x1e50 fs/io_uring.c:3814 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4763: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:333 [inline] __kasan_slab_free+0x18a/0x240 mm/kasan/common.c:475 slab_free_hook mm/slub.c:1454 [inline] slab_free_freelist_hook+0x7b/0x150 mm/slub.c:1492 slab_free mm/slub.c:3072 [inline] kmem_cache_free+0xb8/0x5f0 mm/slub.c:3088 io_queue_link_head+0x2c5/0x5c0 fs/io_uring.c:2540 io_ring_submit fs/io_uring.c:2945 [inline] __do_sys_io_uring_enter fs/io_uring.c:3853 [inline] __se_sys_io_uring_enter+0x702/0x1e50 fs/io_uring.c:3814 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8881f11b4780 which belongs to the cache io_kiocb of size 264 The buggy address is located 80 bytes inside of 264-byte region [ffff8881f11b4780, ffff8881f11b4888) The buggy address belongs to the page: page:ffffea0007c46d00 refcount:1 mapcount:0 mapping:ffff8881f437d680 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f437d680 raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881f11b4680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881f11b4700: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881f11b4780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881f11b4800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881f11b4880: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================