================================================================== BUG: KASAN: out-of-bounds in leaf_paste_in_buffer+0x66c/0xa14 fs/reiserfs/lbalance.c:-1 Read of size 48 at addr ffff000104000ff0 by task syz.0.115/4956 CPU: 0 PID: 4956 Comm: syz.0.115 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_item+0x86c/0xc90 fs/reiserfs/stree.c:1371 direct2indirect+0x7b8/0xe88 fs/reiserfs/tail_conversion.c:139 reiserfs_get_block+0x31dc/0x3524 fs/reiserfs/inode.c:949 __block_write_begin_int+0x34c/0x13b8 fs/buffer.c:1991 __block_write_begin+0x7c/0xa0 fs/buffer.c:2041 __reiserfs_write_begin+0x348/0x56c fs/reiserfs/inode.c:2835 reiserfs_xattr_set_handle+0x448/0xd94 fs/reiserfs/xattr.c:571 reiserfs_xattr_set+0x388/0x4a8 fs/reiserfs/xattr.c:633 trusted_set+0x98/0xec fs/reiserfs/xattr_trusted.c:31 __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182 __vfs_setxattr_noperm+0x120/0x564 fs/xattr.c:216 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277 vfs_setxattr+0x158/0x2ac fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x228/0x28c fs/xattr.c:617 path_setxattr+0x12c/0x25c fs/xattr.c:636 __do_sys_setxattr fs/xattr.c:652 [inline] __se_sys_setxattr fs/xattr.c:648 [inline] __arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:648 __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:0000000087a60a91 refcount:2 mapcount:0 mapping:000000000f0302e3 index:0x237 pfn:0x144000 memcg:ffff0000c49b4000 aops:def_blk_aops ino:700000 flags: 0x5ffd60000002052(referenced|lru|workingset|private|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffd60000002052 fffffc0003b9f908 ffff0000c49b6208 ffff0000c0485510 raw: 0000000000000237 ffff0000e1a9e570 00000002ffffffff ffff0000c49b4000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000104000f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff000104000f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff000104001000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff000104001080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff000104001100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================