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+0x98b/0xff0 fs/udf/namei.c:93 Write of size 18446744073709551572 at addr ffff88807bd0f82c by task syz-executor426/3624 CPU: 0 PID: 3624 Comm: syz-executor426 Not tainted 6.0.0-rc7-syzkaller-00081-gc3e0e1e23c70 #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+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 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+0x98b/0xff0 fs/udf/namei.c:93 udf_rename+0xd9f/0x1250 fs/udf/namei.c:1173 vfs_rename+0x115e/0x1a90 fs/namei.c:4756 do_renameat2+0xb5e/0xc80 fs/namei.c:4907 __do_sys_rename fs/namei.c:4953 [inline] __se_sys_rename fs/namei.c:4951 [inline] __x64_sys_rename+0x7d/0xa0 fs/namei.c:4951 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:0x7f3c55a60839 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:00007fff927d14d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f3c55a60839 RDX: 0000000000000500 RSI: 0000000020000640 RDI: 00000000200000c0 RBP: 00007fff927d1500 R08: 0000000000000002 R09: 00007fff927d1510 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 00007fff927d1540 R14: 00007fff927d1520 R15: 000000000000000b The buggy address belongs to the physical page: page:ffffea0001ef43c0 refcount:3 mapcount:0 mapping:ffff888140c107f8 index:0xb3 pfn:0x7bd0f memcg:ffff88813fe28000 aops:def_blk_aops ino:700000 flags: 0xfff0000000202a(referenced|dirty|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000202a 0000000000000000 dead000000000122 ffff888140c107f8 raw: 00000000000000b3 ffff888074384d98 00000003ffffffff ffff88813fe28000 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 3624, tgid 3624 (syz-executor426), ts 45831668059, free_ts 45831262588 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 folio_alloc+0x1c/0x70 mm/mempolicy.c:2280 filemap_alloc_folio+0x306/0x3a0 mm/filemap.c:970 __filemap_get_folio+0x328/0xed0 mm/filemap.c:1970 pagecache_get_page+0x2e/0x290 mm/folio-compat.c:104 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+0x1ed/0x1030 fs/buffer.c:1038 __getblk_gfp+0x6e/0x80 fs/buffer.c:1333 sb_getblk include/linux/buffer_head.h:363 [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:4756 do_renameat2+0xb5e/0xc80 fs/namei.c:4907 __do_sys_rename fs/namei.c:4953 [inline] __se_sys_rename fs/namei.c:4951 [inline] __x64_sys_rename+0x7d/0xa0 fs/namei.c:4951 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+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page_list+0x16f/0xb90 mm/page_alloc.c:3522 release_pages+0xbd3/0x1400 mm/swap.c:1012 __pagevec_release+0x77/0x100 mm/swap.c:1032 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] shmem_undo_range+0x88f/0x1500 mm/shmem.c:956 shmem_truncate_range mm/shmem.c:1044 [inline] shmem_evict_inode+0x3c6/0xc20 mm/shmem.c:1142 evict+0x2ed/0x6b0 fs/inode.c:665 iput_final fs/inode.c:1748 [inline] iput.part.0+0x55d/0x810 fs/inode.c:1774 iput+0x58/0x70 fs/inode.c:1764 dentry_unlink_inode+0x2b1/0x460 fs/dcache.c:401 __dentry_kill+0x3c0/0x640 fs/dcache.c:607 dentry_kill fs/dcache.c:745 [inline] dput+0x64d/0xdb0 fs/dcache.c:913 do_renameat2+0xb6e/0xc80 fs/namei.c:4909 __do_sys_rename fs/namei.c:4953 [inline] __se_sys_rename fs/namei.c:4951 [inline] __x64_sys_rename+0x7d/0xa0 fs/namei.c:4951 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: ffff88807bd0f700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807bd0f780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807bd0f800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88807bd0f880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807bd0f900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================