REISERFS warning: read_super_block: reiserfs filesystem is deprecated and scheduled to be removed from the kernel in 2025 REISERFS (device loop0): found reiserfs format "3.6" with non-standard journal REISERFS (device loop0): using ordered data mode reiserfs: using flush barriers 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 rupasov hash to sort names ================================================================== BUG: KASAN: out-of-bounds in leaf_paste_entries+0x449/0x910 fs/reiserfs/lbalance.c:1377 Read of size 18446744073709551585 at addr ffff888071805fa4 by task syz-executor987/3602 CPU: 1 PID: 3602 Comm: syz-executor987 Not tainted 6.1.0-rc1-next-20221021-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:253 [inline] print_report+0x15e/0x45d mm/kasan/report.c:364 kasan_report+0xbb/0x1f0 mm/kasan/report.c:464 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+0x449/0x910 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+0x917d/0xde40 fs/reiserfs/do_balan.c:1452 do_balance+0x315/0x810 fs/reiserfs/do_balan.c:1888 reiserfs_paste_into_item+0x763/0x8e0 fs/reiserfs/stree.c:2159 reiserfs_add_entry+0x8cb/0xcf0 fs/reiserfs/namei.c:567 reiserfs_mkdir+0x675/0x980 fs/reiserfs/namei.c:860 xattr_mkdir fs/reiserfs/xattr.c:76 [inline] create_privroot fs/reiserfs/xattr.c:882 [inline] reiserfs_xattr_init+0x57a/0xc30 fs/reiserfs/xattr.c:1005 reiserfs_fill_super+0x2127/0x2e90 fs/reiserfs/super.c:2175 mount_bdev+0x34d/0x410 fs/super.c:1401 legacy_get_tree+0x105/0x220 fs/fs_context.c:617 vfs_get_tree+0x89/0x2f0 fs/super.c:1531 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 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+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fe0698012aa Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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:00007ffd0ebfcff8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe0698012aa RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffd0ebfd010 RBP: 00007ffd0ebfd010 R08: 00007ffd0ebfd050 R09: 00005555571952c0 R10: 0000000000000000 R11: 0000000000000286 R12: 0000000000000004 R13: 00007ffd0ebfd050 R14: 0000000000000006 R15: 0000000020000290 The buggy address belongs to the physical page: page:ffffea0001c60140 refcount:3 mapcount:0 mapping:ffff88801b3e75f8 index:0x213 pfn:0x71805 memcg:ffff88813fe50000 aops:def_blk_aops ino:700000 flags: 0xfff00000002022(referenced|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002022 0000000000000000 dead000000000122 ffff88801b3e75f8 raw: 0000000000000213 ffff88807435e658 00000003ffffffff ffff88813fe50000 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 3602, tgid 3602 (syz-executor987), ts 50005929875, free_ts 44495089544 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4287 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5546 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2285 folio_alloc+0x1c/0x70 mm/mempolicy.c:2295 filemap_alloc_folio+0x306/0x3a0 mm/filemap.c:971 __filemap_get_folio+0x328/0xd90 mm/filemap.c:1965 pagecache_get_page+0x2a/0x280 mm/folio-compat.c:110 find_or_create_page include/linux/pagemap.h:612 [inline] grow_dev_page fs/buffer.c:946 [inline] grow_buffers fs/buffer.c:1011 [inline] __getblk_slow+0x1f4/0xfb0 fs/buffer.c:1038 __getblk_gfp+0x6e/0x80 fs/buffer.c:1333 sb_getblk include/linux/buffer_head.h:356 [inline] search_by_key+0x3a8/0x3bf0 fs/reiserfs/stree.c:672 reiserfs_read_locked_inode+0x154/0x2160 fs/reiserfs/inode.c:1549 reiserfs_fill_super+0x126f/0x2e90 fs/reiserfs/super.c:2071 mount_bdev+0x34d/0x410 fs/super.c:1401 legacy_get_tree+0x105/0x220 fs/fs_context.c:617 vfs_get_tree+0x89/0x2f0 fs/super.c:1531 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1458 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1508 free_unref_page_prepare mm/page_alloc.c:3386 [inline] free_unref_page_list+0x172/0xc40 mm/page_alloc.c:3528 release_pages+0x35b/0x12d0 mm/swap.c:1065 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:59 tlb_flush_mmu_free mm/mmu_gather.c:256 [inline] tlb_flush_mmu mm/mmu_gather.c:263 [inline] tlb_finish_mmu+0x147/0x7e0 mm/mmu_gather.c:363 exit_mmap+0x1fe/0x7a0 mm/mmap.c:3098 __mmput+0x128/0x4c0 kernel/fork.c:1188 mmput+0x5c/0x70 kernel/fork.c:1210 exit_mm kernel/exit.c:516 [inline] do_exit+0xa39/0x29a0 kernel/exit.c:807 do_group_exit+0xd0/0x2a0 kernel/exit.c:950 __do_sys_exit_group kernel/exit.c:961 [inline] __se_sys_exit_group kernel/exit.c:959 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:959 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888071805e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071805f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888071805f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888071806000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888071806080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================