R10: 0000000000000000 R11: 0000000000000246 R12: 00007f19e805c064 R13: 00007f19e7fbe210 R14: 0000000000000001 R15: 0030656c69662f2e ================================================================== BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x47f/0x590 lib/iov_iter.c:648 Read of size 8 at addr ffffc900034c7c98 by task syz-executor107/5861 CPU: 0 UID: 0 PID: 5861 Comm: syz-executor107 Not tainted 6.12.0-syzkaller-10553-gb86545e02e8c #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_write_iter fs/fuse/file.c:1742 [inline] fuse_file_write_iter+0xae2/0xf70 fs/fuse/file.c:1787 do_iter_readv_writev+0x602/0x880 vfs_writev+0x376/0xba0 fs/read_write.c:1050 do_writev+0x1b6/0x360 fs/read_write.c:1096 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f19e800a1b9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 1a 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f19e7fbe208 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007f19e808f3e8 RCX: 00007f19e800a1b9 RDX: 0000000000000002 RSI: 0000000020000180 RDI: 0000000000000004 RBP: 00007f19e808f3e0 R08: 00007f19e7fbdfa7 R09: 0000000000000033 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f19e805c064 R13: 00007f19e7fbe210 R14: 0000000000000001 R15: 0030656c69662f2e The buggy address belongs to stack of task syz-executor107/5861 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 [ffffc900034c0000, ffffc900034c9000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2225 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802d4fc000 pfn:0x2d4fc flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff88802d4fc000 0000000000000000 00000001ffffffff 0000000000000000 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 5860, tgid 5860 (syz-executor107), ts 135285072707, free_ts 135247756551 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3649/0x3790 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3589 [inline] __vmalloc_area_node mm/vmalloc.c:3667 [inline] __vmalloc_node_range_noprof+0x9c9/0x1380 mm/vmalloc.c:3844 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1121 copy_process+0x5d1/0x3d50 kernel/fork.c:2225 kernel_clone+0x226/0x8f0 kernel/fork.c:2807 __do_sys_clone3 kernel/fork.c:3111 [inline] __se_sys_clone3+0x2d8/0x360 kernel/fork.c:3090 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5860 tgid 5860 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0xdf9/0x1140 mm/page_alloc.c:2657 discard_slab mm/slub.c:2673 [inline] __put_partials+0xeb/0x130 mm/slub.c:3142 put_cpu_partial+0x17c/0x250 mm/slub.c:3217 __slab_free+0x2ea/0x3d0 mm/slub.c:4468 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:4104 [inline] slab_alloc_node mm/slub.c:4153 [inline] __kmalloc_cache_noprof+0x1d9/0x390 mm/slub.c:4309 kmalloc_noprof include/linux/slab.h:901 [inline] tomoyo_print_header security/tomoyo/audit.c:156 [inline] tomoyo_init_log+0x1ca/0x2050 security/tomoyo/audit.c:255 tomoyo_supervisor+0x38a/0x11f0 security/tomoyo/common.c:2089 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x178/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0x146e/0x1d40 security/tomoyo/domain.c:881 tomoyo_bprm_check_security+0x117/0x180 security/tomoyo/tomoyo.c:102 security_bprm_check+0x86/0x250 security/security.c:1296 search_binary_handler fs/exec.c:1736 [inline] exec_binprm fs/exec.c:1790 [inline] bprm_execve+0xa56/0x17c0 fs/exec.c:1842 do_execveat_common+0x55f/0x6f0 fs/exec.c:1949 Memory state around the buggy address: ffffc900034c7b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900034c7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900034c7c80: f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffffc900034c7d00: 00 00 00 00 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 ffffc900034c7d80: 00 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ==================================================================