syzbot


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

Status: fixed on 2024/01/08 11:23
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+76a072c2f8a60280bd70@syzkaller.appspotmail.com
Fix commit: a779ed754e52 jfs: define xtree root and page independently
First crash: 794d, last: 375d
Cause bisection: introduced by (bisect log) [ignored commit]:
commit 8e29da69feade64ec7fe9e1a2824b967c5183a21
Author: Jens Axboe <axboe@kernel.dk>
Date: Mon Apr 18 16:44:00 2022 +0000

  io_uring: add support for IORING_ASYNC_CANCEL_ALL

Crash: UBSAN: array-index-out-of-bounds in xtInsert (log)
Repro: syz .config
  
Fix bisection: fixed by (bisect log) :
commit a779ed754e52d582b8c0e17959df063108bd0656
Author: Dave Kleikamp <dave.kleikamp@oracle.com>
Date: Thu Oct 5 14:16:14 2023 +0000

  jfs: define xtree root and page independently

  
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] UBSAN: array-index-out-of-bounds in xtSearch 0 (5) 2023/11/28 19:47
[PATCH] fs/jfs: Add checking for out-of-bounds index in binary search in xtSearch 2 (2) 2023/10/03 23:36
[syzbot] Monthly jfs report (Aug 2023) 0 (1) 2023/08/30 09:54
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 UBSAN: array-index-out-of-bounds in xtSearch origin:upstream C done 3 515d 592d 3/3 fixed on 2023/09/23 10:26
linux-6.1 UBSAN: array-index-out-of-bounds in xtSearch (2) origin:lts-only C done 94 7d13h 395d 0/3 upstream: reported C repro on 2023/11/05 20:01
linux-5.15 UBSAN: array-index-out-of-bounds in xtSearch 17 587d 630d 0/3 auto-obsoleted due to no activity on 2023/08/22 15:17
linux-5.15 UBSAN: array-index-out-of-bounds in xtSearch (2) origin:lts-only C done 111 41d 395d 0/3 upstream: reported C repro on 2023/11/05 19:59
Last patch testing requests (7)
Created Duration User Patch Repo Result
2023/11/09 08:46 38m retest repro upstream report log
2023/11/09 03:10 17m retest repro upstream OK log
2023/11/09 00:49 0m retest repro linux-next error
2023/11/09 00:49 0m retest repro linux-next error
2023/11/09 00:49 0m retest repro linux-next error
2023/11/09 00:25 21m retest repro upstream OK log
2023/09/22 09:17 15m ghandatmanas@gmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
Cause bisection attempts (3)
Created Duration User Patch Repo Result
2023/09/06 08:48 8h08m (2) bisect upstream OK (1) job log log
2023/08/29 01:25 2h28m bisect upstream error job log
2023/02/03 12:02 1m bisect upstream error job log
marked invalid by nogikh@google.com

Sample crash report:
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:360:4
index 18 is out of range for type 'xad_t [18]'
CPU: 1 PID: 5057 Comm: syz-executor432 Not tainted 6.5.0-rc7-next-20230825-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x125/0x1b0 lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:217 [inline]
 __ubsan_handle_out_of_bounds+0x111/0x150 lib/ubsan.c:348
 xtSearch+0x12e2/0x1650 fs/jfs/jfs_xtree.c:360
 xtLookup+0x273/0x840 fs/jfs/jfs_xtree.c:152
 extHint+0x22f/0x4f0 fs/jfs/jfs_extent.c:215
 jfs_get_block+0x2d4/0xb20 fs/jfs/inode.c:246
 get_more_blocks fs/direct-io.c:647 [inline]
 do_direct_IO fs/direct-io.c:935 [inline]
 __blockdev_direct_IO+0x2456/0x3cc0 fs/direct-io.c:1248
 blockdev_direct_IO include/linux/fs.h:3009 [inline]
 jfs_direct_IO+0x10c/0x2c0 fs/jfs/inode.c:331
 generic_file_direct_write+0x132/0x360 mm/filemap.c:3870
 __generic_file_write_iter+0x11d/0x240 mm/filemap.c:4026
 generic_file_write_iter+0xe3/0x350 mm/filemap.c:4066
 call_write_iter include/linux/fs.h:1985 [inline]
 do_iter_readv_writev+0x21e/0x3c0 fs/read_write.c:735
 do_iter_write+0x17f/0x830 fs/read_write.c:860
 vfs_iter_write+0x7a/0xb0 fs/read_write.c:901
 iter_file_splice_write+0x698/0xbf0 fs/splice.c:736
 do_splice_from fs/splice.c:933 [inline]
 direct_splice_actor+0x118/0x180 fs/splice.c:1142
 splice_direct_to_actor+0x347/0xa30 fs/splice.c:1088
 do_splice_direct+0x1af/0x280 fs/splice.c:1194
 do_sendfile+0xb88/0x1390 fs/read_write.c:1254
 __do_sys_sendfile64 fs/read_write.c:1322 [inline]
 __se_sys_sendfile64 fs/read_write.c:1308 [inline]
 __x64_sys_sendfile64+0x1d6/0x220 fs/read_write.c:1308
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff628b3ae99
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff628af7218 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007ff628bc8708 RCX: 00007ff628b3ae99
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 00007ff628bc8700 R08: 0000000000000000 R09: 0000000000000000
R10: 0001000000201004 R11: 0000000000000246 R12: 00007ff628b95110
R13: 00007ff628b8f06b R14: 0032656c69662f2e R15: 7261637369646f6e
 </TASK>
