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 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 ffff888072a58004 by task syz-executor.0/5421 CPU: 0 PID: 5421 Comm: syz-executor.0 Not tainted 6.10.0-rc6-syzkaller-00051-g1dfe225e9af5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x23d/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x165/0x540 mm/kasan/report.c:488 kasan_report+0x13f/0x180 mm/kasan/report.c:601 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+0xf4d/0x19c0 fs/reiserfs/namei.c:322 reiserfs_lookup+0x1de/0x580 fs/reiserfs/namei.c:368 __lookup_slow+0x288/0x3f0 fs/namei.c:1692 lookup_one_len+0x187/0x2d0 fs/namei.c:2764 reiserfs_lookup_privroot+0x85/0x180 fs/reiserfs/xattr.c:977 reiserfs_fill_super+0x195b/0x2620 fs/reiserfs/super.c:2191 mount_bdev+0x206/0x2d0 fs/super.c:1668 legacy_get_tree+0xea/0x190 fs/fs_context.c:662 vfs_get_tree+0x8c/0x280 fs/super.c:1789 do_new_mount+0x2ba/0xb40 fs/namespace.c:3352 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x7e/0x180 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f891f47e05a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f892027dee8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f892027df80 RCX: 00007f891f47e05a RDX: 0000000020000140 RSI: 0000000020000340 RDI: 00007f892027df40 RBP: 0000000020000140 R08: 00007f892027df80 R09: 000000000120c083 R10: 000000000120c083 R11: 0000000000000246 R12: 0000000020000340 R13: 00007f892027df40 R14: 0000000000001120 R15: 0000000020000380 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x2c pfn:0x72a58 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001ca9d88 ffffea0001ca9a88 0000000000000000 raw: 000000000000002c 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 5425, tgid 5425 (sed), ts 100819874052, free_ts 100849977577 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1df/0x220 mm/page_alloc.c:1473 prep_new_page mm/page_alloc.c:1481 [inline] get_page_from_freelist+0x2de6/0x2ea0 mm/page_alloc.c:3425 __alloc_pages_noprof+0x252/0x6a0 mm/page_alloc.c:4683 alloc_pages_mpol_noprof+0x3e4/0x670 mm/mempolicy.c:2265 vma_alloc_folio_noprof+0xef/0x1f0 mm/mempolicy.c:2304 folio_prealloc+0x31/0x170 do_cow_fault mm/memory.c:4945 [inline] do_fault mm/memory.c:5053 [inline] do_pte_missing mm/memory.c:3897 [inline] handle_pte_fault+0xd79/0x6f10 mm/memory.c:5381 __handle_mm_fault mm/memory.c:5524 [inline] handle_mm_fault+0x10db/0x1b70 mm/memory.c:5689 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x3e8/0x7e0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:623 page last free pid 5425 tgid 5425 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1093 [inline] free_unref_folios+0xef5/0x1980 mm/page_alloc.c:2637 folios_put_refs+0x92e/0xa50 mm/swap.c:1024 free_pages_and_swap_cache+0x2e6/0x690 mm/swap_state.c:329 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x39f/0x670 mm/mmu_gather.c:373 tlb_finish_mmu+0xd0/0x1f0 mm/mmu_gather.c:465 exit_mmap+0x44b/0xc40 mm/mmap.c:3354 __mmput+0x115/0x3c0 kernel/fork.c:1346 exit_mm+0x21c/0x300 kernel/exit.c:565 do_exit+0x9a6/0x27d0 kernel/exit.c:861 do_group_exit+0x203/0x2b0 kernel/exit.c:1023 __do_sys_exit_group kernel/exit.c:1034 [inline] __se_sys_exit_group kernel/exit.c:1032 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x7e/0x180 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e Memory state around the buggy address: ffff888072a57f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888072a57f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888072a58000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888072a58080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888072a58100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================