REISERFS (device loop3): Using r5 hash to sort names REISERFS (device loop2): checking transaction log (loop2) REISERFS (device loop3): 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 ffff8880632b4fd8 by task syz-executor.3/19473 CPU: 0 PID: 19473 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 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_when_delete_left fs/reiserfs/do_balan.c:194 [inline] balance_leaf_when_delete fs/reiserfs/do_balan.c:275 [inline] balance_leaf+0xa32b/0xca70 fs/reiserfs/do_balan.c:1404 do_balance+0x30a/0x760 fs/reiserfs/do_balan.c:1899 reiserfs_cut_from_item+0xd93/0x1960 fs/reiserfs/stree.c:1848 reiserfs_do_truncate+0x64a/0x10c0 fs/reiserfs/stree.c:1983 reiserfs_truncate_file+0x1b1/0x1030 fs/reiserfs/inode.c:2320 reiserfs_setattr+0xdc2/0x1090 fs/reiserfs/inode.c:3412 notify_change+0x70b/0xfc0 fs/attr.c:334 do_truncate+0x134/0x1f0 fs/open.c:63 handle_truncate fs/namei.c:3009 [inline] do_last fs/namei.c:3427 [inline] path_openat+0x2308/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fc0c16200f9 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:00007fc0b7b71168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fc0c1740050 RCX: 00007fc0c16200f9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007fc0c167bae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcf31082cf R14: 00007fc0b7b71300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea00018cad00 count:2 mapcount:0 mapping:ffff88808ffa05e0 index:0x235 flags: 0xfff00000001064(referenced|lru|active|private) raw: 00fff00000001064 ffffea0000d9bcc8 ffffea0000d4afc8 ffff88808ffa05e0 raw: 0000000000000235 ffff88804a722690 00000002ffffffff ffff8880b59f68c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880b59f68c0 Memory state around the buggy address: ffff8880632b4f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880632b4f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880632b5000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880632b5080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff REISERFS (device loop2): Using r5 hash to sort names ffff8880632b5100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================