================================================================== BUG: KASAN: out-of-bounds in udf_write_fi+0x569/0xb70 Write of size 18446744073709551572 at addr ffff88805b2cf02c by task syz-executor.1/31223 CPU: 0 PID: 31223 Comm: syz-executor.1 Not tainted 5.15.110-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189 memset+0x1f/0x40 mm/kasan/shadow.c:44 udf_write_fi+0x569/0xb70 udf_delete_entry fs/udf/namei.c:577 [inline] udf_rename+0x8b3/0x14d0 fs/udf/namei.c:1173 vfs_rename+0xd8f/0x1190 fs/namei.c:4736 do_renameat2+0xb97/0x13b0 fs/namei.c:4887 __do_sys_rename fs/namei.c:4933 [inline] __se_sys_rename fs/namei.c:4931 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:4931 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+0x61/0xcb RIP: 0033:0x7f40628dc169 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:00007f4058b2d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f40629fc050 RCX: 00007f40628dc169 RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000020000240 RBP: 00007f4062937ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcc18f063f R14: 00007f4058b2d300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea00016cb3c0 refcount:2 mapcount:0 mapping:ffff88814084abf0 index:0xb0 pfn:0x5b2cf memcg:ffff888042d24000 aops:def_blk_aops ino:700001 flags: 0xfff0000000203e(referenced|uptodate|dirty|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000203e ffffea0001589308 ffff88801cc27030 ffff88814084abf0 raw: 00000000000000b0 ffff888043a93bc8 00000002ffffffff ffff888042d24000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x108c48(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), pid 31223, ts 2495337439328, free_ts 2493858820608 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5421 __page_cache_alloc+0xd4/0x4a0 mm/filemap.c:1022 pagecache_get_page+0xa91/0x1010 mm/filemap.c:1940 find_or_create_page include/linux/pagemap.h:420 [inline] grow_dev_page fs/buffer.c:949 [inline] grow_buffers fs/buffer.c:1014 [inline] __getblk_slow fs/buffer.c:1041 [inline] __getblk_gfp+0x22a/0xaf0 fs/buffer.c:1336 __bread_gfp+0x2a/0x390 fs/buffer.c:1381 udf_find_entry+0x118b/0x14d0 fs/udf/namei.c:206 udf_lookup+0x11b/0x370 fs/udf/namei.c:309 __lookup_hash+0x117/0x240 fs/namei.c:1560 do_renameat2+0x570/0x13b0 fs/namei.c:4830 __do_sys_rename fs/namei.c:4933 [inline] __se_sys_rename fs/namei.c:4931 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:4931 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+0x61/0xcb page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page_list+0x1f7/0x8e0 mm/page_alloc.c:3433 release_pages+0x1bb9/0x1f40 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:338 exit_mmap+0x3cd/0x670 mm/mmap.c:3188 __mmput+0x112/0x3b0 kernel/fork.c:1118 exit_mm+0x688/0x7f0 kernel/exit.c:548 do_exit+0x626/0x2480 kernel/exit.c:859 do_group_exit+0x144/0x310 kernel/exit.c:994 get_signal+0xc66/0x14e0 kernel/signal.c:2889 arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:865 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:172 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff88805b2cef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805b2cef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805b2cf000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88805b2cf080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805b2cf100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================