REISERFS (device loop3): Using tea hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. ================================================================== BUG: KASAN: use-after-free in leaf_paste_in_buffer+0x66c/0xa14 fs/reiserfs/lbalance.c:-1 Read of size 48 at addr ffff0000fa6ebff0 by task syz.3.13/4435 CPU: 0 PID: 4435 Comm: syz.3.13 Not tainted 6.1.141-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x88/0x220 mm/kasan/report.c:316 print_report+0x50/0x68 mm/kasan/report.c:427 kasan_report+0xa8/0x100 mm/kasan/report.c:531 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x260/0x2a0 mm/kasan/generic.c:189 memcpy+0x48/0x90 mm/kasan/shadow.c:65 leaf_paste_in_buffer+0x66c/0xa14 fs/reiserfs/lbalance.c:-1 leaf_copy_dir_entries+0x45c/0x788 fs/reiserfs/lbalance.c:108 leaf_copy_boundary_item+0x888/0x19dc fs/reiserfs/lbalance.c:-1 leaf_copy_items fs/reiserfs/lbalance.c:551 [inline] leaf_move_items+0x694/0xb9c fs/reiserfs/lbalance.c:726 leaf_shift_left+0xc8/0x3ac fs/reiserfs/lbalance.c:750 balance_leaf_when_delete_left fs/reiserfs/do_balan.c:194 [inline] balance_leaf_when_delete fs/reiserfs/do_balan.c:272 [inline] balance_leaf+0x182c/0xd2f4 fs/reiserfs/do_balan.c:1393 do_balance+0x260/0x774 fs/reiserfs/do_balan.c:1888 reiserfs_delete_solid_item+0x710/0xc34 fs/reiserfs/stree.c:1462 remove_save_link+0x1cc/0x320 fs/reiserfs/super.c:540 reiserfs_truncate_file+0x69c/0xaf4 fs/reiserfs/inode.c:2322 reiserfs_setattr+0xac4/0xf7c fs/reiserfs/inode.c:3395 notify_change+0xb0c/0xdcc fs/attr.c:499 do_truncate+0x178/0x1f0 fs/open.c:65 handle_truncate fs/namei.c:3285 [inline] do_open fs/namei.c:3630 [inline] path_openat+0x20d0/0x2680 fs/namei.c:3783 do_filp_open+0x174/0x344 fs/namei.c:3810 do_sys_openat2+0x128/0x3d8 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_openat fs/open.c:1350 [inline] __se_sys_openat fs/open.c:1345 [inline] __arm64_sys_openat+0x120/0x154 fs/open.c:1345 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the physical page: page:00000000b3a451ad refcount:2 mapcount:0 mapping:000000000a0c93bd index:0x215 pfn:0x13a6eb memcg:ffff0000de03a000 aops:def_blk_aops ino:700003 flags: 0x5ffd40000002052(referenced|lru|workingset|private|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffd40000002052 fffffc0003d9cc48 ffff0000de03c208 ffff0000c049eb10 raw: 0000000000000215 ffff0000dfcb19f8 00000002ffffffff ffff0000de03a000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000fa6ebf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000fa6ebf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000fa6ec000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000fa6ec080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000fa6ec100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================