REISERFS warning: read_super_block: reiserfs filesystem is deprecated and scheduled to be removed from the kernel in 2025 REISERFS (device loop1): found reiserfs format "3.5" with non-standard journal REISERFS (device loop1): using ordered data mode reiserfs: using flush barriers REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop1): Using r5 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+0x575/0x1380 fs/reiserfs/namei.c:165 Read of size 4 at addr ffff8880503941c4 by task syz-executor.1/5300 CPU: 0 PID: 5300 Comm: syz-executor.1 Not tainted 6.1.28-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 bin_search_in_dir_item fs/reiserfs/namei.c:40 [inline] search_by_entry_key+0x575/0x1380 fs/reiserfs/namei.c:165 reiserfs_find_entry+0xf47/0x19b0 fs/reiserfs/namei.c:322 reiserfs_lookup+0x1e6/0x4b0 fs/reiserfs/namei.c:368 __lookup_slow+0x27e/0x3d0 fs/namei.c:1685 lookup_one_len+0x187/0x2d0 fs/namei.c:2711 reiserfs_lookup_privroot+0x85/0x1e0 fs/reiserfs/xattr.c:973 reiserfs_fill_super+0x1957/0x2620 fs/reiserfs/super.c:2192 mount_bdev+0x26d/0x3a0 fs/super.c:1423 legacy_get_tree+0xeb/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 fs/super.c:1553 do_new_mount+0x28b/0xad0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1337a8d69a Code: 48 c7 c2 b8 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f13387bff88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 000000000000111b RCX: 00007f1337a8d69a RDX: 0000000020000080 RSI: 0000000020000140 RDI: 00007f13387bffe0 RBP: 00007f13387c0020 R08: 00007f13387c0020 R09: 000000000120c083 R10: 000000000120c083 R11: 0000000000000202 R12: 0000000020000080 R13: 0000000020000140 R14: 00007f13387bffe0 R15: 0000000020003a00 The buggy address belongs to the physical page: page:ffffea000140e500 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x50394 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea000140e708 ffffea000140df08 0000000000000000 raw: 0000000000000001 0000000000000002 00000000ffffff7f 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 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), pid 3550, tgid 3540 (syz-fuzzer), ts 190038896512, free_ts 400768699657 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533 prep_new_page mm/page_alloc.c:2540 [inline] get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5559 __folio_alloc+0xf/0x30 mm/page_alloc.c:5591 vma_alloc_folio+0x486/0x990 mm/mempolicy.c:2241 alloc_page_vma include/linux/gfp.h:284 [inline] do_anonymous_page mm/memory.c:4123 [inline] handle_pte_fault mm/memory.c:4962 [inline] __handle_mm_fault mm/memory.c:5106 [inline] handle_mm_fault+0x2e85/0x5330 mm/memory.c:5227 do_user_addr_fault arch/x86/mm/fault.c:1428 [inline] handle_page_fault arch/x86/mm/fault.c:1519 [inline] exc_page_fault+0x58d/0x790 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:1460 [inline] free_pcp_prepare mm/page_alloc.c:1510 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3388 free_unref_page_list+0x107/0x810 mm/page_alloc.c:3530 release_pages+0x2836/0x2b40 mm/swap.c:1055 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu+0xfc/0x210 mm/mmu_gather.c:261 tlb_finish_mmu+0xce/0x1f0 mm/mmu_gather.c:361 zap_page_range_single+0x470/0x530 mm/memory.c:1786 madvise_dontneed_single_vma mm/madvise.c:793 [inline] madvise_dontneed_free mm/madvise.c:886 [inline] madvise_vma_behavior mm/madvise.c:1025 [inline] madvise_walk_vmas mm/madvise.c:1250 [inline] do_madvise+0x21f9/0x43a0 mm/madvise.c:1429 __do_sys_madvise mm/madvise.c:1442 [inline] __se_sys_madvise mm/madvise.c:1440 [inline] __x64_sys_madvise+0xa1/0xb0 mm/madvise.c:1440 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888050394080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888050394100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888050394180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888050394200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888050394280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================