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.5" 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 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+0x823/0x960 fs/reiserfs/namei.c:165 Read of size 4 at addr ffff88807258b004 by task syz-executor182/5062 CPU: 1 PID: 5062 Comm: syz-executor182 Not tainted 6.2.0-rc5-syzkaller-00020-g7bf70dbb1882 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 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 bin_search_in_dir_item fs/reiserfs/namei.c:40 [inline] search_by_entry_key+0x823/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+0x24e/0x490 fs/reiserfs/namei.c:368 __lookup_slow+0x24c/0x460 fs/namei.c:1685 lookup_one_len+0x16e/0x1a0 fs/namei.c:2711 reiserfs_lookup_privroot+0x96/0x290 fs/reiserfs/xattr.c:973 reiserfs_fill_super+0x20e9/0x2e90 fs/reiserfs/super.c:2174 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] __x64_sys_mount+0x283/0x300 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f8f7dec793a 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:00007ffd120c6778 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f8f7dec793a RDX: 0000000020000000 RSI: 0000000020000040 RDI: 00007ffd120c6790 RBP: 00007ffd120c6790 R08: 00007ffd120c67d0 R09: 0000000000000000 R10: 0000000000208000 R11: 0000000000000286 R12: 0000000000000004 R13: 00005555567522c0 R14: 0000000000208000 R15: 00007ffd120c67d0 The buggy address belongs to the physical page: page:ffffea0001c962c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x7258b flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001c96308 ffff8880b99421e0 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 0x8(__GFP_MOVABLE), pid 1, tgid 1 (swapper/0), ts 8796240948, free_ts 9322777396 split_map_pages+0x1ef/0x520 mm/compaction.c:97 isolate_freepages_range+0x313/0x350 mm/compaction.c:735 alloc_contig_range+0x2fa/0x4a0 mm/page_alloc.c:9363 __alloc_contig_pages mm/page_alloc.c:9386 [inline] alloc_contig_pages+0x35e/0x4c0 mm/page_alloc.c:9463 debug_vm_pgtable_alloc_huge_page mm/debug_vm_pgtable.c:1065 [inline] init_args mm/debug_vm_pgtable.c:1188 [inline] debug_vm_pgtable+0x899/0x296f mm/debug_vm_pgtable.c:1226 do_one_initcall+0x141/0x790 init/main.c:1306 do_initcall_level init/main.c:1379 [inline] do_initcalls init/main.c:1395 [inline] do_basic_setup init/main.c:1414 [inline] kernel_init_freeable+0x6f9/0x782 init/main.c:1634 kernel_init+0x1e/0x1d0 init/main.c:1522 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 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+0x1d/0x490 mm/page_alloc.c:3464 free_contig_range+0xb5/0x180 mm/page_alloc.c:9485 destroy_args+0xa8/0x64c mm/debug_vm_pgtable.c:998 debug_vm_pgtable+0x28de/0x296f mm/debug_vm_pgtable.c:1318 do_one_initcall+0x141/0x790 init/main.c:1306 do_initcall_level init/main.c:1379 [inline] do_initcalls init/main.c:1395 [inline] do_basic_setup init/main.c:1414 [inline] kernel_init_freeable+0x6f9/0x782 init/main.c:1634 kernel_init+0x1e/0x1d0 init/main.c:1522 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff88807258af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807258af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807258b000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88807258b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807258b100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================