BUG: spinlock bad magic on CPU#1, jfsCommit/100 lock: 0xffff0000db5f9318, .magic: ffff8000, .owner: /-614492512, .owner_cpu: 768 CPU: 1 UID: 0 PID: 100 Comm: jfsCommit Not tainted 6.14.0-rc1-syzkaller-g2014c95afece #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 spin_dump kernel/locking/spinlock_debug.c:70 [inline] spin_bug+0x118/0x1e8 kernel/locking/spinlock_debug.c:78 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x1d8/0x334 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x64/0x7c kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:105 [inline] __wake_up+0x38/0x1b0 kernel/sched/wait.c:127 unlock_metapage fs/jfs/jfs_metapage.c:39 [inline] release_metapage+0x164/0xa38 fs/jfs/jfs_metapage.c:763 xtTruncate+0xc78/0x2a08 jfs_free_zero_link+0x374/0x598 fs/jfs/namei.c:759 jfs_evict_inode+0x300/0x3f4 fs/jfs/inode.c:153 evict+0x444/0x978 fs/inode.c:796 iput_final fs/inode.c:1946 [inline] iput+0x740/0x8e8 fs/inode.c:1972 txUpdateMap+0x85c/0xa18 fs/jfs/jfs_txnmgr.c:2367 txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline] jfs_lazycommit+0x3bc/0x9a8 fs/jfs/jfs_txnmgr.c:2733 kthread+0x65c/0x7b0 kernel/kthread.c:464 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:131:9 index 8944 is out of range for type 'unsigned long[8]' CPU: 1 UID: 0 PID: 100 Comm: jfsCommit Not tainted 6.14.0-rc1-syzkaller-g2014c95afece #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_out_of_bounds+0xf8/0x148 lib/ubsan.c:429 decode_tail kernel/locking/qspinlock.c:131 [inline] queued_spin_lock_slowpath+0x978/0xd04 kernel/locking/qspinlock.c:468 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x2ec/0x334 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x64/0x7c kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:105 [inline] __wake_up+0x38/0x1b0 kernel/sched/wait.c:127 unlock_metapage fs/jfs/jfs_metapage.c:39 [inline] release_metapage+0x164/0xa38 fs/jfs/jfs_metapage.c:763 xtTruncate+0xc78/0x2a08 jfs_free_zero_link+0x374/0x598 fs/jfs/namei.c:759 jfs_evict_inode+0x300/0x3f4 fs/jfs/inode.c:153 evict+0x444/0x978 fs/inode.c:796 iput_final fs/inode.c:1946 [inline] iput+0x740/0x8e8 fs/inode.c:1972 txUpdateMap+0x85c/0xa18 fs/jfs/jfs_txnmgr.c:2367 txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline] jfs_lazycommit+0x3bc/0x9a8 fs/jfs/jfs_txnmgr.c:2733 kthread+0x65c/0x7b0 kernel/kthread.c:464 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 ---[ end trace ]--- ================================================================== BUG: KASAN: use-after-free in queued_spin_lock_slowpath+0x3d0/0xd04 kernel/locking/qspinlock.c:471 Write of size 8 at addr ffff000119a3aff0 by task jfsCommit/100 CPU: 1 UID: 0 PID: 100 Comm: jfsCommit Not tainted 6.14.0-rc1-syzkaller-g2014c95afece #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x198/0x538 mm/kasan/report.c:489 kasan_report+0xd8/0x138 mm/kasan/report.c:602 __asan_report_store8_noabort+0x20/0x2c mm/kasan/report_generic.c:386 queued_spin_lock_slowpath+0x3d0/0xd04 kernel/locking/qspinlock.c:471 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x2ec/0x334 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x64/0x7c kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:105 [inline] __wake_up+0x38/0x1b0 kernel/sched/wait.c:127 unlock_metapage fs/jfs/jfs_metapage.c:39 [inline] release_metapage+0x164/0xa38 fs/jfs/jfs_metapage.c:763 xtTruncate+0xc78/0x2a08 jfs_free_zero_link+0x374/0x598 fs/jfs/namei.c:759 jfs_evict_inode+0x300/0x3f4 fs/jfs/inode.c:153 evict+0x444/0x978 fs/inode.c:796 iput_final fs/inode.c:1946 [inline] iput+0x740/0x8e8 fs/inode.c:1972 txUpdateMap+0x85c/0xa18 fs/jfs/jfs_txnmgr.c:2367 txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline] jfs_lazycommit+0x3bc/0x9a8 fs/jfs/jfs_txnmgr.c:2733 kthread+0x65c/0x7b0 kernel/kthread.c:464 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x159a3a flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 fffffdffc4668e88 fffffdffc4668e88 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000119a3ae80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff000119a3af00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff000119a3af80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff000119a3b000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff000119a3b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================