================================================================== BUG: KASAN: slab-use-after-free in jfs_readdir+0x10a8/0x33f0 fs/jfs/jfs_dtree.c:2878 Read of size 8 at addr ffff888033856b28 by task syz.1.56/6040 CPU: 0 UID: 0 PID: 6040 Comm: syz.1.56 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f90deb0e0d9 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:00007f90dcd66028 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f90ded95fa0 RCX: 00007f90deb0e0d9 RDX: 0000000000000058 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 00007f90deba5024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f90ded96038 R14: 00007f90ded95fa0 R15: 00007ffe9be8ebe8 Allocated by task 6040: 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:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] kmem_cache_alloc_noprof+0x360/0x690 mm/slub.c:5010 mempool_alloc_noprof+0x1c5/0x300 mm/mempool.c:572 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_create+0x730/0xae0 fs/jfs/namei.c:138 lookup_open+0xc17/0x1a60 fs/namei.c:4567 open_last_lookups fs/namei.c:4767 [inline] path_openat+0x67c/0x1d60 fs/namei.c:4997 do_file_open+0x23e/0x4a0 fs/namei.c:5029 do_sys_openat2+0x115/0x200 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6040: 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:2748 [inline] slab_free mm/slub.c:6499 [inline] kmem_cache_free+0x187/0x6d0 mm/slub.c:6626 mempool_free+0xf5/0x140 mm/mempool.c:717 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:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888033856af8 which belongs to the cache jfs_mp of size 248 The buggy address is located 48 bytes inside of freed 248-byte region [ffff888033856af8, ffff888033856bf0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888033856ea0 pfn:0x33856 flags: 0x80000000000200(workingset|node=0|zone=1) page_type: f5(slab) raw: 0080000000000200 ffff88801d3e8140 ffff88801d3dff88 ffff88801d3dff88 raw: ffff888033856ea0 00000002000d000c 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the pag 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 6040, tgid 6039 (syz.1.56), ts 136075692669 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2591/0x2600 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x230/0x5c0 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab+0x7d/0x620 mm/slub.c:3462 new_slab mm/slub.c:3513 [inline] refill_objects+0x2d8/0x350 mm/slub.c:7410 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x339/0x690 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] kmem_cache_alloc_noprof+0x45d/0x690 mm/slub.c:5010 mempool_alloc_noprof+0x1c5/0x300 mm/mempool.c:572 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x4ed/0xdf0 fs/jfs/jfs_metapage.c:761 diIAGRead fs/jfs/jfs_imap.c:2672 [inline] diAlloc+0x862/0x1690 fs/jfs/jfs_imap.c:1392 ialloc+0x8c/0x8e0 fs/jfs/jfs_inode.c:56 jfs_create+0x1d8/0xae0 fs/jfs/namei.c:93 lookup_open+0xc17/0x1a60 fs/namei.c:4567 open_last_lookups fs/namei.c:4767 [inline] path_openat+0x67c/0x1d60 fs/namei.c:4997 do_file_open+0x23e/0x4a0 fs/namei.c:5029 do_sys_openat2+0x115/0x200 fs/open.c:1417 page last free pid 5585 tgid 5585 ts 134318351178 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] free_unref_folios+0xd0f/0x1950 mm/page_alloc.c:3022 folios_put_refs+0x815/0x920 mm/folio.c:1055 folio_batch_release include/linux/folio_batch.h:101 [inline] truncate_inode_pages_range+0x3cd/0xd80 mm/truncate.c:408 jfs_put_super+0x12c/0x190 fs/jfs/super.c:200 generic_shutdown_super+0x13d/0x2d0 fs/super.c:769 kill_block_super+0x44/0xa0 fs/super.c:1918 deactivate_locked_super+0xbc/0x110 fs/super.c:603 cleanup_mnt+0x3d3/0x460 fs/namespace.c:1317 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:70 [inline] exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:336 [inline] do_syscall_64+0x328/0x520 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888033856a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888033856a80: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fa >ffff888033856b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888033856b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff888033856c00: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 ==================================================================