================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:886:2 index 524288 is out of range for type 'struct mutex[128]' CPU: 0 PID: 238 Comm: jfsCommit Not tainted 5.15.162-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282 diFree+0x1994/0x26c0 fs/jfs/jfs_imap.c:886 jfs_evict_inode+0x2d8/0x408 fs/jfs/inode.c:156 evict+0x260/0x68c fs/inode.c:587 iput_final fs/inode.c:1705 [inline] iput+0x744/0x824 fs/inode.c:1731 txUpdateMap+0x76c/0x914 fs/jfs/jfs_txnmgr.c:2401 txLazyCommit fs/jfs/jfs_txnmgr.c:2698 [inline] jfs_lazycommit+0x3b0/0xa40 fs/jfs/jfs_txnmgr.c:2766 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 ================================================================================ ================================================================== BUG: KASAN: use-after-free in __mutex_lock_common+0x104/0x2154 kernel/locking/mutex.c:575 Read of size 8 at addr ffff0000ed9f0918 by task jfsCommit/238 CPU: 1 PID: 238 Comm: jfsCommit Not tainted 5.15.162-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x174/0x1e4 mm/kasan/report.c:451 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 __mutex_lock_common+0x104/0x2154 kernel/locking/mutex.c:575 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743 diFree+0x2cc/0x26c0 fs/jfs/jfs_imap.c:886 jfs_evict_inode+0x2d8/0x408 fs/jfs/inode.c:156 evict+0x260/0x68c fs/inode.c:587 iput_final fs/inode.c:1705 [inline] iput+0x744/0x824 fs/inode.c:1731 txUpdateMap+0x76c/0x914 fs/jfs/jfs_txnmgr.c:2401 txLazyCommit fs/jfs/jfs_txnmgr.c:2698 [inline] jfs_lazycommit+0x3b0/0xa40 fs/jfs/jfs_txnmgr.c:2766 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 The buggy address belongs to the page: page:0000000008e0d89f refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12d9f0 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 0000000000000000 fffffc0003b67c08 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000ed9f0800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000ed9f0880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff0000ed9f0900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000ed9f0980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000ed9f0a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:926:6 index 524288 is out of range for type 'struct iagctl[128]' CPU: 0 PID: 238 Comm: jfsCommit Tainted: G B 5.15.162-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282 diFree+0x1a80/0x26c0 fs/jfs/jfs_imap.c:926 jfs_evict_inode+0x2d8/0x408 fs/jfs/inode.c:156 evict+0x260/0x68c fs/inode.c:587 iput_final fs/inode.c:1705 [inline] iput+0x744/0x824 fs/inode.c:1731 txUpdateMap+0x76c/0x914 fs/jfs/jfs_txnmgr.c:2401 txLazyCommit fs/jfs/jfs_txnmgr.c:2698 [inline] jfs_lazycommit+0x3b0/0xa40 fs/jfs/jfs_txnmgr.c:2766 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 ================================================================================ ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:926:37 index 524288 is out of range for type 'struct iagctl[128]' CPU: 0 PID: 238 Comm: jfsCommit Tainted: G B 5.15.162-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282 diFree+0x1ab0/0x26c0 fs/jfs/jfs_imap.c:926 jfs_evict_inode+0x2d8/0x408 fs/jfs/inode.c:156 evict+0x260/0x68c fs/inode.c:587 iput_final fs/inode.c:1705 [inline] iput+0x744/0x824 fs/inode.c:1731 txUpdateMap+0x76c/0x914 fs/jfs/jfs_txnmgr.c:2401 txLazyCommit fs/jfs/jfs_txnmgr.c:2698 [inline] jfs_lazycommit+0x3b0/0xa40 fs/jfs/jfs_txnmgr.c:2766 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 ================================================================================ ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:1001:3 index 524288 is out of range for type 'struct iagctl[128]' CPU: 0 PID: 238 Comm: jfsCommit Tainted: G B 5.15.162-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282 diFree+0x1da8/0x26c0 fs/jfs/jfs_imap.c:1001 jfs_evict_inode+0x2d8/0x408 fs/jfs/inode.c:156 evict+0x260/0x68c fs/inode.c:587 iput_final fs/inode.c:1705 [inline] iput+0x744/0x824 fs/inode.c:1731 txUpdateMap+0x76c/0x914 fs/jfs/jfs_txnmgr.c:2401 txLazyCommit fs/jfs/jfs_txnmgr.c:2698 [inline] jfs_lazycommit+0x3b0/0xa40 fs/jfs/jfs_txnmgr.c:2766 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 ================================================================================ ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:1006:3 index 524288 is out of range for type 'struct mutex[128]' CPU: 1 PID: 238 Comm: jfsCommit Tainted: G B 5.15.162-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282 diFree+0x1dc4/0x26c0 fs/jfs/jfs_imap.c:1006 jfs_evict_inode+0x2d8/0x408 fs/jfs/inode.c:156 evict+0x260/0x68c fs/inode.c:587 iput_final fs/inode.c:1705 [inline] iput+0x744/0x824 fs/inode.c:1731 txUpdateMap+0x76c/0x914 fs/jfs/jfs_txnmgr.c:2401 txLazyCommit fs/jfs/jfs_txnmgr.c:2698 [inline] jfs_lazycommit+0x3b0/0xa40 fs/jfs/jfs_txnmgr.c:2766 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 ================================================================================