================================================================== BUG: KASAN: out-of-bounds in udf_write_fi+0x910/0xf60 fs/udf/namei.c:93 Write of size 18446744073709551572 at addr ffff888028f0982c by task syz-executor.5/3265 CPU: 1 PID: 3265 Comm: syz-executor.5 Not tainted 6.1.0-rc2-syzkaller-00070-g4dc12f37a8e9 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbb/0x1f0 mm/kasan/report.c:495 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memset+0x20/0x40 mm/kasan/shadow.c:44 udf_write_fi+0x910/0xf60 fs/udf/namei.c:93 udf_rename+0xd9f/0x1250 fs/udf/namei.c:1173 vfs_rename+0x115e/0x1a90 fs/namei.c:4778 do_renameat2+0xb5e/0xc80 fs/namei.c:4929 __do_sys_rename fs/namei.c:4975 [inline] __se_sys_rename fs/namei.c:4973 [inline] __x64_sys_rename+0x7d/0xa0 fs/namei.c:4973 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f3ab6a8b5a9 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3ab77f8168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f3ab6babf80 RCX: 00007f3ab6a8b5a9 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000020000100 RBP: 00007f3ab77f81d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffca6655faf R14: 00007f3ab77f8300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0000a3c240 refcount:3 mapcount:0 mapping:ffff888011c6a8f8 index:0xb3 pfn:0x28f09 memcg:ffff88807e7cc000 aops:def_blk_aops ino:700005 flags: 0xfff0000000202a(referenced|dirty|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000202a 0000000000000000 dead000000000122 ffff888011c6a8f8 raw: 00000000000000b3 ffff88808ba2bae0 00000003ffffffff ffff88807e7cc000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x148c48(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 3265, tgid 3258 (syz-executor.5), ts 1656436966964, free_ts 1656422145289 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4287 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5554 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2285 folio_alloc+0x1c/0x70 mm/mempolicy.c:2295 filemap_alloc_folio+0x306/0x3a0 mm/filemap.c:971 __filemap_get_folio+0x328/0xd90 mm/filemap.c:1965 pagecache_get_page+0x2e/0x280 mm/folio-compat.c:110 find_or_create_page include/linux/pagemap.h:613 [inline] grow_dev_page fs/buffer.c:946 [inline] grow_buffers fs/buffer.c:1011 [inline] __getblk_slow+0x1f4/0x1030 fs/buffer.c:1038 __getblk_gfp+0x6e/0x80 fs/buffer.c:1333 sb_getblk include/linux/buffer_head.h:356 [inline] udf_tgetblk+0xf9/0x1d0 fs/udf/misc.c:36 udf_expand_dir_adinicb+0x395/0xf20 fs/udf/inode.c:365 udf_add_entry+0x1ea8/0x2ac0 fs/udf/namei.c:444 udf_rename+0x1210/0x1250 fs/udf/namei.c:1150 vfs_rename+0x115e/0x1a90 fs/namei.c:4778 do_renameat2+0xb5e/0xc80 fs/namei.c:4929 __do_sys_rename fs/namei.c:4975 [inline] __se_sys_rename fs/namei.c:4973 [inline] __x64_sys_rename+0x7d/0xa0 fs/namei.c:4973 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1458 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1508 free_unref_page_prepare mm/page_alloc.c:3386 [inline] free_unref_page_list+0x172/0xc40 mm/page_alloc.c:3528 release_pages+0xc86/0x1360 mm/swap.c:1055 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:59 tlb_flush_mmu_free mm/mmu_gather.c:256 [inline] tlb_flush_mmu mm/mmu_gather.c:263 [inline] tlb_finish_mmu+0x147/0x7e0 mm/mmu_gather.c:363 exit_mmap+0x1fe/0x7a0 mm/mmap.c:3098 __mmput+0x128/0x4c0 kernel/fork.c:1185 mmput+0x5c/0x70 kernel/fork.c:1207 exit_mm kernel/exit.c:516 [inline] do_exit+0xa39/0x2a20 kernel/exit.c:807 do_group_exit+0xd0/0x2a0 kernel/exit.c:950 get_signal+0x21a1/0x2430 kernel/signal.c:2858 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:296 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888028f09700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888028f09780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888028f09800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888028f09880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888028f09900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================