=============================== ================================================================== 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+0x680/0xa3c fs/jfs/jfs_metapage.c:892 Read of size 8 at addr ffff0000e2605218 by task jfsCommit/101 CPU: 1 UID: 0 PID: 101 Comm: jfsCommit Tainted: G L syzkaller #0 PREEMPT Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 drop_metapage fs/jfs/jfs_metapage.c:311 [inline] release_metapage+0x680/0xa3c fs/jfs/jfs_metapage.c:892 put_metapage+0x1ec/0x288 fs/jfs/jfs_metapage.c:862 txUnlock+0x464/0xca0 fs/jfs/jfs_txnmgr.c:948 txLazyCommit fs/jfs/jfs_txnmgr.c:2683 [inline] jfs_lazycommit+0x480/0x94c fs/jfs/jfs_txnmgr.c:2734 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Allocated by task 8957: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:78 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:570 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x70/0x88 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+0x344/0x680 mm/slub.c:5270 mempool_alloc_slab+0x58/0x74 mm/mempool.c:723 mempool_alloc_noprof+0x170/0x2a0 mm/mempool.c:567 alloc_metapage fs/jfs/jfs_metapage.c:264 [inline] __get_metapage+0x52c/0xe90 fs/jfs/jfs_metapage.c:760 diNewExt+0x800/0x253c fs/jfs/jfs_imap.c:2275 diAllocExt fs/jfs/jfs_imap.c:1952 [inline] diAllocAG+0x9bc/0x1a84 fs/jfs/jfs_imap.c:1669 diAlloc+0x17c/0x1630 fs/jfs/jfs_imap.c:1590 ialloc+0x80/0x78c fs/jfs/jfs_inode.c:56 jfs_mkdir+0x170/0x8b4 fs/jfs/namei.c:225 vfs_mkdir+0x408/0x48c fs/namei.c:5130 do_mkdirat+0x238/0x448 fs/namei.c:5164 __do_sys_mkdirat fs/namei.c:5186 [inline] __se_sys_mkdirat fs/namei.c:5184 [inline] __arm64_sys_mkdirat+0x8c/0xa4 fs/namei.c:5184 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0xe8/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x26c arch/arm64/kernel/entry-common.c:724 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:743 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Freed by task 8369: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:78 kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x74/0xa4 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:6670 [inline] kmem_cache_free+0x184/0x6e4 mm/slub.c:6781 mempool_free_slab+0x28/0x38 mm/mempool.c:730 mempool_free+0xec/0x138 mm/mempool.c:712 free_metapage fs/jfs/jfs_metapage.c:279 [inline] metapage_release_folio+0x374/0x48c fs/jfs/jfs_metapage.c:636 metapage_invalidate_folio+0x14c/0x1cc fs/jfs/jfs_metapage.c:671 folio_invalidate mm/truncate.c:140 [inline] truncate_cleanup_folio+0x264/0x3a0 mm/truncate.c:160 truncate_inode_folio mm/truncate.c:175 [inline] truncate_inode_pages_range+0xa94/0xdec mm/truncate.c:461 truncate_inode_pages+0x2c/0x3c mm/truncate.c:485 jfs_put_super+0x124/0x188 fs/jfs/super.c:200 generic_shutdown_super+0x12c/0x2b8 fs/super.c:643 kill_block_super+0x44/0x90 fs/super.c:1722 deactivate_locked_super+0xc4/0x12c fs/super.c:474 deactivate_super+0xe0/0x100 fs/super.c:507 cleanup_mnt+0x31c/0x3ac fs/namespace.c:1318 __cleanup_mnt+0x20/0x30 fs/namespace.c:1325 task_work_run+0x1dc/0x260 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:44 [inline] exit_to_user_mode_loop+0x10c/0x18c kernel/entry/common.c:75 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] exit_to_user_mode_prepare_legacy include/linux/irq-entry-common.h:242 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:81 [inline] el0_svc+0x17c/0x26c arch/arm64/kernel/entry-common.c:725 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:743 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 The buggy address belongs to the object at ffff0000e26051f0 which belongs to the cache jfs_mp of size 184 The buggy address is located 40 bytes inside of freed 184-byte region [ffff0000e26051f0, ffff0000e26052a8) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x122605 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000000 ffff0000c51cf140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e2605100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e2605180: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa fb >ffff0000e2605200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000e2605280: fb fb fb fb fb fc fc fc fc fc fc fc fc fa fb fb ffff0000e2605300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Unable to handle kernel paging request at virtual address dfff800000000029 KASAN: null-ptr-deref in range [0x0000000000000148-0x000000000000014f] Mem abort info: ESR = 0x0000000096000005 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x05: level 1 translation fault Data abort info: ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [dfff800000000029] address between user and kernel address ranges Internal error: Oops: 0000000096000005 [#1] SMP Modules linked in: CPU: 1 UID: 0 PID: 101 Comm: jfsCommit Tainted: G B L syzkaller #0 PREEMPT Tainted: [B]=BAD_PAGE, [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : txEnd+0x180/0x4f0 fs/jfs/jfs_txnmgr.c:540 lr : txEnd+0x158/0x4f0 fs/jfs/jfs_txnmgr.c:529 sp : ffff800099c57c60 x29: ffff800099c57c60 x28: 1ffff00013345266 x27: ffff80008fe93000 x26: 1ffff00011fd27a0 x25: dfff800000000000 x24: ffff80009773f000 x23: 0000000000000002 x22: 000000000000014c x21: ffff800099a29358 x20: 0000000000000003 x19: 0000000000000000 x18: 1fffe00033781890 x17: ffff80008f86e000 x16: ffff800080212868 x15: 0000000000000001 x14: 1ffff0001334526c x13: 0000000000000000 x12: 0000000000000000 x11: ffff70001334526d x10: 0000000000ff0100 x9 : 0000000000000029 x8 : 0000000000000003 x7 : ffffffffffffffff x6 : ffff80008051039c x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800081c9e7ec x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: txEnd+0x180/0x4f0 fs/jfs/jfs_txnmgr.c:535 (P) txLazyCommit fs/jfs/jfs_txnmgr.c:2685 [inline] jfs_lazycommit+0x4b4/0x94c fs/jfs/jfs_txnmgr.c:2734 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Code: 12003e88 790002b7 d343fec9 b9040308 (38f96928) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 12003e88 and w8, w20, #0xffff 4: 790002b7 strh w23, [x21] 8: d343fec9 lsr x9, x22, #3 c: b9040308 str w8, [x24, #1024] * 10: 38f96928 ldrsb w8, [x9, x25] <-- trapping instruction