R13: 00007fffe1272c4f R14: 00007f4b233ae300 R15: 0000000000022000 ================================================================== BUG: KASAN: out-of-bounds in udf_write_fi+0x914/0xf20 fs/udf/namei.c:93 Write of size 18446744073709551572 at addr ffff888071987a2c by task syz-executor.0/6758 CPU: 0 PID: 6758 Comm: syz-executor.0 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x461 mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x141/0x190 mm/kasan/generic.c:189 memset+0x24/0x50 mm/kasan/shadow.c:44 udf_write_fi+0x914/0xf20 fs/udf/namei.c:93 udf_rename+0xd80/0x1260 fs/udf/namei.c:1173 vfs_rename+0x1162/0x1a90 fs/namei.c:4779 do_renameat2+0xb22/0xc30 fs/namei.c:4930 __do_sys_renameat2 fs/namei.c:4963 [inline] __se_sys_renameat2 fs/namei.c:4960 [inline] __x64_sys_renameat2+0xe8/0x120 fs/namei.c:4960 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f4b2268c0a9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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:00007f4b233ae168 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007f4b227abf80 RCX: 00007f4b2268c0a9 RDX: 0000000000000004 RSI: 00000000200002c0 RDI: 0000000000000004 RBP: 00007f4b233ae1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000180 R11: 0000000000000246 R12: 0000000000000002 R13: 00007fffe1272c4f R14: 00007f4b233ae300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0001c661c0 refcount:2 mapcount:0 mapping:ffff8880404679b8 index:0x6b pfn:0x71987 memcg:ffff88807571c000 aops:def_blk_aops ino:700000 flags: 0x4fff0000000203a(referenced|dirty|lru|active|private|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff0000000203a ffffea000125a548 ffff888075fad030 ffff8880404679b8 raw: 000000000000006b ffff88802a4c52f8 00000002ffffffff ffff88807571c000 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 6758, tgid 6757 (syz-executor.0), ts 398901531254, free_ts 398890932493 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages_slowpath.constprop.0+0x36b/0x23d0 mm/page_alloc.c:5084 __alloc_pages+0x4aa/0x5b0 mm/page_alloc.c:5562 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2286 folio_alloc+0x20/0x70 mm/mempolicy.c:2296 filemap_alloc_folio+0x362/0x450 mm/filemap.c:972 __filemap_get_folio+0x32c/0xd80 mm/filemap.c:1966 pagecache_get_page+0x2e/0x280 mm/folio-compat.c:98 find_or_create_page include/linux/pagemap.h:612 [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+0x72/0x80 fs/buffer.c:1333 sb_getblk include/linux/buffer_head.h:356 [inline] udf_tgetblk+0xfd/0x1d0 fs/udf/misc.c:36 udf_expand_dir_adinicb+0x399/0xf20 fs/udf/inode.c:360 udf_add_entry+0x1ea8/0x2ac0 fs/udf/namei.c:444 udf_rename+0x121f/0x1260 fs/udf/namei.c:1150 vfs_rename+0x1162/0x1a90 fs/namei.c:4779 do_renameat2+0xb22/0xc30 fs/namei.c:4930 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page_list+0x176/0xcd0 mm/page_alloc.c:3510 release_pages+0xcb1/0x1330 mm/swap.c:1076 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:97 zap_pte_range mm/memory.c:1480 [inline] zap_pmd_range mm/memory.c:1529 [inline] zap_pud_range mm/memory.c:1558 [inline] zap_p4d_range mm/memory.c:1579 [inline] unmap_page_range+0x2258/0x3c30 mm/memory.c:1600 unmap_single_vma+0x190/0x2a0 mm/memory.c:1646 unmap_vmas+0x226/0x370 mm/memory.c:1685 exit_mmap+0x18d/0x7b0 mm/mmap.c:3085 __mmput+0x128/0x4c0 kernel/fork.c:1207 mmput+0x60/0x70 kernel/fork.c:1229 exit_mm kernel/exit.c:563 [inline] do_exit+0x9ac/0x2950 kernel/exit.c:854 do_group_exit+0xd4/0x2a0 kernel/exit.c:1012 get_signal+0x21c3/0x2450 kernel/signal.c:2859 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:306 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+0x1d/0x50 kernel/entry/common.c:296 Memory state around the buggy address: ffff888071987900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071987980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888071987a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888071987a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071987b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================