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 tea 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+0x80b/0x940 fs/reiserfs/namei.c:165 Read of size 4 at addr ffff888055904fc4 by task syz-executor.1/14963 CPU: 2 PID: 14963 Comm: syz-executor.1 Not tainted 6.7.0-rc4-syzkaller-00111-g5e3f5b81de80 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 bin_search_in_dir_item fs/reiserfs/namei.c:40 [inline] search_by_entry_key+0x80b/0x940 fs/reiserfs/namei.c:165 reiserfs_find_entry+0x1dc/0xe70 fs/reiserfs/namei.c:322 reiserfs_lookup+0x1f5/0x690 fs/reiserfs/namei.c:368 __lookup_slow+0x24d/0x450 fs/namei.c:1694 lookup_one_len+0x17d/0x1b0 fs/namei.c:2746 reiserfs_lookup_privroot+0x94/0x200 fs/reiserfs/xattr.c:977 reiserfs_fill_super+0x20f9/0x3160 fs/reiserfs/super.c:2174 mount_bdev+0x1f3/0x2e0 fs/super.c:1650 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8c/0x370 fs/super.c:1771 do_new_mount fs/namespace.c:3337 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3664 do_mount fs/namespace.c:3677 [inline] __do_sys_mount fs/namespace.c:3886 [inline] __se_sys_mount fs/namespace.c:3863 [inline] __ia32_sys_mount+0x291/0x310 fs/namespace.c:3863 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x62/0xe0 arch/x86/entry/common.c:321 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:346 entry_SYSENTER_compat_after_hwframe+0x70/0x7a RIP: 0023:0xf7f65579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7f603f0 EFLAGS: 00000296 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00000000f7f60460 RCX: 0000000020000200 RDX: 00000000200000c0 RSI: 000000000000c006 RDI: 00000000f7f604a0 RBP: 00000000200000c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page:ffffea0001564100 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x55904 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 04fff00000000000 dead000000000100 dead000000000122 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 0x1280a(GFP_NOWAIT|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_NORETRY|__GFP_MOVABLE), pid 109, tgid 109 (kswapd0), ts 79481109377, free_ts 427779598004 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 alloc_zspage mm/zsmalloc.c:997 [inline] zs_malloc+0x3a9/0x1420 mm/zsmalloc.c:1393 zs_zpool_malloc+0x29/0x90 mm/zsmalloc.c:372 zswap_store+0x14f5/0x23d0 mm/zswap.c:1327 swap_writepage+0x8b/0x1e0 mm/page_io.c:198 pageout+0x399/0x9d0 mm/vmscan.c:654 shrink_folio_list+0x2fb0/0x3f00 mm/vmscan.c:1315 evict_folios+0x6e7/0x1b90 mm/vmscan.c:4499 try_to_shrink_lruvec+0x769/0xb00 mm/vmscan.c:4678 shrink_one+0x45f/0x700 mm/vmscan.c:4722 shrink_many mm/vmscan.c:4776 [inline] lru_gen_shrink_node mm/vmscan.c:4893 [inline] shrink_node+0x20cd/0x3790 mm/vmscan.c:5833 kswapd_shrink_node mm/vmscan.c:6638 [inline] balance_pgdat+0x9d2/0x1a90 mm/vmscan.c:6828 kswapd+0x5be/0xbf0 mm/vmscan.c:7088 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487 __folio_put_small mm/swap.c:106 [inline] __folio_put+0xc3/0x110 mm/swap.c:129 folio_put include/linux/mm.h:1483 [inline] migrate_folio_done+0x27a/0x320 mm/migrate.c:1101 migrate_folio_move mm/migrate.c:1324 [inline] migrate_pages_batch+0x18fd/0x2d60 mm/migrate.c:1773 migrate_pages_sync mm/migrate.c:1839 [inline] migrate_pages+0x1b46/0x27e0 mm/migrate.c:1948 compact_zone+0x1dcb/0x3f80 mm/compaction.c:2532 proactive_compact_node+0x118/0x1d0 mm/compaction.c:2797 kcompactd+0x712/0xd80 mm/compaction.c:3113 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Memory state around the buggy address: ffff888055904e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888055904f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888055904f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888055905000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888055905080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi