REISERFS (device loop4): journal params: device loop4, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop4): checking transaction log (loop4) REISERFS (device loop4): Using r5 hash to sort names REISERFS (device loop4): Created .reiserfs_priv - reserved for xattr storage. ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:376 [inline] BUG: KASAN: use-after-free in leaf_paste_in_buffer+0x981/0xb80 fs/reiserfs/lbalance.c:1043 Read of size 80 at addr ffff88803c426fe0 by task syz-executor.4/13245 CPU: 0 PID: 13245 Comm: syz-executor.4 Not tainted 4.14.302-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report+0x6f/0x80 mm/kasan/report.c:409 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:376 [inline] leaf_paste_in_buffer+0x981/0xb80 fs/reiserfs/lbalance.c:1043 leaf_copy_dir_entries.isra.0+0x770/0x8f0 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+0x147e/0x3440 fs/reiserfs/lbalance.c:726 leaf_shift_left+0x9f/0x360 fs/reiserfs/lbalance.c:750 balance_leaf_left fs/reiserfs/do_balan.c:622 [inline] balance_leaf+0x2b73/0xba30 fs/reiserfs/do_balan.c:1420 do_balance+0x282/0x630 fs/reiserfs/do_balan.c:1899 reiserfs_insert_item+0x95b/0xc70 fs/reiserfs/stree.c:2271 reiserfs_new_inode+0xd52/0x2150 fs/reiserfs/inode.c:2063 reiserfs_create+0x2eb/0x6b0 fs/reiserfs/namei.c:667 lookup_open+0x77a/0x1750 fs/namei.c:3241 do_last fs/namei.c:3334 [inline] path_openat+0xe08/0x2970 fs/namei.c:3571 do_filp_open+0x179/0x3c0 fs/namei.c:3605 do_sys_open+0x296/0x410 fs/open.c:1081 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7fcb5c8240d9 RSP: 002b:00007fcb5ad96168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fcb5c943f80 RCX: 00007fcb5c8240d9 RDX: 0000000000000241 RSI: 0000000020000000 RDI: ffffffffffffff9c RBP: 00007fcb5c87fae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffeb9ea7b1f R14: 00007fcb5ad96300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea0000f10980 count:3 mapcount:0 mapping:ffff8880b1dadae8 index:0x214 flags: 0xfff00000001044(referenced|active|private) raw: 00fff00000001044 ffff8880b1dadae8 0000000000000214 00000003ffffffff raw: dead000000000100 dead000000000200 ffff888040cfc930 ffff88823b3288c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88823b3288c0 Memory state around the buggy address: ffff88803c426f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803c426f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88803c427000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88803c427080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88803c427100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================