RSP: 002b:00000000f510f55c EFLAGS: 00000206 ORIG_RAX: 000000000000014e RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00000000200003c0 RDX: 0000000000000002 RSI: 0000000000000001 RDI: 0000000000000008 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ================================================================== BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x47f/0x590 lib/iov_iter.c:648 Read of size 8 at addr ffffc900034e7c98 by task syz.7.263/7283 CPU: 0 UID: 0 PID: 7283 Comm: syz.7.263 Not tainted 6.13.0-rc5-syzkaller-00004-gccb98ccef0e5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 iov_iter_revert+0x47f/0x590 lib/iov_iter.c:648 fuse_direct_io+0x30b3/0x31f0 fs/fuse/file.c:1667 fuse_direct_IO+0x941/0x1390 fs/fuse/file.c:3121 generic_file_direct_write+0x1e6/0x400 mm/filemap.c:3978 fuse_cache_write_iter fs/fuse/file.c:1474 [inline] fuse_file_write_iter+0x715/0xf70 fs/fuse/file.c:1791 do_iter_readv_writev+0x600/0x880 vfs_writev+0x376/0xba0 fs/read_write.c:1050 do_pwritev fs/read_write.c:1146 [inline] __do_compat_sys_pwritev fs/read_write.c:1269 [inline] __se_compat_sys_pwritev+0x164/0x280 fs/read_write.c:1263 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0xb4/0x110 arch/x86/entry/common.c:386 do_fast_syscall_32+0x34/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf711d579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f510f55c EFLAGS: 00000206 ORIG_RAX: 000000000000014e RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00000000200003c0 RDX: 0000000000000002 RSI: 0000000000000001 RDI: 0000000000000008 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to stack of task syz.7.263/7283 and is located at offset 24 in frame: vfs_writev+0x0/0xba0 This frame has 3 objects: [32, 160) 'iovstack' [192, 200) 'iov' [224, 264) 'iter' The buggy address belongs to the virtual mapping at [ffffc900034e0000, ffffc900034e9000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2224 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x8 pfn:0x4fd89 memcg:ffff88803454bb02 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000008 0000000000000000 00000001ffffffff ffff88803454bb02 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 7277, tgid 7277 (syz.7.262), ts 122845492350, free_ts 122359594886 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3476 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2269 vm_area_alloc_pages mm/vmalloc.c:3591 [inline] __vmalloc_area_node mm/vmalloc.c:3669 [inline] __vmalloc_node_range_noprof+0x9c9/0x1380 mm/vmalloc.c:3846 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1116 copy_process+0x5d1/0x3d50 kernel/fork.c:2224 kernel_clone+0x226/0x8e0 kernel/fork.c:2806 __do_sys_clone3 kernel/fork.c:3110 [inline] __se_sys_clone3+0x2d8/0x360 kernel/fork.c:3089 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] do_int80_emulation+0x11f/0x200 arch/x86/entry/common.c:253 asm_int80_emulation+0x1a/0x20 arch/x86/include/asm/idtentry.h:626 page last free pid 7263 tgid 7262 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0xd3f/0x1010 mm/page_alloc.c:2659 discard_slab mm/slub.c:2688 [inline] __put_partials+0x160/0x1c0 mm/slub.c:3157 put_cpu_partial+0x17c/0x250 mm/slub.c:3232 __slab_free+0x290/0x380 mm/slub.c:4483 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4119 [inline] slab_alloc_node mm/slub.c:4168 [inline] kmem_cache_alloc_noprof+0x1d9/0x380 mm/slub.c:4175 getname_flags+0xb7/0x540 fs/namei.c:139 do_sys_openat2+0xd2/0x1d0 fs/open.c:1396 do_sys_open fs/open.c:1417 [inline] __do_compat_sys_openat fs/open.c:1479 [inline] __se_compat_sys_openat fs/open.c:1477 [inline] __ia32_compat_sys_openat+0x23f/0x290 fs/open.c:1477 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0xb4/0x110 arch/x86/entry/common.c:386 do_fast_syscall_32+0x34/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Memory state around the buggy address: ffffc900034e7b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900034e7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900034e7c80: f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffffc900034e7d00: 00 00 00 00 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 ffffc900034e7d80: 00 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 90 nop 33: 90 nop 34: 90 nop 35: 90 nop 36: 90 nop 37: 90 nop 38: 90 nop 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop