REISERFS (device loop0): journal params: device loop0, size 15748, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 REISERFS (device loop0): checking transaction log (loop0) REISERFS (device loop0): Using tea hash to sort names ================================================================== BUG: KASAN: out-of-bounds in leaf_paste_entries+0x405/0xa10 fs/reiserfs/lbalance.c:1377 Read of size 18446744073709551584 at addr ffff88806454cfa4 by task syz-executor.0/4082 CPU: 1 PID: 4082 Comm: syz-executor.0 Not tainted 5.18.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0xeb/0x467 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 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_entries+0x405/0xa10 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+0x90cc/0xdb90 fs/reiserfs/do_balan.c:1452 do_balance+0x2ee/0x760 fs/reiserfs/do_balan.c:1888 reiserfs_paste_into_item+0x63c/0x7b0 fs/reiserfs/stree.c:2159 reiserfs_add_entry+0x7fb/0xc50 fs/reiserfs/namei.c:567 reiserfs_mkdir+0x5a3/0x860 fs/reiserfs/namei.c:860 xattr_mkdir fs/reiserfs/xattr.c:76 [inline] create_privroot fs/reiserfs/xattr.c:889 [inline] reiserfs_xattr_init+0x49d/0xb20 fs/reiserfs/xattr.c:1012 reiserfs_fill_super+0x1c78/0x27a0 fs/reiserfs/super.c:2177 mount_bdev+0x2cb/0x3b0 fs/super.c:1367 legacy_get_tree+0xfa/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x7f/0x2c0 fs/super.c:1497 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x7e8/0x1a40 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f4f8708a3ca Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4f88230f88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f4f8708a3ca RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f4f88230fe0 RBP: 00007f4f88231020 R08: 00007f4f88231020 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f4f88230fe0 R15: 00000000200003c0 The buggy address belongs to the physical page: page:ffffea0001915300 refcount:3 mapcount:0 mapping:ffff888147110b80 index:0x3d97 pfn:0x6454c memcg:ffff888079a38000 aops:def_blk_aops ino:700000 flags: 0xfff00000002022(referenced|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002022 0000000000000000 dead000000000122 ffff888147110b80 raw: 0000000000003d97 ffff8880654c7cb0 00000003ffffffff ffff888079a38000 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 4082, tgid 4081 (syz-executor.0), ts 75433652397, free_ts 11092793457 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0x178d/0x3dc0 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408 folio_alloc+0x12/0x40 mm/mempolicy.c:2282 filemap_alloc_folio mm/filemap.c:996 [inline] __filemap_get_folio+0x3c3/0x9e0 mm/filemap.c:1992 pagecache_get_page+0x10/0x1a0 mm/folio-compat.c:126 find_or_create_page include/linux/pagemap.h:615 [inline] grow_dev_page fs/buffer.c:946 [inline] grow_buffers fs/buffer.c:1011 [inline] __getblk_slow+0x18e/0xb50 fs/buffer.c:1038 sb_getblk include/linux/buffer_head.h:326 [inline] search_by_key+0x35c/0x4380 fs/reiserfs/stree.c:672 reiserfs_read_locked_inode+0x144/0x21c0 fs/reiserfs/inode.c:1557 reiserfs_fill_super+0x12e7/0x27a0 fs/reiserfs/super.c:2073 mount_bdev+0x2cb/0x3b0 fs/super.c:1367 legacy_get_tree+0xfa/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x7f/0x2c0 fs/super.c:1497 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x7e8/0x1a40 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1356 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1406 free_unref_page_prepare mm/page_alloc.c:3328 [inline] free_unref_page+0x19/0x6a0 mm/page_alloc.c:3423 free_contig_range+0xb1/0x180 mm/page_alloc.c:9418 destroy_args+0x7e/0x503 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x1fc8/0x204c mm/debug_vm_pgtable.c:1332 do_one_initcall+0xbe/0x440 init/main.c:1298 do_initcall_level init/main.c:1371 [inline] do_initcalls init/main.c:1387 [inline] do_basic_setup init/main.c:1406 [inline] kernel_init_freeable+0x5ab/0x605 init/main.c:1613 kernel_init+0x14/0x130 init/main.c:1502 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Memory state around the buggy address: ffff88806454ce80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806454cf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806454cf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88806454d000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806454d080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================