loop3: detected capacity change from 0 to 2048 ================================================================== BUG: KASAN: out-of-bounds in udf_write_fi+0x563/0xb60 Write of size 18446744073709551574 at addr ffff88804060302a by task syz-executor.3/27468 CPU: 1 PID: 27468 Comm: syz-executor.3 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x220 mm/kasan/report.c:433 kasan_report+0xfb/0x130 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+0x563/0xb60 udf_delete_entry fs/udf/namei.c:577 [inline] udf_rename+0x9b6/0x1500 fs/udf/namei.c:1173 vfs_rename+0xd67/0x1150 fs/namei.c:4756 do_renameat2+0xba9/0x1400 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+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f770368b5a9 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:00007f7704821168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f77037abf80 RCX: 00007f770368b5a9 RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000020000140 RBP: 00007f77048211d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffcdb949def R14: 00007f7704821300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea00010180c0 refcount:2 mapcount:0 mapping:ffff888140c91df8 index:0xa8 pfn:0x40603 memcg:ffff88807db30000 aops:def_blk_aops ino:700003 flags: 0xfff0000000203a(referenced|dirty|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000203a ffffea000108ce88 ffff88807abc4030 ffff888140c91df8 raw: 00000000000000a8 ffff88808d1c99f8 00000002ffffffff ffff88807db30000 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 27468, tgid 27467 (syz-executor.3), ts 993216097317, free_ts 993085969640 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x72b/0x7a0 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+0x86b/0x1230 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 __bread_gfp+0x28/0x320 fs/buffer.c:1378 udf_find_entry+0x120d/0x1540 fs/udf/namei.c:206 udf_lookup+0x11b/0x3a0 fs/udf/namei.c:309 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10f8/0x2e00 fs/namei.c:3688 do_filp_open+0x275/0x500 fs/namei.c:3718 do_sys_openat2+0x13b/0x500 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_creat fs/open.c:1402 [inline] __se_sys_creat fs/open.c:1396 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1396 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 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 exit_mmap+0x1dc/0x530 mm/mmap.c:3118 __mmput+0x111/0x3a0 kernel/fork.c:1187 exit_mm+0x211/0x2f0 kernel/exit.c:510 do_exit+0x635/0x2280 kernel/exit.c:800 do_group_exit+0x1fd/0x2b0 kernel/exit.c:943 __do_sys_exit_group kernel/exit.c:954 [inline] __se_sys_exit_group kernel/exit.c:952 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:952 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888040602f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888040602f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888040603000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888040603080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888040603100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================