------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:2257:2 index -75944448 is out of range for type 's64[128]' (aka 'long long[128]') CPU: 1 UID: 0 PID: 8947 Comm: syz.0.329 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/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 dump_stack+0x1c/0x28 lib/dump_stack.c:129 ubsan_epilogue+0x14/0x48 lib/ubsan.c:233 __ubsan_handle_out_of_bounds+0xd0/0xfc lib/ubsan.c:455 dbAllocBits+0x87c/0x8c4 fs/jfs/jfs_dmap.c:2257 dbAllocDmap fs/jfs/jfs_dmap.c:2034 [inline] dbAllocNear+0x25c/0x350 fs/jfs/jfs_dmap.c:1247 dbAlloc+0x72c/0x9dc fs/jfs/jfs_dmap.c:832 extBalloc fs/jfs/jfs_extent.c:336 [inline] extAlloc+0x42c/0xdc8 fs/jfs/jfs_extent.c:127 jfs_get_block+0x2bc/0x8b8 fs/jfs/inode.c:248 get_more_blocks fs/direct-io.c:648 [inline] do_direct_IO fs/direct-io.c:936 [inline] __blockdev_direct_IO+0x10bc/0x2818 fs/direct-io.c:1243 blockdev_direct_IO include/linux/fs.h:3506 [inline] jfs_direct_IO+0xf0/0x1d0 fs/jfs/inode.c:333 generic_file_direct_write+0x1a8/0x350 mm/filemap.c:4109 __generic_file_write_iter+0x10c/0x204 mm/filemap.c:4278 generic_file_write_iter+0x10c/0x47c mm/filemap.c:4318 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x540/0xa3c fs/read_write.c:686 ksys_write+0x120/0x210 fs/read_write.c:738 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:746 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 ---[ end trace ]--- ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_extent.c:358:16 index -75944448 is out of range for type 'atomic_t[128]' CPU: 1 UID: 0 PID: 8947 Comm: syz.0.329 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/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 dump_stack+0x1c/0x28 lib/dump_stack.c:129 ubsan_epilogue+0x14/0x48 lib/ubsan.c:233 __ubsan_handle_out_of_bounds+0xd0/0xfc lib/ubsan.c:455 extBalloc fs/jfs/jfs_extent.c:358 [inline] extAlloc+0xd08/0xdc8 fs/jfs/jfs_extent.c:127 jfs_get_block+0x2bc/0x8b8 fs/jfs/inode.c:248 get_more_blocks fs/direct-io.c:648 [inline] do_direct_IO fs/direct-io.c:936 [inline] __blockdev_direct_IO+0x10bc/0x2818 fs/direct-io.c:1243 blockdev_direct_IO include/linux/fs.h:3506 [inline] jfs_direct_IO+0xf0/0x1d0 fs/jfs/inode.c:333 generic_file_direct_write+0x1a8/0x350 mm/filemap.c:4109 __generic_file_write_iter+0x10c/0x204 mm/filemap.c:4278 generic_file_write_iter+0x10c/0x47c mm/filemap.c:4318 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x540/0xa3c fs/read_write.c:686 ksys_write+0x120/0x210 fs/read_write.c:738 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:746 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 ---[ end trace ]--- ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_extent.c:362:16 index -75944448 is out of range for type 'atomic_t[128]' CPU: 1 UID: 0 PID: 8947 Comm: syz.0.329 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/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 dump_stack+0x1c/0x28 lib/dump_stack.c:129 ubsan_epilogue+0x14/0x48 lib/ubsan.c:233 __ubsan_handle_out_of_bounds+0xd0/0xfc lib/ubsan.c:455 extBalloc fs/jfs/jfs_extent.c:362 [inline] extAlloc+0xd38/0xdc8 fs/jfs/jfs_extent.c:127 jfs_get_block+0x2bc/0x8b8 fs/jfs/inode.c:248 get_more_blocks fs/direct-io.c:648 [inline] do_direct_IO fs/direct-io.c:936 [inline] __blockdev_direct_IO+0x10bc/0x2818 fs/direct-io.c:1243 blockdev_direct_IO include/linux/fs.h:3506 [inline] jfs_direct_IO+0xf0/0x1d0 fs/jfs/inode.c:333 generic_file_direct_write+0x1a8/0x350 mm/filemap.c:4109 __generic_file_write_iter+0x10c/0x204 mm/filemap.c:4278 generic_file_write_iter+0x10c/0x47c mm/filemap.c:4318 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x540/0xa3c fs/read_write.c:686 ksys_write+0x120/0x210 fs/read_write.c:738 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:746 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 ---[ end trace ]--- syz.0.329: attempt to access beyond end of device loop0: rw=34817, sector=3818997678432, nr_sectors = 64 limit=32768 syz.0.329: attempt to access beyond end of device loop0: rw=34817, sector=3818997678504, nr_sectors = 1968 limit=32768 syz.0.329: attempt to access beyond end of device loop0: rw=34817, sector=3818997680480, nr_sectors = 2032 limit=32768 syz.0.329: attempt to access beyond end of device loop0: rw=34817, sector=3818997682520, nr_sectors = 2032 limit=32768 syz.0.329: attempt to access beyond end of device loop0: rw=34817, sector=3818997684560, nr_sectors = 2032 limit=32768 syz.0.329: attempt to access beyond end of device loop0: rw=34817, sector=3818997686600, nr_sectors = 2032 limit=32768 syz.0.329: attempt to access beyond end of device loop0: rw=34817, sector=3818997688640, nr_sectors = 72 limit=32768