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: out-of-bounds in leaf_paste_in_buffer+0x223/0x9b0 fs/reiserfs/lbalance.c:1017 Read of size 18446744073709551365 at addr ffff88806b1be000 by task syz-executor.0/1933 CPU: 0 PID: 1933 Comm: syz-executor.0 Not tainted 5.15.173-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x41/0x5e lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memmove+0x20/0x60 mm/kasan/shadow.c:54 leaf_paste_in_buffer+0x223/0x9b0 fs/reiserfs/lbalance.c:1017 balance_leaf_new_nodes_paste_whole fs/reiserfs/do_balan.c:1171 [inline] balance_leaf_new_nodes_paste fs/reiserfs/do_balan.c:1215 [inline] balance_leaf_new_nodes fs/reiserfs/do_balan.c:1246 [inline] balance_leaf+0x1dbc/0xe180 fs/reiserfs/do_balan.c:1450 do_balance+0x2e0/0x6b0 fs/reiserfs/do_balan.c:1888 reiserfs_paste_into_item+0x63c/0x7b0 fs/reiserfs/stree.c:2159 reiserfs_get_block+0xe98/0x39b0 fs/reiserfs/inode.c:1077 __block_write_begin_int+0x2ef/0x1180 fs/buffer.c:2012 reiserfs_write_begin+0x320/0x820 fs/reiserfs/inode.c:2790 generic_cont_expand_simple+0xea/0x120 fs/buffer.c:2362 reiserfs_setattr+0x9b2/0xd20 fs/reiserfs/inode.c:3319 notify_change+0x4b4/0xea0 fs/attr.c:505 do_truncate+0xee/0x1a0 fs/open.c:65 do_sys_ftruncate+0x423/0x550 fs/open.c:193 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f2c80ad1ae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2c806540c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007f2c80bf0f80 RCX: 00007f2c80ad1ae9 RDX: 0000000000000000 RSI: 0000000002007ffb RDI: 0000000000000005 RBP: 00007f2c80b1d47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f2c80bf0f80 R15: 00007ffe2a7ca8e8 The buggy address belongs to the page: page:ffffea0001ac6f80 refcount:2 mapcount:1 mapping:0000000000000000 index:0x7f2c80bed pfn:0x6b1be memcg:ffff888074098000 anon flags: 0xfff00000080004(uptodate|swapbacked|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000080004 0000000000000000 dead000000000122 ffff88807ba76991 raw: 00000007f2c80bed 0000000000000000 0000000200000000 ffff888074098000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x1100cca(GFP_HIGHUSER_MOVABLE), pid 1932, ts 57856423292, free_ts 5501142497 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1369/0x31f0 mm/page_alloc.c:4192 __alloc_pages+0x1b2/0x440 mm/page_alloc.c:5464 alloc_pages_vma+0xe0/0x650 mm/mempolicy.c:2146 wp_page_copy+0x18c/0x1890 mm/memory.c:3054 handle_pte_fault mm/memory.c:4666 [inline] __handle_mm_fault+0x15ac/0x33a0 mm/memory.c:4783 handle_mm_fault+0x1c5/0x5b0 mm/memory.c:4881 do_user_addr_fault+0x298/0xc80 arch/x86/mm/fault.c:1357 handle_page_fault arch/x86/mm/fault.c:1445 [inline] exc_page_fault+0x5a/0xb0 arch/x86/mm/fault.c:1501 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 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+0x379/0x850 mm/page_alloc.c:1391 free_unref_page_prepare mm/page_alloc.c:3317 [inline] free_unref_page+0x19/0x4b0 mm/page_alloc.c:3396 free_contig_range+0x8b/0xb0 mm/page_alloc.c:9383 destroy_args+0x7e/0x503 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x1773/0x17f5 mm/debug_vm_pgtable.c:1331 do_one_initcall+0xb4/0x320 init/main.c:1302 do_initcall_level init/main.c:1375 [inline] do_initcalls init/main.c:1391 [inline] do_basic_setup init/main.c:1410 [inline] kernel_init_freeable+0x51e/0x580 init/main.c:1615 kernel_init+0x14/0x120 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff88806b1bdf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806b1bdf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806b1be000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88806b1be080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806b1be100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================