REISERFS (device loop0): journal params: device loop0, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop0): checking transaction log (loop0) 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: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 ffff88808a9f7fe0 by task syz-executor313/7984 CPU: 0 PID: 7984 Comm: syz-executor313 Not tainted 4.14.301-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_paste_into_item+0x569/0x6f0 fs/reiserfs/stree.c:2169 reiserfs_get_block+0x1691/0x36b0 fs/reiserfs/inode.c:1076 __block_write_begin_int+0x35c/0x11d0 fs/buffer.c:2038 reiserfs_write_begin+0x2e3/0x8a0 fs/reiserfs/inode.c:2793 generic_perform_write+0x1d5/0x430 mm/filemap.c:3055 __generic_file_write_iter+0x227/0x590 mm/filemap.c:3180 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3208 call_write_iter include/linux/fs.h:1780 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44c/0x630 fs/read_write.c:482 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7feecff6ba49 RSP: 002b:00007ffece04a298 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000af5f RCX: 00007feecff6ba49 RDX: 000000000000fea7 RSI: 00000000200001c0 RDI: 0000000000000006 RBP: 0000000000000000 R08: 00007ffece04a2c0 R09: 00007ffece04a2c0 R10: 00007ffece04a2c0 R11: 0000000000000246 R12: 00007ffece04a2bc R13: 00007ffece04a2f0 R14: 00007ffece04a2d0 R15: 0000000000000001 The buggy address belongs to the page: page:ffffea00022a7dc0 count:3 mapcount:0 mapping:ffff8880b1bc7b68 index:0x214 flags: 0xfff00000001044(referenced|active|private) raw: 00fff00000001044 ffff8880b1bc7b68 0000000000000214 00000003ffffffff raw: dead000000000100 dead000000000200 ffff88808df743f0 ffff88823b3288c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88823b3288c0 Memory state around the buggy address: ffff88808a9f7f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808a9f7f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808a9f8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88808a9f8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88808a9f8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================