================================================================== BUG: KASAN: use-after-free in ciCompare fs/jfs/jfs_dtree.c:3428 [inline] BUG: KASAN: use-after-free in dtSearch+0x16b4/0x21b0 fs/jfs/jfs_dtree.c:645 Read of size 1 at addr ffff88805cd583e4 by task syz.5.251/7620 CPU: 1 UID: 0 PID: 7620 Comm: syz.5.251 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 ciCompare fs/jfs/jfs_dtree.c:3428 [inline] dtSearch+0x16b4/0x21b0 fs/jfs/jfs_dtree.c:645 jfs_lookup+0x1b0/0x420 fs/jfs/namei.c:1461 lookup_open fs/namei.c:4422 [inline] open_last_lookups fs/namei.c:4549 [inline] path_openat+0x13db/0x3e70 fs/namei.c:4793 do_filp_open+0x22d/0x490 fs/namei.c:4823 do_sys_openat2+0x12f/0x220 fs/open.c:1430 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1447 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5174c6aeb9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5172ea5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f5174ee6090 RCX: 00007f5174c6aeb9 RDX: 00000000000c4042 RSI: 0000200000000300 RDI: ffffffffffffff9c RBP: 00007f5174cd8c1f R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000001ff R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5174ee6128 R14: 00007f5174ee6090 R15: 00007ffd448f6ca8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88805cd58fc8 pfn:0x5cd58 flags: 0x80000000000000(node=0|zone=1) raw: 0080000000000000 ffffea00017b54c8 ffffea0001735648 0000000000000000 raw: ffff88805cd58fc8 0000000000660000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x52c50(GFP_NOFS|__GFP_RECLAIMABLE|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 7268, tgid 7267 (syz.4.202), ts 201590380534, free_ts 214803603572 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x228/0x280 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0x28bb/0x2950 mm/page_alloc.c:3945 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5240 alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3a0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xaf8/0x13d0 mm/slub.c:4656 __slab_alloc+0xc5/0x1f0 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] kmem_cache_alloc_noprof+0x100/0x6a0 mm/slub.c:5270 f2fs_kmem_cache_alloc_nofail fs/f2fs/f2fs.h:3023 [inline] f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:3033 [inline] add_free_nid+0xd8/0xb10 fs/f2fs/node.c:2378 scan_nat_page fs/f2fs/node.c:2479 [inline] __f2fs_build_free_nids fs/f2fs/node.c:2585 [inline] f2fs_build_free_nids+0xcf0/0x1260 fs/f2fs/node.c:2631 f2fs_fill_super+0x4363/0x6e30 fs/f2fs/super.c:5101 get_tree_bdev_flags+0x431/0x4f0 fs/super.c:1691 vfs_get_tree+0x92/0x2a0 fs/super.c:1751 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3636 [inline] do_new_mount+0x329/0xa50 fs/namespace.c:3712 do_mount fs/namespace.c:4035 [inline] __do_sys_mount fs/namespace.c:4224 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4201 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94 page last free pid 5971 tgid 5971 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xfd0/0x1160 mm/page_alloc.c:2973 discard_slab mm/slub.c:3346 [inline] __put_partials+0x149/0x170 mm/slub.c:3886 __slab_free+0x2af/0x330 mm/slub.c:5956 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_noprof+0x188/0x6a0 mm/slub.c:5270 getname_flags+0xb7/0x540 fs/namei.c:146 getname include/linux/fs.h:2500 [inline] getname_maybe_null include/linux/fs.h:2507 [inline] vfs_fstatat+0x43/0x170 fs/stat.c:370 __do_sys_newfstatat fs/stat.c:542 [inline] __se_sys_newfstatat fs/stat.c:536 [inline] __x64_sys_newfstatat+0x151/0x200 fs/stat.c:536 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88805cd58280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805cd58300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88805cd58380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88805cd58400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805cd58480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================