process 'syz.0.0' launched './file1' with NULL argv: empty string added ================================================================== BUG: KASAN: stack-out-of-bounds in exfat_map_cluster fs/exfat/inode.c:234 [inline] BUG: KASAN: stack-out-of-bounds in exfat_get_block+0x1d43/0x2180 fs/exfat/inode.c:284 Write of size 4 at addr ffffc9000323f420 by task syz.0.0/5107 CPU: 0 UID: 0 PID: 5107 Comm: syz.0.0 Not tainted 6.11.0-syzkaller-11624-ge477dba5442c #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 exfat_map_cluster fs/exfat/inode.c:234 [inline] exfat_get_block+0x1d43/0x2180 fs/exfat/inode.c:284 get_more_blocks fs/direct-io.c:648 [inline] do_direct_IO fs/direct-io.c:936 [inline] __blockdev_direct_IO+0x1c8e/0x4890 fs/direct-io.c:1243 blockdev_direct_IO include/linux/fs.h:3275 [inline] exfat_direct_IO+0x151/0x400 fs/exfat/inode.c:482 generic_file_direct_write+0x17a/0x390 mm/filemap.c:3973 __generic_file_write_iter+0x126/0x230 mm/filemap.c:4137 exfat_file_write_iter+0x165/0x3f0 fs/exfat/file.c:598 do_iter_readv_writev+0x600/0x880 vfs_writev+0x376/0xba0 fs/read_write.c:1064 do_pwritev fs/read_write.c:1165 [inline] __do_sys_pwritev2 fs/read_write.c:1224 [inline] __se_sys_pwritev2+0x1ca/0x2d0 fs/read_write.c:1215 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:0x7f84f1f7df39 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f84f2ca8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f84f2136130 RCX: 00007f84f1f7df39 RDX: 0000000000000001 RSI: 00000000200001c0 RDI: 000000000000000a RBP: 00007f84f1ff0216 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f84f2136130 R15: 00007ffc49ed72c8 The buggy address belongs to stack of task syz.0.0/5107 and is located at offset 96 in frame: exfat_get_block+0x0/0x2180 fs/exfat/inode.c:530 This frame has 4 objects: [32, 36) 'last_clu.i' [48, 60) 'new_clu.i' [80, 84) 'fclus.i' [96, 100) 'cluster' The buggy address belongs to the virtual mapping at [ffffc90003238000, ffffc90003241000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2206 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880356c2600 pfn:0x356c2 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff8880356c2600 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 5104, tgid 5104 (syz.0.0), ts 72252502627, free_ts 70233627786 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x3045/0x3190 mm/page_alloc.c:3457 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3568 [inline] __vmalloc_area_node mm/vmalloc.c:3646 [inline] __vmalloc_node_range_noprof+0xa2b/0x13f0 mm/vmalloc.c:3828 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1115 copy_process+0x5d1/0x3d50 kernel/fork.c:2206 kernel_clone+0x226/0x8f0 kernel/fork.c:2787 __do_sys_clone3 kernel/fork.c:3091 [inline] __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3070 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 5090 tgid 5090 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0xcfb/0xf20 mm/page_alloc.c:2638 __slab_free+0x31b/0x3d0 mm/slub.c:4491 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:247 [inline] slab_post_alloc_hook mm/slub.c:4086 [inline] slab_alloc_node mm/slub.c:4135 [inline] __kmalloc_cache_noprof+0x132/0x2c0 mm/slub.c:4291 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] ipv6_add_addr+0x580/0x1090 net/ipv6/addrconf.c:1114 addrconf_add_linklocal+0x36c/0xa30 net/ipv6/addrconf.c:3317 addrconf_addr_gen+0x510/0xbb0 addrconf_dev_config net/ipv6/addrconf.c:3494 [inline] addrconf_init_auto_addrs+0x96a/0xeb0 net/ipv6/addrconf.c:3572 addrconf_notify+0xaff/0x1020 net/ipv6/addrconf.c:3745 notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93 __dev_notify_flags+0x207/0x400 dev_change_flags+0xf0/0x1a0 net/core/dev.c:8914 do_setlink+0xcd0/0x41f0 net/core/rtnetlink.c:2900 __rtnl_newlink net/core/rtnetlink.c:3696 [inline] rtnl_newlink+0x180d/0x20a0 net/core/rtnetlink.c:3743 Memory state around the buggy address: ffffc9000323f300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000323f380: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 00 04 >ffffc9000323f400: f2 f2 04 f2 04 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc9000323f480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000323f500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================