syzbot


UBSAN: array-index-out-of-bounds in txCommit (2)

Status: upstream: reported C repro on 2023/11/05 09:28
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+e829cfdd0de521302df4@syzkaller.appspotmail.com
First crash: 180d, last: 9d16h
Fix commit to backport (bisect log) :
tree: upstream
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

  
Bug presence (2)
Date Name Commit Repro Result
2023/11/06 linux-6.1.y (ToT) 4a61839152cc C [report] UBSAN: array-index-out-of-bounds in txCommit
2023/11/06 upstream (ToT) 77fa2fbe87fc C Didn't crash
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: array-index-out-of-bounds in txCommit jfs C error done 396 183d 564d 25/26 fixed on 2024/01/08 11:23
linux-5.15 UBSAN: array-index-out-of-bounds in txCommit 1 371d 371d 0/3 auto-obsoleted due to no activity on 2023/08/23 09:03
linux-6.1 UBSAN: array-index-out-of-bounds in txCommit 1 303d 303d 0/3 auto-obsoleted due to no activity on 2023/10/14 03:47
linux-5.15 UBSAN: array-index-out-of-bounds in txCommit (2) origin:lts-only C unreliable 12 13d 172d 0/3 upstream: reported C repro on 2023/11/14 02:25
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/12/17 13:59 4h02m fix candidate upstream job log (1)

Sample crash report:
loop0: detected capacity change from 0 to 32768
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_txnmgr.c:1743:5
index 18 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 1 PID: 3546 Comm: syz-executor130 Not tainted 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_out_of_bounds+0x118/0x140 lib/ubsan.c:282
 xtLog fs/jfs/jfs_txnmgr.c:1743 [inline]
 txLog fs/jfs/jfs_txnmgr.c:1396 [inline]
 txCommit+0x3f07/0x6ba0 fs/jfs/jfs_txnmgr.c:1264
 jfs_commit_inode+0x362/0x580 fs/jfs/inode.c:108
 extAlloc+0xca8/0x1000 fs/jfs/jfs_extent.c:172
 jfs_get_block+0x417/0xe50 fs/jfs/inode.c:248
 __block_write_begin_int+0x544/0x1a30 fs/buffer.c:1991
 __block_write_begin fs/buffer.c:2041 [inline]
 block_write_begin+0x98/0x1f0 fs/buffer.c:2102
 jfs_write_begin+0x2d/0x60 fs/jfs/inode.c:304
 generic_perform_write+0x2fc/0x5e0 mm/filemap.c:3817
 __generic_file_write_iter+0x176/0x400 mm/filemap.c:3945
 generic_file_write_iter+0xab/0x310 mm/filemap.c:3977
 do_iter_write+0x6e6/0xc50 fs/read_write.c:861
 iter_file_splice_write+0x830/0xfc0 fs/splice.c:685
 do_splice_from fs/splice.c:763 [inline]
 direct_splice_actor+0xe3/0x1c0 fs/splice.c:950
 splice_direct_to_actor+0x4c7/0xc30 fs/splice.c:896
 do_splice_direct+0x2a5/0x3e0 fs/splice.c:1002
 do_sendfile+0x61c/0xff0 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64+0x178/0x1e0 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f3434ef2269
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 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:00007f3434eb0218 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f3434f7f648 RCX: 00007f3434ef2269
RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000005
RBP: 00007f3434f7f640 R08: 0000000000000000 R09: 0000000000000000
R10: 0001000000201005 R11: 0000000000000246 R12: 00007f3434f7f64c
R13: 00007f3434f4bef8 R14: 00007f3434f46060 R15: 0031656c69662f2e
 </TASK>
================================================================================

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/24 12:34 linux-6.1.y 6741e066ec76 21339d7b .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in txCommit
2023/11/05 23:20 linux-6.1.y 4a61839152cc 500bfdc4 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in txCommit
2024/01/04 13:35 linux-6.1.y a507f147e6f0 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in txCommit
2023/12/21 16:12 linux-6.1.y 4aa6747d9352 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in txCommit
2023/12/05 19:35 linux-6.1.y c6114c845984 858d62d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in txCommit
2023/11/16 15:55 linux-6.1.y fb2635ac69ab cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in txCommit
2023/11/14 03:05 linux-6.1.y fb2635ac69ab cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in txCommit
2023/11/09 21:50 linux-6.1.y fb2635ac69ab 56230772 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in txCommit
2023/11/05 09:27 linux-6.1.y 4a61839152cc 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan UBSAN: array-index-out-of-bounds in txCommit
* Struck through repros no longer work on HEAD.