loop0: detected capacity change from 0 to 2048 ================================================================== BUG: KASAN: out-of-bounds in udf_write_fi+0x493/0xc10 Write of size 18446744073709551572 at addr ffff88807022e02c by task syz-executor662/3608 CPU: 0 PID: 3608 Comm: syz-executor662 Not tainted 6.1.0-rc1-syzkaller-00093-g6d36c728bc2e #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+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x1f0 mm/kasan/report.c:395 kasan_report+0xcd/0x100 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+0x493/0xc10 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:4778 do_renameat2+0xb53/0x1370 fs/namei.c:4929 __do_sys_renameat2 fs/namei.c:4962 [inline] __se_sys_renameat2 fs/namei.c:4959 [inline] __x64_sys_renameat2+0xce/0xe0 fs/namei.c:4959 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:0x7f23bdb52999 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:00007fffd766a9f8 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f23bdb52999 RDX: 0000000000000003 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 00007fffd766aa20 R08: 0000000000000000 R09: 00007fffd766aa30 R10: 0000000020000200 R11: 0000000000000246 R12: 0000000000000004 R13: 00007fffd766aa60 R14: 00007fffd766aa40 R15: 0000000000000003 The buggy address belongs to the physical page: page:ffffea0001c08b80 refcount:2 mapcount:0 mapping:ffff8880124f49f8 index:0xb0 pfn:0x7022e memcg:ffff888012270000 aops:def_blk_aops ino:700000 flags: 0xfff0000000203a(referenced|dirty|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000203a ffffea0001c12988 ffffea00008e3b48 ffff8880124f49f8 raw: 00000000000000b0 ffff88806fc1b1d0 00000002ffffffff ffff888012270000 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 3608, tgid 3608 (syz-executor662), ts 40612403942, free_ts 40562855033 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4287 __alloc_pages+0x259/0x560 mm/page_alloc.c:5554 folio_alloc+0x1a/0x50 mm/mempolicy.c:2290 filemap_alloc_folio+0x7e/0x1c0 mm/filemap.c:971 __filemap_get_folio+0x898/0x1260 mm/filemap.c:1965 pagecache_get_page+0x28/0x260 mm/folio-compat.c:110 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:1367 udf_read_tagged+0x10f/0xaf0 fs/udf/misc.c:219 udf_read_inode+0x263/0x3aa0 fs/udf/inode.c:1338 __udf_iget+0x136/0x230 fs/udf/inode.c:1910 udf_iget fs/udf/udfdecl.h:151 [inline] udf_fill_super+0x1009/0x1ae0 fs/udf/super.c:2285 mount_bdev+0x26c/0x3a0 fs/super.c:1400 legacy_get_tree+0xea/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 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+0x80c/0x8f0 mm/page_alloc.c:1508 free_unref_page_prepare mm/page_alloc.c:3386 [inline] free_unref_page_list+0xb4/0x7b0 mm/page_alloc.c:3528 release_pages+0x232a/0x25c0 mm/swap.c:1055 __pagevec_release+0x7d/0xf0 mm/swap.c:1075 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] shmem_undo_range+0x89a/0x2260 mm/shmem.c:946 shmem_truncate_range mm/shmem.c:1034 [inline] shmem_evict_inode+0x27f/0xab0 mm/shmem.c:1143 evict+0x2a4/0x620 fs/inode.c:664 __dentry_kill+0x3b1/0x5b0 fs/dcache.c:607 dentry_kill+0xbb/0x290 dput+0x1f3/0x410 fs/dcache.c:913 __fput+0x5e4/0x880 fs/file_table.c:328 task_work_run+0x243/0x300 kernel/task_work.c:179 ptrace_notify+0x29a/0x340 kernel/signal.c:2354 ptrace_report_syscall include/linux/ptrace.h:420 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:482 [inline] syscall_exit_work+0x8c/0xe0 kernel/entry/common.c:251 syscall_exit_to_user_mode_prepare+0x63/0xc0 kernel/entry/common.c:278 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0xa/0x60 kernel/entry/common.c:296 Memory state around the buggy address: ffff88807022df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807022df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807022e000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88807022e080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807022e100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================