RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000003 RBP: 00007f066daff120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 000000000000000b R14: 000000000055bf60 R15: 00007fff058439c8 ================================================================== BUG: KASAN: use-after-free in io_queue_sqe fs/io_uring.c:2507 [inline] BUG: KASAN: use-after-free in io_queue_link_head+0x323/0x3d0 fs/io_uring.c:2522 Read of size 8 at addr ffff8881f05b3b50 by task syz-executor.0/420 CPU: 1 PID: 420 Comm: syz-executor.0 Not tainted 5.4.281-syzkaller-04937-gd883a2284ec1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 io_queue_sqe fs/io_uring.c:2507 [inline] io_queue_link_head+0x323/0x3d0 fs/io_uring.c:2522 io_ring_submit fs/io_uring.c:2964 [inline] __do_sys_io_uring_enter fs/io_uring.c:3728 [inline] __se_sys_io_uring_enter+0xc35/0x2030 fs/io_uring.c:3689 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x455c69 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 b4 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f066daff0d8 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 000000000055bf60 RCX: 0000000000455c69 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000003 RBP: 00007f066daff120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 000000000000000b R14: 000000000055bf60 R15: 00007fff058439c8 Allocated by task 420: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x171/0x210 mm/kasan/common.c:529 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xd9/0x250 mm/slub.c:2842 io_get_req+0x110/0x580 fs/io_uring.c:643 io_submit_sqe+0x84/0xe90 fs/io_uring.c:2572 io_ring_submit fs/io_uring.c:2960 [inline] __do_sys_io_uring_enter fs/io_uring.c:3728 [inline] __se_sys_io_uring_enter+0x8e8/0x2030 fs/io_uring.c:3689 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 420: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1b5/0x270 mm/kasan/common.c:487 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook mm/slub.c:1494 [inline] slab_free mm/slub.c:3080 [inline] kmem_cache_free+0x10b/0x2c0 mm/slub.c:3096 io_queue_sqe fs/io_uring.c:2506 [inline] io_queue_link_head+0x30d/0x3d0 fs/io_uring.c:2522 io_ring_submit fs/io_uring.c:2964 [inline] __do_sys_io_uring_enter fs/io_uring.c:3728 [inline] __se_sys_io_uring_enter+0xc35/0x2030 fs/io_uring.c:3689 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 The buggy address belongs to the object at ffff8881f05b3b00 which belongs to the cache io_kiocb of size 264 The buggy address is located 80 bytes inside of 264-byte region [ffff8881f05b3b00, ffff8881f05b3c08) The buggy address belongs to the page: page:ffffea0007c16c80 refcount:1 mapcount:0 mapping:ffff8881f0ee6a00 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f0ee6a00 raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x18f/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893 alloc_slab_page+0x39/0x3c0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x97/0x440 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x2fe/0x490 mm/slub.c:2667 __slab_alloc+0x62/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0x109/0x250 mm/slub.c:2842 io_get_req+0x110/0x580 fs/io_uring.c:643 io_submit_sqe+0x84/0xe90 fs/io_uring.c:2572 io_ring_submit fs/io_uring.c:2960 [inline] __do_sys_io_uring_enter fs/io_uring.c:3728 [inline] __se_sys_io_uring_enter+0x8e8/0x2030 fs/io_uring.c:3689 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] __free_pages_ok+0x847/0x950 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4955 [inline] __free_pages+0x91/0x140 mm/page_alloc.c:4961 __free_slab+0x221/0x2e0 mm/slub.c:1774 free_slab mm/slub.c:1789 [inline] discard_slab mm/slub.c:1795 [inline] unfreeze_partials+0x14e/0x180 mm/slub.c:2288 put_cpu_partial+0x44/0x180 mm/slub.c:2324 __slab_free+0x297/0x360 mm/slub.c:2971 qlist_free_all+0x43/0xb0 mm/kasan/quarantine.c:167 quarantine_reduce+0x1d9/0x210 mm/kasan/quarantine.c:260 __kasan_kmalloc+0x41/0x210 mm/kasan/common.c:507 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc_trace+0xdc/0x260 mm/slub.c:2854 kmalloc include/linux/slab.h:556 [inline] syslog_print+0x56/0x3e0 kernel/printk/printk.c:1386 do_syslog+0x8f1/0x930 kernel/printk/printk.c:1559 __do_sys_syslog kernel/printk/printk.c:1650 [inline] __se_sys_syslog kernel/printk/printk.c:1648 [inline] __x64_sys_syslog+0x78/0x90 kernel/printk/printk.c:1648 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881f05b3a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881f05b3a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881f05b3b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881f05b3b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881f05b3c00: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================