RBP: 00007f028ccd21d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffdc12d636f R14: 00007f028ccd2300 R15: 0000000000022000 ================================================================== BUG: KASAN: out-of-bounds in udf_write_fi+0x4ed/0xb90 Write of size 18446744073709551572 at addr ffff8880935d682c by task syz-executor.4/10176 CPU: 1 PID: 10176 Comm: syz-executor.4 Not tainted 6.2.0-rc2-syzkaller-00203-g1f5abbd77e2c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x220 mm/kasan/report.c:417 kasan_report+0x139/0x170 mm/kasan/report.c:517 kasan_check_range+0x2a7/0x2e0 mm/kasan/generic.c:189 memset+0x1f/0x40 mm/kasan/shadow.c:44 udf_write_fi+0x4ed/0xb90 udf_delete_entry fs/udf/namei.c:577 [inline] udf_rename+0x9a7/0x1520 fs/udf/namei.c:1173 vfs_rename+0xd67/0x1150 fs/namei.c:4779 do_renameat2+0xb7f/0x13e0 fs/namei.c:4930 __do_sys_rename fs/namei.c:4976 [inline] __se_sys_rename fs/namei.c:4974 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:4974 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f028be8c0c9 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:00007f028ccd2168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f028bfabf80 RCX: 00007f028be8c0c9 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000020000040 RBP: 00007f028ccd21d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffdc12d636f R14: 00007f028ccd2300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea00024d7580 refcount:2 mapcount:0 mapping:ffff888012cdb3f8 index:0xe pfn:0x935d6 memcg:ffff88802ae86000 aops:def_blk_aops ino:700004 flags: 0xfff0000000203a(referenced|dirty|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000203a ffffea00025dabc8 ffffea00025b90c8 ffff888012cdb3f8 raw: 000000000000000e ffff888076bbee80 00000002ffffffff ffff88802ae86000 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 10176, tgid 10167 (syz-executor.4), ts 409478222001, free_ts 409477210718 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 folio_alloc+0x1a/0x50 mm/mempolicy.c:2296 filemap_alloc_folio+0xca/0x2c0 mm/filemap.c:972 __filemap_get_folio+0x875/0x1230 mm/filemap.c:1966 pagecache_get_page+0x28/0x250 mm/folio-compat.c:98 find_or_create_page include/linux/pagemap.h:612 [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 udf_expand_dir_adinicb+0x58b/0x16e0 fs/udf/inode.c:360 udf_add_entry+0x1376/0x3320 fs/udf/namei.c:444 udf_mkdir+0x3e8/0xa00 fs/udf/namei.c:698 vfs_mkdir+0x3b3/0x590 fs/namei.c:4036 do_mkdirat+0x26b/0x540 fs/namei.c:4061 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __x64_sys_mkdir+0x6a/0x80 fs/namei.c:4079 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd 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+0x751/0x780 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page_list+0xb2/0x830 mm/page_alloc.c:3510 release_pages+0x234e/0x25f0 mm/swap.c:1076 tlb_batch_pages_flush mm/mmu_gather.c:97 [inline] tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu+0x860/0xa80 mm/mmu_gather.c:299 tlb_finish_mmu+0xcd/0x200 mm/mmu_gather.c:391 exit_mmap+0x2b1/0x670 mm/mmap.c:3096 __mmput+0x114/0x3b0 kernel/fork.c:1207 exit_mm+0x20f/0x2f0 kernel/exit.c:563 do_exit+0x5c7/0x2150 kernel/exit.c:854 do_group_exit+0x1fd/0x2b0 kernel/exit.c:1012 get_signal+0x1755/0x1820 kernel/signal.c:2859 arch_do_signal_or_restart+0x8d/0x5f0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8880935d6700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880935d6780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880935d6800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880935d6880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880935d6900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================