loop5: detected capacity change from 0 to 2048 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 ffff888031ee702c by task syz-executor.5/723 CPU: 1 PID: 723 Comm: syz-executor.5 Not tainted 6.0.0-rc6-next-20220923-syzkaller #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: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: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:0x7f6652a8b5a9 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:00007f6653b60168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f6652babf80 RCX: 00007f6652a8b5a9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000020000140 RBP: 00007f6653b601d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffff6c6f06f R14: 00007f6653b60300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0000c7b9c0 refcount:2 mapcount:0 mapping:ffff888144cc07f8 index:0xb0 pfn:0x31ee7 memcg:ffff88801fdac000 aops:def_blk_aops ino:700005 flags: 0xfff0000000203a(referenced|dirty|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000203a ffffea0000bfcb88 ffff8880748ee030 ffff888144cc07f8 raw: 00000000000000b0 ffff888091c7ed98 00000002ffffffff ffff88801fdac000 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 723, tgid 720 (syz-executor.5), ts 2253137993319, free_ts 2250028957492 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x1092/0x2d20 mm/page_alloc.c:4287 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5546 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2280 folio_alloc+0x1c/0x70 mm/mempolicy.c:2290 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 fs/buffer.c:1333 [inline] __bread_gfp+0x228/0x320 fs/buffer.c:1367 sb_bread include/linux/buffer_head.h:338 [inline] udf_tread+0x165/0x1d0 fs/udf/misc.c:44 udf_read_tagged+0x4e/0x690 fs/udf/misc.c:219 udf_read_inode fs/udf/inode.c:1338 [inline] __udf_iget+0x341/0x3880 fs/udf/inode.c:1910 udf_iget fs/udf/udfdecl.h:151 [inline] udf_fill_super+0x10d1/0x1a40 fs/udf/super.c:2285 mount_bdev+0x34d/0x410 fs/super.c:1400 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 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+0xc8c/0x1360 mm/swap.c:1055 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:58 zap_pte_range mm/memory.c:1526 [inline] zap_pmd_range mm/memory.c:1575 [inline] zap_pud_range mm/memory.c:1604 [inline] zap_p4d_range mm/memory.c:1625 [inline] unmap_page_range+0x23f7/0x3c90 mm/memory.c:1646 unmap_single_vma+0x190/0x380 mm/memory.c:1696 unmap_vmas+0x21e/0x370 mm/memory.c:1735 exit_mmap+0x189/0x7a0 mm/mmap.c:3090 __mmput+0x128/0x4c0 kernel/fork.c:1188 mmput+0x5c/0x70 kernel/fork.c:1210 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+0x21a6/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 Memory state around the buggy address: ffff888031ee6f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888031ee6f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888031ee7000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888031ee7080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888031ee7100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================