REISERFS (device loop0): checking transaction log (loop0) REISERFS (device loop0): Using r5 hash to sort names REISERFS (device loop0): using 3.5.x disk format ================================================================== 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 ffff888072254014 by task syz-executor207/3615 CPU: 0 PID: 3615 Comm: syz-executor207 Not tainted 6.0.0-rc3-next-20220901-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/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:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 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+0x2195/0x2f80 fs/reiserfs/super.c:2176 mount_bdev+0x34d/0x410 fs/super.c:1400 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 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:0x7fa268c6ec7a Code: 48 c7 c2 c0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 a8 00 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:00007ffd81f6c058 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffd81f6c0b0 RCX: 00007fa268c6ec7a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffd81f6c070 RBP: 00007ffd81f6c070 R08: 00007ffd81f6c0b0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000286 R12: 00000000200000a0 R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000004 The buggy address belongs to the physical page: page:ffffea0001c89500 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x72254 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001c89548 ffff8880b9a40520 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 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), pid 3613, tgid 3613 (udevd), ts 40509110595, free_ts 40511150194 prep_new_page mm/page_alloc.c:2534 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4284 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5542 __folio_alloc+0x12/0x40 mm/page_alloc.c:5573 vma_alloc_folio+0xf9/0x780 mm/mempolicy.c:2241 alloc_page_vma include/linux/gfp.h:293 [inline] do_anonymous_page mm/memory.c:4092 [inline] handle_pte_fault mm/memory.c:4925 [inline] __handle_mm_fault+0x178c/0x3a40 mm/memory.c:5069 handle_mm_fault+0x1c8/0x780 mm/memory.c:5190 do_user_addr_fault+0x475/0x1210 arch/x86/mm/fault.c:1407 handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x94/0x170 arch/x86/mm/fault.c:1554 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:1451 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1501 free_unref_page_prepare mm/page_alloc.c:3382 [inline] free_unref_page_list+0x16f/0xb90 mm/page_alloc.c:3524 release_pages+0xc6c/0x1590 mm/swap.c:1056 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:58 tlb_flush_mmu_free mm/mmu_gather.c:255 [inline] tlb_flush_mmu mm/mmu_gather.c:262 [inline] tlb_finish_mmu+0x147/0x7e0 mm/mmu_gather.c:353 unmap_region+0x26a/0x300 mm/mmap.c:2190 do_mas_align_munmap+0x851/0xee0 mm/mmap.c:2443 do_mas_munmap+0x26a/0x2b0 mm/mmap.c:2501 __vm_munmap+0x14f/0x290 mm/mmap.c:2772 __do_sys_munmap mm/mmap.c:2797 [inline] __se_sys_munmap mm/mmap.c:2794 [inline] __x64_sys_munmap+0x55/0x80 mm/mmap.c:2794 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: ffff888072253f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888072253f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888072254000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888072254080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888072254100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================