REISERFS (device loop2): Using r5 hash to sort names REISERFS (device loop2): Created .reiserfs_priv - reserved for xattr storage. REISERFS (device loop0): Using r5 hash to sort names REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage. ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:377 [inline] BUG: KASAN: use-after-free in leaf_paste_in_buffer+0xa27/0xc20 fs/reiserfs/lbalance.c:1043 Read of size 104 at addr ffff88803c052fd8 by task syz-executor.0/11775 CPU: 1 PID: 11775 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report+0x8f/0xa0 mm/kasan/report.c:412 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:377 [inline] leaf_paste_in_buffer+0xa27/0xc20 fs/reiserfs/lbalance.c:1043 leaf_copy_dir_entries.isra.0+0x7f3/0x980 fs/reiserfs/lbalance.c:108 leaf_copy_boundary_item fs/reiserfs/lbalance.c:168 [inline] leaf_copy_items fs/reiserfs/lbalance.c:551 [inline] leaf_move_items+0x17f6/0x3b60 fs/reiserfs/lbalance.c:726 leaf_shift_left+0xa0/0x380 fs/reiserfs/lbalance.c:750 balance_leaf_paste_left_whole fs/reiserfs/do_balan.c:566 [inline] balance_leaf_paste_left fs/reiserfs/do_balan.c:600 [inline] balance_leaf_left fs/reiserfs/do_balan.c:619 [inline] balance_leaf+0x502e/0xca70 fs/reiserfs/do_balan.c:1420 do_balance+0x30a/0x760 fs/reiserfs/do_balan.c:1899 reiserfs_paste_into_item+0x636/0x7d0 fs/reiserfs/stree.c:2169 reiserfs_add_entry+0x89a/0xcc0 fs/reiserfs/namei.c:566 reiserfs_rename+0x78c/0x2080 fs/reiserfs/namei.c:1415 vfs_rename+0x67e/0x1bc0 fs/namei.c:4479 do_renameat2+0xb59/0xc70 fs/namei.c:4629 __do_sys_rename fs/namei.c:4675 [inline] __se_sys_rename fs/namei.c:4673 [inline] __x64_sys_rename+0x5d/0x80 fs/namei.c:4673 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fc7be6060a9 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:00007fc7bcb78168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007fc7be725f80 RCX: 00007fc7be6060a9 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000020000280 RBP: 00007fc7be661ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc5dd8564f R14: 00007fc7bcb78300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea0000f01480 count:2 mapcount:0 mapping:ffff8880b1ad84e0 index:0x213 flags: 0xfff00000001064(referenced|lru|active|private) raw: 00fff00000001064 ffffea00025b96c8 ffffea0002a26e08 ffff8880b1ad84e0 raw: 0000000000000213 ffff88808cf68540 00000002ffffffff ffff8880b59f68c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880b59f68c0 Memory state around the buggy address: ffff88803c052f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803c052f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88803c053000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88803c053080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88803c053100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================