================================================================== BUG: KASAN: slab-use-after-free in drop_metapage fs/jfs/jfs_metapage.c:311 [inline] BUG: KASAN: slab-use-after-free in release_metapage+0x760/0xac0 fs/jfs/jfs_metapage.c:890 Read of size 8 at addr ffff8880308616f0 by task jfsCommit/110 CPU: 1 UID: 0 PID: 110 Comm: jfsCommit Not tainted 6.16.0-rc4-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 drop_metapage fs/jfs/jfs_metapage.c:311 [inline] release_metapage+0x760/0xac0 fs/jfs/jfs_metapage.c:890 txUnlock+0x524/0xdf0 fs/jfs/jfs_txnmgr.c:947 txLazyCommit fs/jfs/jfs_txnmgr.c:2682 [inline] jfs_lazycommit+0x584/0xa90 fs/jfs/jfs_txnmgr.c:2733 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 11541: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4204 mempool_alloc_noprof+0x1a7/0x510 mm/mempool.c:402 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x509/0xde0 fs/jfs/jfs_metapage.c:758 dtSplitRoot+0x202/0x16c0 fs/jfs/jfs_dtree.c:1910 dtSplitUp fs/jfs/jfs_dtree.c:993 [inline] dtInsert+0xef8/0x5f40 fs/jfs/jfs_dtree.c:871 jfs_link+0x312/0x550 fs/jfs/namei.c:826 vfs_link+0x4ed/0x6e0 fs/namei.c:4863 do_linkat+0x272/0x560 fs/namei.c:4933 __do_sys_link fs/namei.c:4967 [inline] __se_sys_link fs/namei.c:4965 [inline] __x64_sys_link+0x82/0x90 fs/namei.c:4965 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 11573: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4745 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:890 dtSearch+0x557/0x21b0 fs/jfs/jfs_dtree.c:789 jfs_lookup+0x155/0x380 fs/jfs/namei.c:1461 __lookup_slow+0x297/0x3d0 fs/namei.c:1817 lookup_slow+0x53/0x70 fs/namei.c:1834 walk_component fs/namei.c:2138 [inline] link_path_walk+0x935/0xea0 fs/namei.c:2506 path_lookupat+0x97/0x430 fs/namei.c:2662 do_o_path+0x97/0x1f0 fs/namei.c:4026 path_openat+0x311f/0x3830 fs/namei.c:4048 do_filp_open+0x1fa/0x410 fs/namei.c:4082 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1463 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880308616c8 which belongs to the cache jfs_mp of size 184 The buggy address is located 40 bytes inside of freed 184-byte region [ffff8880308616c8, ffff888030861780) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880308613e0 pfn:0x30861 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801e31edc0 0000000000000000 0000000000000001 raw: ffff8880308613e0 000000008010000e 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 6085, tgid 6078 (syz.1.28), ts 110854993488, free_ts 110463487318 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] kmem_cache_alloc_noprof+0x283/0x3c0 mm/slub.c:4204 mempool_alloc_noprof+0x1a7/0x510 mm/mempool.c:402 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x509/0xde0 fs/jfs/jfs_metapage.c:758 diIAGRead fs/jfs/jfs_imap.c:2672 [inline] diAlloc+0x874/0x1680 fs/jfs/jfs_imap.c:1392 ialloc+0x8c/0x8f0 fs/jfs/jfs_inode.c:56 jfs_create+0x18d/0xa80 fs/jfs/namei.c:92 lookup_open fs/namei.c:3717 [inline] open_last_lookups fs/namei.c:3816 [inline] path_openat+0x14f4/0x3830 fs/namei.c:4052 do_filp_open+0x1fa/0x410 fs/namei.c:4082 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_creat fs/open.c:1530 [inline] __se_sys_creat fs/open.c:1524 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1524 page last free pid 5844 tgid 5844 stack trace: create_dummy_stack mm/page_owner.c:94 [inline] register_dummy_stack+0x89/0xe0 mm/page_owner.c:100 init_page_owner+0x29/0x7d0 mm/page_owner.c:118 invoke_init_callbacks mm/page_ext.c:148 [inline] page_ext_init+0x7ec/0x850 mm/page_ext.c:497 mm_core_init+0x5b/0x70 mm/mm_init.c:2783 Memory state around the buggy address: ffff888030861580: fb fb fc fc fc fc fc fc fc fc 00 00 00 00 00 00 ffff888030861600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888030861680: 00 fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb ^ ffff888030861700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888030861780: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================