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 104 at addr ffff88808ac82fd8 by task syz-executor144/8089 CPU: 1 PID: 8089 Comm: syz-executor144 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_get_block+0xb54/0x36b0 fs/reiserfs/inode.c:876 __block_write_begin_int+0x35c/0x11d0 fs/buffer.c:2038 reiserfs_write_begin+0x2e3/0x8a0 fs/reiserfs/inode.c:2793 generic_cont_expand_simple+0xe1/0x130 fs/buffer.c:2388 reiserfs_setattr+0xa1c/0xe00 fs/reiserfs/inode.c:3321 notify_change+0x56b/0xd10 fs/attr.c:315 do_truncate+0xff/0x1a0 fs/open.c:63 do_sys_ftruncate.constprop.0+0x3a3/0x480 fs/open.c:205 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f7d96155a09 RSP: 002b:00007ffd704ed018 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f7d96155a09 RDX: 00007f7d96155a09 RSI: 0000000002007ffb RDI: 0000000000000006 RBP: 0000000000000000 R08: 00007ffd704ed040 R09: 00007ffd704ed040 R10: 00007ffd704ed040 R11: 0000000000000246 R12: 00007ffd704ed03c R13: 00007ffd704ed070 R14: 00007ffd704ed050 R15: 000000000000000a The buggy address belongs to the page: page:ffffea00022b2080 count:2 mapcount:0 mapping:ffff8880a401d4e8 index:0x213 flags: 0xfff00000001064(referenced|lru|active|private) raw: 00fff00000001064 ffff8880a401d4e8 0000000000000213 00000002ffffffff raw: ffffea00022b2060 ffffea00022faea0 ffff88808a8d7bd0 ffff88823b3288c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88823b3288c0 Memory state around the buggy address: ffff88808ac82f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808ac82f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808ac83000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88808ac83080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808ac83100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================