================================================================================ 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: 28492 Comm: syz-executor.5 Not tainted 6.6.0-rc7-syzkaller-g8de1e7afcc1c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:348 diAlloc+0x11f8/0x1530 fs/jfs/jfs_imap.c:1360 ialloc+0x84/0x7c4 fs/jfs/jfs_inode.c:56 jfs_create+0x190/0xa08 fs/jfs/namei.c:92 lookup_open fs/namei.c:3496 [inline] open_last_lookups fs/namei.c:3564 [inline] path_openat+0xf80/0x27f8 fs/namei.c:3794 do_filp_open+0x1bc/0x3cc fs/namei.c:3824 do_sys_openat2+0x124/0x1b8 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1448 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 ================================================================================ ================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] BUG: KASAN: use-after-free in diAlloc+0x2a8/0x1530 fs/jfs/jfs_imap.c:1360 Read of size 4 at addr ffff0000508744e0 by task syz-executor.5/28492 CPU: 1 PID: 28492 Comm: syz-executor.5 Not tainted 6.6.0-rc7-syzkaller-g8de1e7afcc1c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x174/0x514 mm/kasan/report.c:475 kasan_report+0xd8/0x138 mm/kasan/report.c:588 kasan_check_range+0x254/0x294 mm/kasan/generic.c:187 __kasan_check_read+0x20/0x30 mm/kasan/shadow.c:31 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] diAlloc+0x2a8/0x1530 fs/jfs/jfs_imap.c:1360 ialloc+0x84/0x7c4 fs/jfs/jfs_inode.c:56 jfs_create+0x190/0xa08 fs/jfs/namei.c:92 lookup_open fs/namei.c:3496 [inline] open_last_lookups fs/namei.c:3564 [inline] path_openat+0xf80/0x27f8 fs/namei.c:3794 do_filp_open+0x1bc/0x3cc fs/namei.c:3824 do_sys_openat2+0x124/0x1b8 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1448 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 The buggy address belongs to the physical page: page:00000000cf4818a3 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x90874 flags: 0x1ffc00000000000(node=0|zone=0|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 01ffc00000000000 fffffc0001421d08 fffffc0001421d08 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000050874380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff000050874400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff000050874480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff000050874500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff000050874580: 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: 28492 Comm: syz-executor.5 Tainted: G B 6.6.0-rc7-syzkaller-g8de1e7afcc1c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:348 diAlloc+0x1298/0x1530 fs/jfs/jfs_imap.c:1379 ialloc+0x84/0x7c4 fs/jfs/jfs_inode.c:56 jfs_create+0x190/0xa08 fs/jfs/namei.c:92 lookup_open fs/namei.c:3496 [inline] open_last_lookups fs/namei.c:3564 [inline] path_openat+0xf80/0x27f8 fs/namei.c:3794 do_filp_open+0x1bc/0x3cc fs/namei.c:3824 do_sys_openat2+0x124/0x1b8 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1448 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 ================================================================================ Unable to handle kernel paging request at virtual address ffff5ffc7501d123 KASAN: maybe wild-memory-access in range [0xfffeffe3a80e8918-0xfffeffe3a80e891f] 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, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000001af6a1000 [ffff5ffc7501d123] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 28492 Comm: syz-executor.5 Tainted: G B 6.6.0-rc7-syzkaller-g8de1e7afcc1c #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 : ffff800097f271e0 x29: ffff800097f27360 x28: dfff800000000000 x27: 1ffff000124ff4ec x26: ffff8000927fa000 x25: ffff700012fe4e58 x24: 0000000000000000 x23: 0000000000000000 x22: ffff800081a1d478 x21: 0000000000000000 x20: 0000000000000000 x19: fffeffe3a80e88b8 x18: 1fffe000368333ce x17: 3d3d3d3d3d3d3d3d x16: ffff80008a71a2e0 x15: 0000000000000005 x14: 1ffff00012fe4e5c x13: 0000000000000000 x12: 0000000000000000 x11: ffff700012fe4e61 x10: 0000000000000003 x9 : 0000000000000003 x8 : 1fffdffc7501d123 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000020 x2 : 0000000000000000 x1 : 0000000000000244 x0 : fffeffe3a80e8918 Call trace: __mutex_lock_common+0xf4/0x21a0 kernel/locking/mutex.c:582 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799 diAlloc+0x644/0x1530 fs/jfs/jfs_imap.c:1379 ialloc+0x84/0x7c4 fs/jfs/jfs_inode.c:56 jfs_create+0x190/0xa08 fs/jfs/namei.c:92 lookup_open fs/namei.c:3496 [inline] open_last_lookups fs/namei.c:3564 [inline] path_openat+0xf80/0x27f8 fs/namei.c:3794 do_filp_open+0x1bc/0x3cc fs/namei.c:3824 do_sys_openat2+0x124/0x1b8 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1448 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 Code: b9476348 35000128 91018260 d343fc08 (387c6908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: b9476348 ldr w8, [x26, #1888] 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