================================================================== BUG: KASAN: slab-use-after-free in jfs_readdir+0x10a8/0x33f0 fs/jfs/jfs_dtree.c:2878 Read of size 8 at addr ffff8880351858b8 by task syz.6.1114/17905 CPU: 1 UID: 0 PID: 17905 Comm: syz.6.1114 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 jfs_readdir+0x10a8/0x33f0 fs/jfs/jfs_dtree.c:2878 wrap_directory_iterator+0x99/0xe0 fs/readdir.c:67 iterate_dir+0x2f1/0x4e0 fs/readdir.c:110 __do_sys_getdents fs/readdir.c:319 [inline] __se_sys_getdents+0xf1/0x270 fs/readdir.c:304 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f980890de99 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:00007f9806b66028 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f9808b95fa0 RCX: 00007f980890de99 RDX: 0000000000000058 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 00007f98089a3eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9808b96038 R14: 00007f9808b95fa0 R15: 00007fffcda0a608 Allocated by task 17905: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4584 [inline] slab_alloc_node mm/slub.c:4917 [inline] kmem_cache_alloc_noprof+0x355/0x650 mm/slub.c:4931 mempool_alloc_noprof+0x1c5/0x300 mm/mempool.c:559 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x4ed/0xdf0 fs/jfs/jfs_metapage.c:761 dtSplitRoot+0x216/0x1900 fs/jfs/jfs_dtree.c:1907 dtSplitUp fs/jfs/jfs_dtree.c:990 [inline] dtInsert+0xedd/0x5cb0 fs/jfs/jfs_dtree.c:868 jfs_mkdir+0x76b/0xb00 fs/jfs/namei.c:271 vfs_mkdir+0x402/0x620 fs/namei.c:5276 filename_mkdirat+0x289/0x520 fs/namei.c:5309 __do_sys_mkdirat fs/namei.c:5330 [inline] __se_sys_mkdirat+0x35/0x150 fs/namei.c:5327 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 17905: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2677 [inline] slab_free mm/slub.c:6377 [inline] kmem_cache_free+0x187/0x6c0 mm/slub.c:6504 mempool_free+0xf5/0x140 mm/mempool.c:704 free_metapage fs/jfs/jfs_metapage.c:280 [inline] drop_metapage fs/jfs/jfs_metapage.c:317 [inline] release_metapage+0x7eb/0xa50 fs/jfs/jfs_metapage.c:893 dtReadNext fs/jfs/jfs_dtree.c:3199 [inline] jfs_readdir+0xe35/0x33f0 fs/jfs/jfs_dtree.c:2871 wrap_directory_iterator+0x99/0xe0 fs/readdir.c:67 iterate_dir+0x2f1/0x4e0 fs/readdir.c:110 __do_sys_getdents fs/readdir.c:319 [inline] __se_sys_getdents+0xf1/0x270 fs/readdir.c:304 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888035185888 which belongs to the cache jfs_mp of size 248 The buggy address is located 48 bytes inside of freed 248-byte region [ffff888035185888, ffff888035185980) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x35185 flags: 0x80000000000000(node=0|zone=1) page_type: f5(slab) raw: 0080000000000000 ffff888140a9b280 dead000000000100 dead000000000122 raw: 0000000000000000 00000008000d000d 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 11634, tgid 11633 (syz.3.584), ts 678722380366, free_ts 678275980210 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0x262a/0x26a0 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3266 [inline] allocate_slab+0x79/0x5e0 mm/slub.c:3380 new_slab mm/slub.c:3426 [inline] refill_objects+0x2d8/0x350 mm/slub.c:7310 refill_sheaf mm/slub.c:2804 [inline] __pcs_replace_empty_main+0x330/0x690 mm/slub.c:4675 alloc_from_pcs mm/slub.c:4773 [inline] slab_alloc_node mm/slub.c:4905 [inline] kmem_cache_alloc_noprof+0x452/0x650 mm/slub.c:4931 mempool_alloc_noprof+0x1c5/0x300 mm/mempool.c:559 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x4ed/0xdf0 fs/jfs/jfs_metapage.c:761 diReadSpecial+0x24f/0x710 fs/jfs/jfs_imap.c:447 jfs_mount+0x73/0x870 fs/jfs/jfs_mount.c:87 jfs_fill_super+0x69f/0xda0 fs/jfs/super.c:524 get_tree_bdev_flags+0x430/0x4f0 fs/super.c:1634 vfs_get_tree+0x92/0x2a0 fs/super.c:1694 fc_mount fs/namespace.c:1198 [inline] do_new_mount_fc fs/namespace.c:3765 [inline] do_new_mount+0x319/0xdc0 fs/namespace.c:3841 do_mount fs/namespace.c:4174 [inline] __do_sys_mount fs/namespace.c:4390 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4367 page last free pid 20 tgid 20 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x10e7/0x11c0 mm/page_alloc.c:2950 __tlb_remove_table_free mm/mmu_gather.c:228 [inline] tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:291 rcu_do_batch kernel/rcu/tree.c:2645 [inline] rcu_core kernel/rcu/tree.c:2897 [inline] rcu_cpu_kthread+0x950/0x1480 kernel/rcu/tree.c:2985 smpboot_thread_fn+0x57c/0xa80 kernel/smpboot.c:160 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888035185780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888035185800: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc >ffff888035185880: fc fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888035185900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888035185980: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================