REISERFS (device loop2): Using r5 hash to sort names REISERFS warning (device loop2): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 1) not found (pos 2) REISERFS (device loop2): Created .reiserfs_priv - reserved for xattr storage. ================================================================== BUG: KASAN: use-after-free in strlen+0x53/0x60 lib/string.c:502 Read of size 1 at addr ffff8880354e9008 by task syz.2.859/7000 CPU: 1 PID: 7000 Comm: syz.2.859 Not tainted 6.1.140-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x220 mm/kasan/report.c:427 kasan_report+0x10b/0x140 mm/kasan/report.c:531 strlen+0x53/0x60 lib/string.c:502 _Z16__fortify_strlenPKcU17pass_object_size1 include/linux/fortify-string.h:196 [inline] set_de_name_and_namelen fs/reiserfs/namei.c:82 [inline] search_by_entry_key+0xa84/0x1370 fs/reiserfs/namei.c:172 reiserfs_readdir_inode+0x22c/0x1230 fs/reiserfs/dir.c:98 iterate_dir+0x218/0x560 fs/readdir.c:-1 __do_sys_getdents fs/readdir.c:286 [inline] __se_sys_getdents+0xe5/0x250 fs/readdir.c:271 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f2f9b18e969 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2f9c03a038 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f2f9b3b5fa0 RCX: 00007f2f9b18e969 RDX: 0000000000009005 RSI: 0000200000000280 RDI: 0000000000000005 RBP: 00007f2f9b210ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2f9b3b5fa0 R15: 00007fff62529db8 The buggy address belongs to the physical page: page:ffffea0000d53a40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x354e9 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0000d53948 ffffea0000d53b88 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x141cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_WRITE), pid 6963, tgid 6962 (syz.0.845), ts 263616970831, free_ts 266291526897 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5606 folio_alloc+0x1c/0x60 mm/mempolicy.c:2292 filemap_alloc_folio+0xdb/0x460 mm/filemap.c:999 __filemap_get_folio+0x697/0xdd0 mm/filemap.c:1993 pagecache_get_page+0x26/0x250 mm/folio-compat.c:110 block_write_begin+0x2c/0x1e0 fs/buffer.c:2098 udf_write_begin+0x31/0x70 fs/udf/inode.c:212 generic_perform_write+0x2db/0x560 mm/filemap.c:3846 __generic_file_write_iter+0x172/0x430 mm/filemap.c:3974 udf_file_write_iter+0x28c/0x650 fs/udf/file.c:164 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x44c/0x960 fs/read_write.c:584 ksys_write+0x143/0x240 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3525 release_pages+0x1f92/0x2200 mm/swap.c:1035 __pagevec_release+0x6d/0xe0 mm/swap.c:1055 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] truncate_inode_pages_range+0x2f6/0xff0 mm/truncate.c:372 udf_evict_inode+0x22c/0x3e0 fs/udf/inode.c:157 evict+0x485/0x870 fs/inode.c:705 dispose_list fs/inode.c:738 [inline] evict_inodes+0x604/0x690 fs/inode.c:792 generic_shutdown_super+0x93/0x340 fs/super.c:480 kill_block_super+0x7c/0xe0 fs/super.c:1470 deactivate_locked_super+0x93/0xf0 fs/super.c:332 cleanup_mnt+0x463/0x4f0 fs/namespace.c:1186 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 Memory state around the buggy address: ffff8880354e8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880354e8f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880354e9000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880354e9080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880354e9100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================