================================================================================

Crashes (122):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/27 12:05 linux-next 626932085009 03d9c195 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/08/16 22:18 linux-next ef66bf8aeb91 7773e940 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci-upstream-linux-next-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/07/14 01:51 upstream eb26cbb1a754 55eda22f .config strace log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root UBSAN: array-index-out-of-bounds in xtSearch
2023/08/11 21:12 linux-next 21ef7b1e17d0 39990d51 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/07/16 00:39 upstream b6e6cc1f78c7 35d9ecc5 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2022/12/25 04:14 upstream 72a85e2b0a1e 9da18ae8 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/10/25 23:55 upstream 611da07b89fd 72e794c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/10/25 04:36 upstream d88520ad73b7 17e6d526 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/10/19 05:41 upstream dd72f9c7e512 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/10/16 05:10 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/10/12 06:12 upstream 8182d7a3f1b8 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/10/11 12:23 upstream 1c8b86a3799f 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root UBSAN: array-index-out-of-bounds in xtSearch
2023/10/08 16:15 upstream b9ddbb0cde2a 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in xtSearch
2023/10/04 18:15 upstream cbf3a2cb156a b7d7ff54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/09/30 03:39 upstream 71e58659bfc0 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/09/27 10:19 upstream 0e945134b680 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/09/25 10:02 upstream 8a511e7efc5a 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in xtSearch
2023/09/15 05:11 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in xtSearch
2023/09/06 05:29 upstream 7733171926cc 8bc9053e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root UBSAN: array-index-out-of-bounds in xtSearch
2023/09/06 04:21 upstream 7733171926cc 8bc9053e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/10/11 15:25 upstream 1c8b86a3799f 83165b57 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream UBSAN: array-index-out-of-bounds in xtSearch
2023/10/03 08:51 upstream ce36c8b14987 65faba36 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream UBSAN: array-index-out-of-bounds in xtSearch
2023/09/24 19:45 upstream 3aba70aed91f 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream UBSAN: array-index-out-of-bounds in xtSearch
2023/09/19 02:44 upstream 2cf0f7156238 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 UBSAN: array-index-out-of-bounds in xtSearch
2023/08/30 08:44 upstream d68b4b6f307d b42ca3a7 .config console log report info ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/08/27 23:15 upstream 85eb043618bb 03d9c195 .config console log report info ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/08/24 17:35 upstream 93f5de5f648d 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/08/16 07:01 upstream 4853c74bd7ab 39990d51 .config console log report info ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in xtSearch
2023/08/07 03:52 upstream f0ab9f34e59e 4ffcc9ef .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/08/02 03:29 upstream 5d0c230f1de8 df07ffe8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root UBSAN: array-index-out-of-bounds in xtSearch
2023/07/26 17:12 upstream 18b44bc5a672 4d1a770f .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream UBSAN: array-index-out-of-bounds in xtSearch
2023/07/23 08:31 upstream 725d444db6b0 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root UBSAN: array-index-out-of-bounds in xtSearch
2023/07/14 17:13 upstream 4b810bf037e5 d624500f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/07/09 17:36 upstream 1c7873e33645 668cb1fa .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/07/06 12:48 upstream c17414a273b8 1a2f6297 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream UBSAN: array-index-out-of-bounds in xtSearch
2023/07/02 22:55 upstream 995b406c7e97 bfc47836 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/18 18:44 upstream 8c1f0c38b310 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/18 09:34 upstream 1b29d271614a f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/16 04:50 upstream 62d8779610bb f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/14 04:24 upstream 15adb51c04cc d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/10 12:27 upstream 64569520920a 49519f06 .config console log report info ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/10 07:28 upstream 64569520920a 9018a337 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/08 21:45 upstream 25041a4c02c7 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/08 10:43 upstream 5f63595ebd82 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/03 12:52 upstream 4ecd704a4c51 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/03 02:20 upstream c43a6ff9f93f a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/06/01 06:58 upstream 48b1320a674e babc4389 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2022/10/03 08:38 upstream a962b54e162c feb56351 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in xtSearch
2023/08/15 12:31 upstream 91aa6c412d7f 39990d51 .config console log report info ci-qemu-upstream-386 UBSAN: array-index-out-of-bounds in xtSearch
2023/07/31 01:27 upstream d31e3792919e 2a0d0f29 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 UBSAN: array-index-out-of-bounds in xtSearch
2023/07/29 03:23 upstream f837f0a3c948 92476829 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 UBSAN: array-index-out-of-bounds in xtSearch
2023/07/23 07:30 upstream c2782531397f 27cbe77f .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 UBSAN: array-index-out-of-bounds in xtSearch
2023/07/19 01:52 upstream 74f1456c4a5f 022df2bb .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 UBSAN: array-index-out-of-bounds in xtSearch
2023/07/04 00:52 upstream 56cbceab928d 6e553898 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 UBSAN: array-index-out-of-bounds in xtSearch
2023/09/03 02:02 linux-next a47fc304d2b6 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/11/26 07:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8de1e7afcc1c 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 UBSAN: array-index-out-of-bounds in xtSearch
2023/08/11 12:45 linux-next 21ef7b1e17d0 da3c3ef8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root UBSAN: array-index-out-of-bounds in xtSearch
2023/07/05 16:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 80298b6f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 UBSAN: array-index-out-of-bounds in xtSearch
* Struck through repros no longer work on HEAD.