syzbot


UBSAN: array-index-out-of-bounds in dbNextAG

Status: upstream: reported C repro on 2022/09/26 09:55
Labels: jfs (incorrect?)
Reported-by: syzbot+38e876a8aa44b7115c76@syzkaller.appspotmail.com
First crash: 251d, last: 20d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: UBSAN: array-index-out-of-bounds in dbNextAG (log)
Repro: C syz .config

Fix bisection: the fix commit could be any of (bisect log):
  1ea66d71b176 jfs: remove unused declarations for jfs
  dee874452409 jfs: remove redundant assignments to ipaimap and ipaimap2
  b0a35efa0ebc fs/jfs/jfs_xattr.h: Fix spelling typo in comment
  ebe060369f8d jfs: Fix fortify moan in symlink
  25e70c6162f2 fs: jfs: fix shift-out-of-bounds in dbDiscardAG
  4ef3405e82d2 MAINTAINERS: git://github -> https://github.com for kleikamp
  73c6da327ff1 fs/jfs: replace ternary operator with min_t()
  d0e482c45c50 jfs: Fix a typo in function jfs_umount
  898f70669568 fs: jfs: fix shift-out-of-bounds in dbAllocAG
  a60dca73a1a8 jfs: makes diUnmount/diMount in jfs_mount_rw atomic
  56c003e4db4a Merge tag 'jfs-6.2' of https://github.com/kleikamp/linux-shaggy
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] UBSAN: array-index-out-of-bounds in dbNextAG 0 (1) 2022/09/26 09:55
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Read in dbNextAG jfs C error 12 145d 250d 0/1 upstream: reported C repro on 2022/09/25 01:19
linux-4.14 KASAN: use-after-free Read in dbNextAG C 2 101d 250d 0/1 upstream: reported C repro on 2022/09/25 01:19
Last patch testing requests (4)
Created Duration User Patch Repo Result
2023/05/13 17:43 23m retest repro upstream report log
2023/05/13 17:43 31m retest repro upstream OK log
2023/02/28 14:32 30m retest repro upstream OK log
2023/02/28 14:32 16m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log

Sample crash report:
loop0: detected capacity change from 0 to 264192
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:617:20
index 1128417612 is out of range for type 'atomic_t [128]'
CPU: 0 PID: 3606 Comm: syz-executor376 Not tainted 6.0.0-rc6-syzkaller-00321-g105a36f3694e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_out_of_bounds+0xdb/0x130 lib/ubsan.c:283
 dbNextAG+0x602/0x630 fs/jfs/jfs_dmap.c:617
 diAlloc+0x17a/0x1700 fs/jfs/jfs_imap.c:1342
 ialloc+0x8c/0xa80 fs/jfs/jfs_inode.c:56
 jfs_mkdir+0x141/0xb00 fs/jfs/namei.c:225
 vfs_mkdir+0x3b3/0x590 fs/namei.c:4013
 do_mkdirat+0x279/0x550 fs/namei.c:4038
 __do_sys_mkdir fs/namei.c:4058 [inline]
 __se_sys_mkdir fs/namei.c:4056 [inline]
 __x64_sys_mkdir+0x6a/0x80 fs/namei.c:4056
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fca2c28c2c7
Code: ff ff ff ff c3 66 0f 1f 44 00 00 48 c7 c0 c0 ff ff ff 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 b8 53 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff8fb1d868 EFLAGS: 00000246 ORIG_RAX: 0000000000000053
RAX: ffffffffffffffda RBX: 00007fff8fb1d910 RCX: 00007fca2c28c2c7
RDX: 0000000000000000 RSI: 00000000000001ff RDI: 00000000200001c0
RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000ffffffff R14: 00000000200001c0 R15: 0000000000000000
 </TASK>
================================================================================

Crashes (44):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Manager Title
2022/09/26 00:29 upstream 105a36f3694e 0042f2b4 .config strace log report syz C [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/09/24 20:52 linux-next aaa11ce2ffc8 0042f2b4 .config strace log report syz C ci-upstream-linux-next-kasan-gce-root UBSAN: array-index-out-of-bounds in dbNextAG
2022/09/25 05:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 0042f2b4 .config console log report syz C [disk image] [vmlinux] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in dbNextAG
2022/10/12 02:42 upstream 493ffd6605b2 02b6492e .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/09 16:06 upstream a6afa4199d3d aea5da89 .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in dbNextAG
2022/09/25 11:13 upstream 3db61221f4e8 0042f2b4 .config strace log report syz C ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2023/03/04 17:18 upstream 0988a0ea7919 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/11/20 14:30 upstream fe24a97cf254 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/11/18 11:36 upstream 84368d882b96 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/11/07 07:30 upstream 089d1c31224e 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/11/03 19:08 upstream b229b6ca5abb 7a2ebf95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/11/02 22:52 upstream b229b6ca5abb 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/11/01 09:48 upstream b229b6ca5abb a1d8560a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root UBSAN: array-index-out-of-bounds in dbNextAG
2022/11/01 09:40 upstream b229b6ca5abb a1d8560a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/31 16:08 upstream b229b6ca5abb 2a71366b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/31 15:54 upstream b229b6ca5abb 2a71366b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/28 03:26 upstream b229b6ca5abb 5c716ff6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/28 02:48 upstream b229b6ca5abb 5c716ff6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/24 22:28 upstream 247f34f7b803 faae2fda .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/24 12:32 upstream 247f34f7b803 faae2fda .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/22 20:55 upstream 440b7895c990 c0b80a55 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/22 14:49 upstream 440b7895c990 c0b80a55 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/21 09:42 upstream 6d36c728bc2e 63e790dd .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/19 06:17 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/19 00:50 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/18 23:15 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/18 01:10 upstream 493ffd6605b2 94744d21 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/16 05:20 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/15 09:24 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/15 07:20 upstream 55be6084c8e0 67cb024c .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/15 04:07 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/14 07:54 upstream 493ffd6605b2 4954e4b2 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/09 15:10 upstream a6afa4199d3d aea5da89 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/08 19:52 upstream 62e6e5940c0c aea5da89 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/08 17:53 upstream e8bc52cb8df8 aea5da89 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/06 03:26 upstream 2bca25eaeba6 2c6543ad .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/06 00:46 upstream 2bca25eaeba6 2c6543ad .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dbNextAG
2022/11/01 09:47 linux-next 4d48f589d294 a1d8560a .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root UBSAN: array-index-out-of-bounds in dbNextAG
2022/10/21 04:15 linux-next acee3e83b493 a0fd4dab .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root UBSAN: array-index-out-of-bounds in dbNextAG
2022/09/24 20:16 linux-next aaa11ce2ffc8 0042f2b4 .config console log report info ci-upstream-linux-next-kasan-gce-root UBSAN: array-index-out-of-bounds in dbNextAG
2022/11/14 07:19 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1621b6eaebf7 3ead01ad .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in dbNextAG
2022/11/02 09:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 edac4fd1 .config console log report info [disk image] [vmlinux] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in dbNextAG
2022/10/25 08:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 45645420 .config console log report info [disk image] [vmlinux] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in dbNextAG
2022/09/26 16:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 d59ba983 .config console log report info [disk image] [vmlinux] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in dbNextAG
* Struck through repros no longer work on HEAD.