loop0: detected capacity change from 0 to 2047 UDF-fs: error (device loop0): udf_process_sequence: Primary Volume Descriptor not found! UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/09/12 12:00 (1000) ================================================================== BUG: KASAN: out-of-bounds in udf_write_fi+0x910/0xf60 fs/udf/namei.c:93 Write of size 18446744073709551572 at addr ffff888071a7482c by task syz-executor300/3649 CPU: 0 PID: 3649 Comm: syz-executor300 Not tainted 6.1.0-rc1-next-20221021-syzkaller #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:253 [inline] print_report+0x15e/0x45d mm/kasan/report.c:364 kasan_report+0xbb/0x1f0 mm/kasan/report.c:464 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:0x7fe7f00da839 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc44c5be18 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fe7f00da839 RDX: 0000000000000e40 RSI: 0000000020000640 RDI: 00000000200000c0 RBP: 00007ffc44c5be40 R08: 0000000000000002 R09: 00007ffc44c5be50 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 00007ffc44c5be80 R14: 00007ffc44c5be60 R15: 000000000000002d The buggy address belongs to the physical page: page:ffffea0001c69d00 refcount:3 mapcount:0 mapping:ffff88801b7df5f8 index:0xb3 pfn:0x71a74 memcg:ffff888140140000 aops:def_blk_aops ino:700000 flags: 0xfff0000000202a(referenced|dirty|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000202a 0000000000000000 dead000000000122 ffff88801b7df5f8 raw: 00000000000000b3 ffff888072107e80 00000003ffffffff ffff888140140000 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 3649, tgid 3649 (syz-executor300), ts 41243953119, free_ts 31723465852 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:5546 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+0x2a/0x280 mm/folio-compat.c:110 find_or_create_page include/linux/pagemap.h:612 [inline] grow_dev_page fs/buffer.c:946 [inline] grow_buffers fs/buffer.c:1011 [inline] __getblk_slow+0x1f4/0xfb0 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+0x35b/0x12d0 mm/swap.c:1065 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 unmap_region+0x26a/0x300 mm/mmap.c:2191 do_mas_align_munmap+0x851/0xee0 mm/mmap.c:2444 do_mas_munmap+0x26a/0x2b0 mm/mmap.c:2502 __vm_munmap+0x14f/0x290 mm/mmap.c:2775 __do_sys_munmap mm/mmap.c:2800 [inline] __se_sys_munmap mm/mmap.c:2797 [inline] __x64_sys_munmap+0x55/0x80 mm/mmap.c:2797 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 Memory state around the buggy address: ffff888071a74700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071a74780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888071a74800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888071a74880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071a74900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================