loop0: detected capacity change from 0 to 264192 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+0x50d/0xc30 fs/udf/namei.c:93 Write of size 18446744073709551572 at addr ffff8880725da82c by task syz-executor304/3654 CPU: 0 PID: 3654 Comm: syz-executor304 Not tainted 6.0.0-rc7-syzkaller-00029-g3800a713b607 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x1f0 mm/kasan/report.c:433 kasan_report+0xc3/0xf0 mm/kasan/report.c:495 kasan_check_range+0x2a7/0x2e0 mm/kasan/generic.c:189 memset+0x1f/0x40 mm/kasan/shadow.c:44 udf_write_fi+0x50d/0xc30 fs/udf/namei.c:93 udf_delete_entry fs/udf/namei.c:577 [inline] udf_rename+0x90c/0x15f0 fs/udf/namei.c:1173 vfs_rename+0xd53/0x1130 fs/namei.c:4756 do_renameat2+0xb53/0x1370 fs/namei.c:4907 __do_sys_rename fs/namei.c:4953 [inline] __se_sys_rename fs/namei.c:4951 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:4951 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f4fd42a5929 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:00007ffd2f159668 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f4fd42a5929 RDX: 0000000000000690 RSI: 0000000020000640 RDI: 00000000200000c0 RBP: 00007ffd2f159690 R08: 0000000000000002 R09: 00007ffd2f1596a0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 00007ffd2f1596d0 R14: 00007ffd2f1596b0 R15: 0000000000000026 The buggy address belongs to the physical page: page:ffffea0001c97680 refcount:3 mapcount:0 mapping:ffff888140c128f8 index:0xb3 pfn:0x725da memcg:ffff888140140000 aops:def_blk_aops ino:700000 flags: 0xfff0000000202a(referenced|dirty|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000202a 0000000000000000 dead000000000122 ffff888140c128f8 raw: 00000000000000b3 ffff88807219fe80 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 3654, tgid 3654 (syz-executor304), ts 52435628231, free_ts 52212925410 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 folio_alloc+0x1a/0x50 mm/mempolicy.c:2280 filemap_alloc_folio+0x7e/0x1c0 mm/filemap.c:970 __filemap_get_folio+0x888/0x1250 mm/filemap.c:1970 pagecache_get_page+0x2a/0x240 mm/folio-compat.c:104 find_or_create_page include/linux/pagemap.h:613 [inline] grow_dev_page+0xba/0x920 fs/buffer.c:946 grow_buffers fs/buffer.c:1011 [inline] __getblk_slow fs/buffer.c:1038 [inline] __getblk_gfp+0x16c/0x290 fs/buffer.c:1333 udf_expand_dir_adinicb+0x492/0x14d0 fs/udf/inode.c:365 udf_add_entry+0x138d/0x3300 fs/udf/namei.c:444 udf_rename+0x670/0x15f0 fs/udf/namei.c:1150 vfs_rename+0xd53/0x1130 fs/namei.c:4756 do_renameat2+0xb53/0x1370 fs/namei.c:4907 __do_sys_rename fs/namei.c:4953 [inline] __se_sys_rename fs/namei.c:4951 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:4951 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x812/0x900 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page_list+0xb4/0x7b0 mm/page_alloc.c:3522 release_pages+0x22c3/0x2540 mm/swap.c:1012 tlb_batch_pages_flush mm/mmu_gather.c:58 [inline] tlb_flush_mmu_free mm/mmu_gather.c:255 [inline] tlb_flush_mmu+0x850/0xa70 mm/mmu_gather.c:262 tlb_finish_mmu+0xcb/0x200 mm/mmu_gather.c:353 unmap_region+0x2ab/0x300 mm/mmap.c:2625 __do_munmap+0x17ef/0x1cd0 mm/mmap.c:2836 __do_sys_brk+0x452/0x6d0 mm/mmap.c:214 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8880725da700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880725da780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880725da800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880725da880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880725da900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================