loop4: detected capacity change from 0 to 32768
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:1360:19
index -878706688 is out of range for type 'atomic_t[128]'
CPU: 1 PID: 4818 Comm: syz-executor.4 Not tainted 6.1.63-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __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+0xfc/0x148 lib/ubsan.c:282
 diAlloc+0x11f8/0x1530 fs/jfs/jfs_imap.c:1360
 ialloc+0x84/0x7c0 fs/jfs/jfs_inode.c:56
 jfs_create+0x190/0xa1c fs/jfs/namei.c:92
 lookup_open fs/namei.c:3414 [inline]
 open_last_lookups fs/namei.c:3482 [inline]
 path_openat+0xeac/0x2548 fs/namei.c:3712
 do_filp_open+0x1bc/0x3cc fs/namei.c:3742
 do_sys_openat2+0x128/0x3d8 fs/open.c:1318
 do_sys_open fs/open.c:1334 [inline]
 __do_sys_openat fs/open.c:1350 [inline]
 __se_sys_openat fs/open.c:1345 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
================================================================================
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:72 [inline]
BUG: KASAN: use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
BUG: KASAN: use-after-free in diAlloc+0x2a8/0x1530 fs/jfs/jfs_imap.c:1360
Read of size 4 at addr ffff000052bb94e0 by task syz-executor.4/4818

CPU: 1 PID: 4818 Comm: syz-executor.4 Not tainted 6.1.63-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x174/0x4c0 mm/kasan/report.c:395
 kasan_report+0xd4/0x130 mm/kasan/report.c:495
 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:189
 __kasan_check_read+0x2c/0x3c mm/kasan/shadow.c:31
 instrument_atomic_read include/linux/instrumented.h:72 [inline]
 atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
 diAlloc+0x2a8/0x1530 fs/jfs/jfs_imap.c:1360
 ialloc+0x84/0x7c0 fs/jfs/jfs_inode.c:56
 jfs_create+0x190/0xa1c fs/jfs/namei.c:92
 lookup_open fs/namei.c:3414 [inline]
 open_last_lookups fs/namei.c:3482 [inline]
 path_openat+0xeac/0x2548 fs/namei.c:3712
 do_filp_open+0x1bc/0x3cc fs/namei.c:3742
 do_sys_openat2+0x128/0x3d8 fs/open.c:1318
 do_sys_open fs/open.c:1334 [inline]
 __do_sys_openat fs/open.c:1350 [inline]
 __se_sys_openat fs/open.c:1345 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

The buggy address belongs to the physical page:
page:000000003a7df399 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x92bb9
flags: 0x1ffc00000000000(node=0|zone=0|lastcpupid=0x7ff)
raw: 01ffc00000000000 fffffc00014aee48 fffffc00014aee48 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff000052bb9380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff000052bb9400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff000052bb9480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                                       ^
 ffff000052bb9500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff000052bb9580: 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:1379:2
index -878706688 is out of range for type 'struct mutex[128]'
CPU: 1 PID: 4818 Comm: syz-executor.4 Tainted: G    B              6.1.63-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __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+0xfc/0x148 lib/ubsan.c:282
 diAlloc+0x1298/0x1530 fs/jfs/jfs_imap.c:1379
 ialloc+0x84/0x7c0 fs/jfs/jfs_inode.c:56
 jfs_create+0x190/0xa1c fs/jfs/namei.c:92
 lookup_open fs/namei.c:3414 [inline]
 open_last_lookups fs/namei.c:3482 [inline]
 path_openat+0xeac/0x2548 fs/namei.c:3712
 do_filp_open+0x1bc/0x3cc fs/namei.c:3742
 do_sys_openat2+0x128/0x3d8 fs/open.c:1318
 do_sys_open fs/open.c:1334 [inline]
 __do_sys_openat fs/open.c:1350 [inline]
 __se_sys_openat fs/open.c:1345 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
================================================================================
Unable to handle kernel paging request at virtual address ffff5ffc69bae123
KASAN: maybe wild-memory-access in range [0xfffeffe34dd70918-0xfffeffe34dd7091f]
Mem abort info:
  ESR = 0x0000000096000004
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x04: level 0 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000004
  CM = 0, WnR = 0
swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000001b19ba000
[ffff5ffc69bae123] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4818 Comm: syz-executor.4 Tainted: G    B              6.1.63-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __mutex_lock_common+0xf4/0x21a0 kernel/locking/mutex.c:582
lr : __mutex_lock_common+0xcc/0x21a0 kernel/locking/mutex.c:580
sp : ffff8000248171c0
x29: ffff800024817340 x28: dfff800000000000 x27: 1ffff00003309cfc
x26: ffff80001984e000 x25: ffff700004902e54 x24: 0000000000000000
x23: 0000000000000000 x22: ffff800009984f88 x21: 0000000000000000
x20: 0000000000000000 x19: fffeffe34dd708b8 x18: 1fffe000368b0376
x17: 3d3d3d3d3d3d3d3d x16: ffff80001213e244 x15: 0000000000000000
x14: 0000000000000002 x13: 0000000000000001 x12: 0000000000000005
x11: 1ffff00004902e58 x10: 0000000000000003 x9 : 0000000000000003
x8 : 1fffdffc69bae123 x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000020
x2 : 0000000000000000 x1 : 0000000000000244 x0 : fffeffe34dd70918
Call trace:
 __mutex_lock_common+0xf4/0x21a0 kernel/locking/mutex.c:582
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
 diAlloc+0x644/0x1530 fs/jfs/jfs_imap.c:1379
 ialloc+0x84/0x7c0 fs/jfs/jfs_inode.c:56
 jfs_create+0x190/0xa1c fs/jfs/namei.c:92
 lookup_open fs/namei.c:3414 [inline]
 open_last_lookups fs/namei.c:3482 [inline]
 path_openat+0xeac/0x2548 fs/namei.c:3712
 do_filp_open+0x1bc/0x3cc fs/namei.c:3742
 do_sys_openat2+0x128/0x3d8 fs/open.c:1318
 do_sys_open fs/open.c:1334 [inline]
 __do_sys_openat fs/open.c:1350 [inline]
 __se_sys_openat fs/open.c:1345 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Code: b947e348 35000128 91018260 d343fc08 (387c6908) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	b947e348 	ldr	w8, [x26, #2016]
   4:	35000128 	cbnz	w8, 0x28
   8:	91018260 	add	x0, x19, #0x60
   c:	d343fc08 	lsr	x8, x0, #3
* 10:	387c6908 	ldrb	w8, [x8, x28] <-- trapping instruction