REISERFS (device loop3): Using r5 hash to sort names ================================================================== BUG: KASAN: out-of-bounds in leaf_paste_entries+0x44d/0x910 fs/reiserfs/lbalance.c:1377 Read of size 18446744073709551586 at addr ffff88802858bfa4 by task syz-executor.3/7671 CPU: 2 PID: 7671 Comm: syz-executor.3 Not tainted 6.2.0-rc2-syzkaller-00203-g1f5abbd77e2c #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x45d mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x141/0x190 mm/kasan/generic.c:189 memmove+0x24/0x60 mm/kasan/shadow.c:54 leaf_paste_entries+0x44d/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+0x319/0x810 fs/reiserfs/do_balan.c:1888 reiserfs_paste_into_item+0x767/0x8e0 fs/reiserfs/stree.c:2159 reiserfs_add_entry+0x8cb/0xcf0 fs/reiserfs/namei.c:567 reiserfs_mkdir+0x683/0x990 fs/reiserfs/namei.c:862 xattr_mkdir fs/reiserfs/xattr.c:76 [inline] create_privroot fs/reiserfs/xattr.c:882 [inline] reiserfs_xattr_init+0x57e/0xc30 fs/reiserfs/xattr.c:1005 reiserfs_fill_super+0x212b/0x2e90 fs/reiserfs/super.c:2175 mount_bdev+0x351/0x410 fs/super.c:1359 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489 do_new_mount fs/namespace.c:3145 [inline] path_mount+0x132a/0x1e20 fs/namespace.c:3475 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount fs/namespace.c:3674 [inline] __ia32_sys_mount+0x282/0x300 fs/namespace.c:3674 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7f53549 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7f4e410 EFLAGS: 00000296 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00000000f7f4e480 RCX: 0000000020000040 RDX: 0000000020001100 RSI: 0000000000000080 RDI: 00000000f7f4e4c0 RBP: 00000000f7f4e4c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page:ffffea0000a162c0 refcount:2 mapcount:0 mapping:ffff888019b55ff8 index:0x213 pfn:0x2858b memcg:ffff8880159a8000 aops:def_blk_aops ino:700003 flags: 0xfff00000002032(referenced|lru|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002032 ffffea0000a16288 ffffea000098b3c8 ffff888019b55ff8 raw: 0000000000000213 ffff888012b27000 00000002ffffffff ffff8880159a8000 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 7671, tgid 7668 (syz-executor.3), ts 341272555936, free_ts 340291187812 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages_slowpath.constprop.0+0x36b/0x23d0 mm/page_alloc.c:5084 __alloc_pages+0x4aa/0x5b0 mm/page_alloc.c:5562 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2286 folio_alloc+0x20/0x70 mm/mempolicy.c:2296 filemap_alloc_folio+0x362/0x450 mm/filemap.c:972 __filemap_get_folio+0x32c/0xd80 mm/filemap.c:1966 pagecache_get_page+0x2e/0x280 mm/folio-compat.c:98 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/0x1030 fs/buffer.c:1038 __getblk_gfp+0x72/0x80 fs/buffer.c:1333 sb_getblk include/linux/buffer_head.h:356 [inline] search_by_key+0x3ac/0x3bf0 fs/reiserfs/stree.c:672 reiserfs_read_locked_inode+0x158/0x2160 fs/reiserfs/inode.c:1549 reiserfs_fill_super+0x1273/0x2e90 fs/reiserfs/super.c:2071 mount_bdev+0x351/0x410 fs/super.c:1359 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page_list+0x176/0xcd0 mm/page_alloc.c:3510 release_pages+0xcb1/0x1330 mm/swap.c:1076 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:97 zap_pte_range mm/memory.c:1480 [inline] zap_pmd_range mm/memory.c:1529 [inline] zap_pud_range mm/memory.c:1558 [inline] zap_p4d_range mm/memory.c:1579 [inline] unmap_page_range+0x2258/0x3c30 mm/memory.c:1600 unmap_single_vma+0x190/0x2a0 mm/memory.c:1646 unmap_vmas+0x226/0x370 mm/memory.c:1685 exit_mmap+0x18d/0x7b0 mm/mmap.c:3085 __mmput+0x128/0x4c0 kernel/fork.c:1207 mmput+0x60/0x70 kernel/fork.c:1229 exit_mm kernel/exit.c:563 [inline] do_exit+0x9ac/0x2950 kernel/exit.c:854 do_group_exit+0xd4/0x2a0 kernel/exit.c:1012 __do_sys_exit_group kernel/exit.c:1023 [inline] __se_sys_exit_group kernel/exit.c:1021 [inline] __ia32_sys_exit_group+0x3e/0x50 kernel/exit.c:1021 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Memory state around the buggy address: ffff88802858be80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802858bf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802858bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88802858c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802858c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 03 74 c0 01 add 0x1(%rax,%rax,8),%esi 4: 10 05 03 74 b8 01 adc %al,0x1b87403(%rip) # 0x1b8740d a: 10 06 adc %al,(%rsi) c: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 10: 10 07 adc %al,(%rdi) 12: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi 16: 10 08 adc %cl,(%rax) 18: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1c: 00 00 add %al,(%rax) 1e: 00 00 add %al,(%rax) 20: 00 51 52 add %dl,0x52(%rcx) 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 retq 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 39: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi