loop0: detected capacity change from 0 to 32768 JBD2: Ignoring recovery information on journal ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. ================================================================== BUG: KASAN: use-after-free in ocfs2_match fs/ocfs2/dir.c:334 [inline] BUG: KASAN: use-after-free in ocfs2_search_dirblock+0x26b/0x830 fs/ocfs2/dir.c:367 Read of size 1 at addr ffff888012dc4982 by task syz.0.0/5108 CPU: 0 UID: 0 PID: 5108 Comm: syz.0.0 Not tainted 6.11.0-rc3-syzkaller-00156-gd7a5aa4b3c00 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 ocfs2_match fs/ocfs2/dir.c:334 [inline] ocfs2_search_dirblock+0x26b/0x830 fs/ocfs2/dir.c:367 ocfs2_find_entry_id fs/ocfs2/dir.c:414 [inline] ocfs2_find_entry+0x1169/0x2780 fs/ocfs2/dir.c:1078 ocfs2_find_files_on_disk+0xff/0x360 fs/ocfs2/dir.c:1980 ocfs2_lookup_ino_from_name+0xb1/0x1e0 fs/ocfs2/dir.c:2002 ocfs2_lookup+0x292/0xa60 fs/ocfs2/namei.c:122 lookup_open fs/namei.c:3556 [inline] open_last_lookups fs/namei.c:3647 [inline] path_openat+0x11cc/0x3470 fs/namei.c:3883 do_filp_open+0x235/0x490 fs/namei.c:3913 do_sys_openat2+0x13e/0x1d0 fs/open.c:1416 do_sys_open fs/open.c:1431 [inline] __do_sys_openat fs/open.c:1447 [inline] __se_sys_openat fs/open.c:1442 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1442 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f688c5799b9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f688c3f8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f688c715f80 RCX: 00007f688c5799b9 RDX: 0000000000105042 RSI: 0000000020000080 RDI: ffffffffffffff9c RBP: 00007f688c5e78d8 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000001ff R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f688c715f80 R15: 00007ffd03cbfa58 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x56050cc70 pfn:0x12dc4 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 000000056050cc70 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 4586, tgid 4586 (udevd), ts 26057343624, free_ts 85766875049 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3442 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263 folio_alloc_mpol_noprof mm/mempolicy.c:2281 [inline] vma_alloc_folio_noprof+0x12e/0x230 mm/mempolicy.c:2312 folio_prealloc+0x31/0x170 alloc_anon_folio mm/memory.c:4498 [inline] do_anonymous_page mm/memory.c:4555 [inline] do_pte_missing mm/memory.c:3945 [inline] handle_pte_fault+0x2530/0x6eb0 mm/memory.c:5522 __handle_mm_fault mm/memory.c:5665 [inline] handle_mm_fault+0x1029/0x1980 mm/memory.c:5833 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 page last free pid 78 tgid 78 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_folios+0x103a/0x1b00 mm/page_alloc.c:2660 shrink_folio_list+0x2df3/0x8c90 mm/vmscan.c:1463 evict_folios+0x54c7/0x7b60 mm/vmscan.c:4580 try_to_shrink_lruvec+0x9ab/0xbb0 mm/vmscan.c:4775 shrink_one+0x3b9/0x850 mm/vmscan.c:4813 shrink_many mm/vmscan.c:4876 [inline] lru_gen_shrink_node mm/vmscan.c:4954 [inline] shrink_node+0x3799/0x3de0 mm/vmscan.c:5934 kswapd_shrink_node mm/vmscan.c:6762 [inline] balance_pgdat mm/vmscan.c:6954 [inline] kswapd+0x1bcd/0x35a0 mm/vmscan.c:7223 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888012dc4880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888012dc4900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888012dc4980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888012dc4a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888012dc4a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================