loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-use-after-free in jfs_readdir+0x1223/0x3c10 fs/jfs/jfs_dtree.c:2881 Read of size 8 at addr ffff888056fd2bd0 by task syz.0.17/6431 CPU: 0 UID: 0 PID: 6431 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(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 jfs_readdir+0x1223/0x3c10 fs/jfs/jfs_dtree.c:2881 wrap_directory_iterator+0x96/0xe0 fs/readdir.c:65 iterate_dir+0x399/0x570 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:410 [inline] __se_sys_getdents64+0xf1/0x280 fs/readdir.c:396 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x89/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f265999aef9 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:00007f265a787028 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f2659c05fa0 RCX: 00007f265999aef9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007f2659a2fee0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2659c06038 R14: 00007f2659c05fa0 R15: 00007ffc2dbd34b8 Allocated by task 6431: 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:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_noprof+0x370/0x6e0 mm/slub.c:5270 mempool_alloc_noprof+0x1ce/0x300 mm/mempool.c:567 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x50c/0xde0 fs/jfs/jfs_metapage.c:760 dtSplitRoot+0x202/0x16c0 fs/jfs/jfs_dtree.c:1910 dtSplitUp fs/jfs/jfs_dtree.c:993 [inline] dtInsert+0xedd/0x5de0 fs/jfs/jfs_dtree.c:871 jfs_create+0x75b/0xb10 fs/jfs/namei.c:137 lookup_open fs/namei.c:4449 [inline] open_last_lookups fs/namei.c:4549 [inline] path_openat+0x18dd/0x3e20 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+0x89/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 6431: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/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:2540 [inline] slab_free mm/slub.c:6674 [inline] kmem_cache_free+0x195/0x610 mm/slub.c:6785 mempool_free+0xec/0x130 mm/mempool.c:712 free_metapage fs/jfs/jfs_metapage.c:279 [inline] drop_metapage fs/jfs/jfs_metapage.c:316 [inline] release_metapage+0x859/0xac0 fs/jfs/jfs_metapage.c:892 dtReadNext fs/jfs/jfs_dtree.c:3202 [inline] jfs_readdir+0xf4c/0x3c10 fs/jfs/jfs_dtree.c:2874 wrap_directory_iterator+0x96/0xe0 fs/readdir.c:65 iterate_dir+0x399/0x570 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:410 [inline] __se_sys_getdents64+0xf1/0x280 fs/readdir.c:396 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x89/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x76/0x7e The buggy address belongs to the object at ffff888056fd2ba0 which belongs to the cache jfs_mp of size 184 The buggy address is located 48 bytes inside of freed 184-byte region [ffff888056fd2ba0, ffff888056fd2c58) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x56fd2 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff8881404af780 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 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 6431, tgid 6430 (syz.0.17), ts 151459442100, free_ts 143385033990 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+0x246b/0x2510 mm/page_alloc.c:3945 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5240 alloc_pages_mpol+0x232/0x4a0 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+0xd71/0x1750 mm/slub.c:4656 __slab_alloc+0x65/0x100 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] kmem_cache_alloc_noprof+0x3fe/0x6e0 mm/slub.c:5270 mempool_alloc_noprof+0x1ce/0x300 mm/mempool.c:567 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x50c/0xde0 fs/jfs/jfs_metapage.c:760 diReadSpecial+0x25b/0x710 fs/jfs/jfs_imap.c:447 jfs_mount+0x73/0x870 fs/jfs/jfs_mount.c:87 jfs_fill_super+0x6bc/0xd80 fs/jfs/super.c:523 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 page last free pid 6216 tgid 6216 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xbae/0xd10 mm/page_alloc.c:2973 vfree+0x25a/0x3f0 mm/vmalloc.c:3466 kcov_put kernel/kcov.c:439 [inline] kcov_close+0x28/0x50 kernel/kcov.c:535 __fput+0x44f/0xa70 fs/file_table.c:468 task_work_run+0x1d9/0x270 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x69b/0x2310 kernel/exit.c:971 do_group_exit+0x21b/0x2d0 kernel/exit.c:1112 get_signal+0x125c/0x1310 kernel/signal.c:3034 arch_do_signal_or_restart+0xbc/0x830 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:41 [inline] exit_to_user_mode_loop+0x86/0x480 kernel/entry/common.c:75 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline] do_syscall_64+0x22c/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x76/0x7e Memory state around the buggy address: ffff888056fd2a80: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ffff888056fd2b00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff888056fd2b80: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb ^ ffff888056fd2c00: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff888056fd2c80: fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================