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 ffff888065608fa4 by task syz-executor359/4012 CPU: 0 PID: 4012 Comm: syz-executor359 Tainted: G W 5.17.0-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:3039 [inline] path_mount+0x7e8/0x1a40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3590 [inline] __se_sys_mount fs/namespace.c:3567 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3567 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:0x7f1402950d0a Code: 48 c7 c2 c0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 a8 00 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffdfe5dea88 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffdfe5deae0 RCX: 00007f1402950d0a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffdfe5deaa0 RBP: 00007ffdfe5deaa0 R08: 00007ffdfe5deae0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000286 R12: 00000000200002a8 R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000007 The buggy address belongs to the physical page: page:ffffea0001958200 refcount:3 mapcount:0 mapping:ffff888017166880 index:0x3d97 pfn:0x65608 memcg:ffff888010514000 aops:def_blk_aops ino:700000 flags: 0xfff00000002022(referenced|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002022 0000000000000000 dead000000000122 ffff888017166880 raw: 0000000000003d97 ffff888065c49570 00000003ffffffff ffff888010514000 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 4012, tgid 4012 (syz-executor359), ts 58245428527, free_ts 8614534900 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0x178d/0x3da0 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408 folio_alloc+0x12/0x40 mm/mempolicy.c:2272 filemap_alloc_folio mm/filemap.c:996 [inline] __filemap_get_folio+0x3c3/0x9e0 mm/filemap.c:1998 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:3039 [inline] path_mount+0x7e8/0x1a40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3590 [inline] __se_sys_mount fs/namespace.c:3567 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3567 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/0x690 mm/page_alloc.c:3423 free_contig_range+0xb1/0x180 mm/page_alloc.c:9417 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: ffff888065608e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888065608f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888065608f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888065609000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888065609080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================