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: use-after-free in bin_search_in_dir_item fs/reiserfs/namei.c:40 [inline] BUG: KASAN: use-after-free in search_by_entry_key+0x81f/0x960 fs/reiserfs/namei.c:165 Read of size 4 at addr ffff88807123c714 by task syz-executor213/3608 CPU: 0 PID: 3608 Comm: syz-executor213 Not tainted 6.1.0-rc3-syzkaller-00332-g089d1c31224e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/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:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbb/0x1f0 mm/kasan/report.c:495 bin_search_in_dir_item fs/reiserfs/namei.c:40 [inline] search_by_entry_key+0x81f/0x960 fs/reiserfs/namei.c:165 reiserfs_find_entry.part.0+0x139/0xdf0 fs/reiserfs/namei.c:322 reiserfs_find_entry fs/reiserfs/namei.c:368 [inline] reiserfs_lookup+0x24a/0x490 fs/reiserfs/namei.c:368 __lookup_slow+0x24c/0x460 fs/namei.c:1685 lookup_one_len+0x16a/0x1a0 fs/namei.c:2711 reiserfs_lookup_privroot+0x92/0x280 fs/reiserfs/xattr.c:973 reiserfs_fill_super+0x20e5/0x2e90 fs/reiserfs/super.c:2174 mount_bdev+0x34d/0x410 fs/super.c:1401 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 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:0x7fe91db8d1ca Code: 48 c7 c2 c0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 98 03 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:00007ffce06b5608 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe91db8d1ca RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffce06b5620 RBP: 00007ffce06b5620 R08: 00007ffce06b5660 R09: 0000000000000000 R10: 0000000000200080 R11: 0000000000000286 R12: 0000000000000004 R13: 00007ffce06b5660 R14: 0000000000000006 R15: 0000000020000350 The buggy address belongs to the physical page: page:ffffea0001c48f00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x7123c flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001c48f48 ffff8880b9a408a0 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 3601, tgid 3601 (scp), ts 39658536333, free_ts 39704888564 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4288 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5555 __folio_alloc+0x12/0x40 mm/page_alloc.c:5587 vma_alloc_folio+0xf9/0x780 mm/mempolicy.c:2246 alloc_page_vma include/linux/gfp.h:270 [inline] do_cow_fault mm/memory.c:4573 [inline] do_fault mm/memory.c:4685 [inline] handle_pte_fault mm/memory.c:4955 [inline] __handle_mm_fault+0xeb8/0x3a40 mm/memory.c:5097 handle_mm_fault+0x1c8/0x780 mm/memory.c:5218 do_user_addr_fault+0x475/0x1210 arch/x86/mm/fault.c:1428 handle_page_fault arch/x86/mm/fault.c:1519 [inline] exc_page_fault+0x94/0x170 arch/x86/mm/fault.c:1575 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page_list+0x172/0xc40 mm/page_alloc.c:3529 release_pages+0xc86/0x1360 mm/swap.c:1055 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:3101 __mmput+0x128/0x4c0 kernel/fork.c:1185 mmput+0x5c/0x70 kernel/fork.c:1207 exit_mm kernel/exit.c:516 [inline] do_exit+0xa39/0x2a20 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: ffff88807123c600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807123c680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88807123c700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88807123c780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807123c800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================