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 ================================================================== BUG: KASAN: out-of-bounds in leaf_paste_entries+0x963/0x13a0 fs/reiserfs/lbalance.c:1377 Read of size 18446744073709551584 at addr ffff88806d3a6fa4 by task syz-executor.0/5404 CPU: 1 UID: 0 PID: 5404 Comm: syz-executor.0 Not tainted 6.12.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memmove+0x29/0x70 mm/kasan/shadow.c:94 leaf_paste_entries+0x963/0x13a0 fs/reiserfs/lbalance.c:1377 balance_leaf_finish_node_paste_dirent fs/reiserfs/do_balan.c:1295 [inline] balance_leaf_finish_node_paste fs/reiserfs/do_balan.c:1321 [inline] balance_leaf_finish_node fs/reiserfs/do_balan.c:1364 [inline] balance_leaf+0xbd2c/0x12520 fs/reiserfs/do_balan.c:1452 do_balance+0x30d/0x8f0 fs/reiserfs/do_balan.c:1888 reiserfs_paste_into_item+0x733/0x880 fs/reiserfs/stree.c:2158 reiserfs_add_entry+0x945/0xd70 fs/reiserfs/namei.c:558 reiserfs_mkdir+0x6c4/0x900 fs/reiserfs/namei.c:853 xattr_mkdir fs/reiserfs/xattr.c:77 [inline] create_privroot fs/reiserfs/xattr.c:891 [inline] reiserfs_xattr_init+0x327/0x680 fs/reiserfs/xattr.c:1007 reiserfs_fill_super+0x2205/0x2640 fs/reiserfs/super.c:2174 mount_bdev+0x20a/0x2d0 fs/super.c:1693 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x290 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x82/0x160 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fc5b087e1ea Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007fc5b161eee8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fc5b161ef80 RCX: 00007fc5b087e1ea RDX: 0000000020001100 RSI: 0000000020000040 RDI: 00007fc5b161ef40 RBP: 0000000020001100 R08: 00007fc5b161ef80 R09: 0000000000000080 R10: 0000000000000080 R11: 0000000000000246 R12: 0000000020000040 R13: 00007fc5b161ef40 R14: 00000000000010fa R15: 0000000020000000 The buggy address belongs to the physical page: page: refcount:3 mapcount:0 mapping:ffff888148d3eff8 index:0x213 pfn:0x6d3a6 memcg:ffff88801764c000 aops:def_blk_aops ino:700000 dentry name(?):"" flags: 0xfff00000004104(referenced|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000004104 0000000000000000 dead000000000122 ffff888148d3eff8 raw: 0000000000000213 ffff888056f562b8 00000003ffffffff ffff88801764c000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x148c48(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 5404, tgid 5402 (syz-executor.0), ts 84779913799, free_ts 19780655967 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ee/0x220 mm/page_alloc.c:1541 prep_new_page mm/page_alloc.c:1549 [inline] get_page_from_freelist+0x35f4/0x3740 mm/page_alloc.c:3459 __alloc_pages_noprof+0x261/0x6a0 mm/page_alloc.c:4735 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_pages_noprof mm/mempolicy.c:2345 [inline] folio_alloc_noprof+0x128/0x180 mm/mempolicy.c:2352 filemap_alloc_folio_noprof+0xdf/0x500 mm/filemap.c:1010 __filemap_get_folio+0x446/0xbc0 mm/filemap.c:1952 grow_dev_folio fs/buffer.c:1043 [inline] grow_buffers fs/buffer.c:1109 [inline] __getblk_slow fs/buffer.c:1135 [inline] bdev_getblk+0x1d8/0x550 fs/buffer.c:1437 __getblk include/linux/buffer_head.h:380 [inline] sb_getblk include/linux/buffer_head.h:386 [inline] search_by_key+0x463/0x4810 fs/reiserfs/stree.c:672 reiserfs_read_locked_inode+0x240/0x29b0 fs/reiserfs/inode.c:1543 reiserfs_fill_super+0x1361/0x2640 fs/reiserfs/super.c:2070 mount_bdev+0x20a/0x2d0 fs/super.c:1693 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x290 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1112 [inline] free_unref_page+0xcc2/0xed0 mm/page_alloc.c:2642 free_contig_range+0x152/0x540 mm/page_alloc.c:6750 destroy_args+0x92/0x900 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x4be/0x550 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x248/0x860 init/main.c:1269 do_initcall_level+0x157/0x210 init/main.c:1331 do_initcalls+0x3f/0x80 init/main.c:1347 kernel_init_freeable+0x435/0x5d0 init/main.c:1580 kernel_init+0x1d/0x2b0 init/main.c:1469 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88806d3a6e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806d3a6f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806d3a6f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88806d3a7000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806d3a7080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================