================================================================== BUG: KASAN: out-of-bounds in udf_write_fi+0x569/0xb70 Write of size 18446744073709551572 at addr ffff888050b8502c by task syz-executor.1/26557 CPU: 1 PID: 26557 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:0x7f020be48169 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:00007f0202099168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f020bf68050 RCX: 00007f020be48169 RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000020000240 RBP: 00007f020bea3ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe74911b7f R14: 00007f0202099300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea000142e140 refcount:2 mapcount:0 mapping:ffff8880120366b0 index:0xb0 pfn:0x50b85 memcg:ffff8880276c8000 aops:def_blk_aops ino:700001 flags: 0xfff0000000203e(referenced|uptodate|dirty|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000000203e ffffea000111d008 ffff888027684030 ffff8880120366b0 raw: 00000000000000b0 ffff88802f71eae0 00000002ffffffff ffff8880276c8000 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 26557, ts 1678640983729, free_ts 1678638143389 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 __pagevec_release+0x80/0xf0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] shmem_undo_range+0x67a/0x1b50 mm/shmem.c:964 shmem_truncate_range mm/shmem.c:1063 [inline] shmem_evict_inode+0x21b/0xa00 mm/shmem.c:1145 evict+0x2a4/0x620 fs/inode.c:587 __dentry_kill+0x436/0x650 fs/dcache.c:582 dentry_kill+0xbb/0x290 dput+0x1f1/0x420 fs/dcache.c:888 __fput+0x5ec/0x890 fs/file_table.c:288 task_work_run+0x129/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175 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 Memory state around the buggy address: ffff888050b84f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888050b84f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888050b85000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888050b85080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888050b85100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================