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): using 3.5.x disk format REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage. ================================================================== BUG: KASAN: use-after-free in leaf_paste_in_buffer+0x615/0xab0 fs/reiserfs/lbalance.c:-1 Read of size 48 at addr ffff888060120ff0 by task syz.0.22/5042 CPU: 0 PID: 5042 Comm: syz.0.22 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x235/0x290 mm/kasan/generic.c:189 memcpy+0x25/0x60 mm/kasan/shadow.c:65 leaf_paste_in_buffer+0x615/0xab0 fs/reiserfs/lbalance.c:-1 leaf_copy_dir_entries+0x56c/0x8f0 fs/reiserfs/lbalance.c:108 leaf_copy_boundary_item+0xb8c/0x2190 fs/reiserfs/lbalance.c:168 leaf_copy_items fs/reiserfs/lbalance.c:551 [inline] leaf_move_items+0x85f/0xe00 fs/reiserfs/lbalance.c:726 leaf_shift_left+0xb9/0x450 fs/reiserfs/lbalance.c:750 balance_leaf_left fs/reiserfs/do_balan.c:616 [inline] balance_leaf+0x18fd/0x10ec0 fs/reiserfs/do_balan.c:1409 do_balance+0x318/0x930 fs/reiserfs/do_balan.c:1888 reiserfs_insert_item+0xa7b/0xbe0 fs/reiserfs/stree.c:2261 add_save_link+0x39e/0x600 fs/reiserfs/super.c:495 reiserfs_truncate_file+0x645/0xe40 fs/reiserfs/inode.c:2317 reiserfs_setattr+0xab3/0x1090 fs/reiserfs/inode.c:3409 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x1ac/0x240 fs/open.c:65 handle_truncate fs/namei.c:3273 [inline] do_open fs/namei.c:3620 [inline] path_openat+0x2922/0x2fa0 fs/namei.c:3750 do_filp_open+0x1e2/0x410 fs/namei.c:3777 do_sys_openat2+0x150/0x4b0 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fc96c1200b9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc96b385028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fc96c34cfa0 RCX: 00007fc96c1200b9 RDX: 000000000000275a RSI: 0000200000000200 RDI: 0000000000000004 RBP: 00007fc96c1b29c4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fc96c34cfa0 R15: 00007fff3318f0a8 The buggy address belongs to the page: page:ffffea0001804800 refcount:3 mapcount:0 mapping:ffff888140839470 index:0x214 pfn:0x60120 memcg:ffff88807c660000 aops:def_blk_aops ino:700000 flags: 0xfff00000002022(referenced|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002022 0000000000000000 dead000000000122 ffff888140839470 raw: 0000000000000214 ffff888074090740 00000003ffffffff ffff88807c660000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x108c48(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), pid 5042, ts 106537248729, free_ts 106537072976 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1bbd/0x1ca0 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 __page_cache_alloc+0xce/0x440 mm/filemap.c:1022 pagecache_get_page+0x9b6/0xf10 mm/filemap.c:1940 find_or_create_page include/linux/pagemap.h:420 [inline] grow_dev_page fs/buffer.c:949 [inline] grow_buffers fs/buffer.c:1014 [inline] __getblk_slow fs/buffer.c:1041 [inline] __getblk_gfp+0x247/0xb60 fs/buffer.c:1336 sb_getblk include/linux/buffer_head.h:361 [inline] get_empty_nodes+0x56a/0x920 fs/reiserfs/fix_node.c:890 fix_nodes+0x1ebc/0x8340 fs/reiserfs/fix_node.c:2662 reiserfs_insert_item+0x9a7/0xbe0 fs/reiserfs/stree.c:2240 indirect2direct+0x5ab/0x9f0 fs/reiserfs/tail_conversion.c:283 maybe_indirect_to_direct fs/reiserfs/stree.c:1587 [inline] reiserfs_cut_from_item+0x9cf/0x1fa0 fs/reiserfs/stree.c:1694 reiserfs_do_truncate+0xa09/0x1390 fs/reiserfs/stree.c:1973 reiserfs_truncate_file+0x666/0xe40 fs/reiserfs/inode.c:2318 reiserfs_setattr+0xab3/0x1090 fs/reiserfs/inode.c:3409 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x1ac/0x240 fs/open.c:65 do_sys_ftruncate+0x31b/0x3d0 fs/open.c:193 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x119/0x820 mm/page_alloc.c:3433 release_pages+0x186c/0x1be0 mm/swap.c:963 __pagevec_release+0x6d/0xe0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x362/0xfe0 mm/truncate.c:329 truncate_inode_pages mm/truncate.c:425 [inline] truncate_pagecache mm/truncate.c:735 [inline] truncate_setsize+0xb9/0xe0 mm/truncate.c:760 reiserfs_setattr+0xaa6/0x1090 fs/reiserfs/inode.c:3408 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x1ac/0x240 fs/open.c:65 do_sys_ftruncate+0x31b/0x3d0 fs/open.c:193 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888060120f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888060120f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888060121000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888060121080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888060121100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================