[v6.1] UBSAN: array-index-out-of-bounds in xtInsert

2 views
Skip to first unread message

syzbot

unread,
Mar 16, 2023, 9:35:40 AM3/16/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 6449a0ba6843 Linux 6.1.19
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=114b2ddcc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=9ed8b3ec03e8c126
dashboard link: https://syzkaller.appspot.com/bug?extid=6b1d79dad6cc6b3eef41
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0ad616da3180/disk-6449a0ba.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/42677a30acb3/vmlinux-6449a0ba.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2e21fe35d03d/bzImage-6449a0ba.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6b1d79...@syzkaller.appspotmail.com

================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:622:9
index 19 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 0 PID: 10945 Comm: syz-executor.5 Not tainted 6.1.19-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
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
xtInsert+0xf41/0xfa0 fs/jfs/jfs_xtree.c:622
extAlloc+0xa60/0x1010 fs/jfs/jfs_extent.c:145
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:3754
__generic_file_write_iter+0x176/0x400 mm/filemap.c:3882
generic_file_write_iter+0xab/0x310 mm/filemap.c:3914
call_write_iter include/linux/fs.h:2205 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x7ae/0xba0 fs/read_write.c:584
ksys_write+0x19c/0x2c0 fs/read_write.c:637
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:0x7f932168c0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f93223d5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f93217ac050 RCX: 00007f932168c0f9
RDX: 000000000208e24b RSI: 0000000020000040 RDI: 0000000000000004
RBP: 00007f93216e7b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff9741439f R14: 00007f93223d5300 R15: 0000000000022000
</TASK>
================================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Mar 16, 2023, 9:52:53 AM3/16/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 2ddbd0f967b3 Linux 5.15.102
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=170307dcc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=d6af46e4bd7d6a2f
dashboard link: https://syzkaller.appspot.com/bug?extid=8a0ad0c54d7928463823
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d46a989959b6/disk-2ddbd0f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4d06a9b2ddaf/vmlinux-2ddbd0f9.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0921009430c0/Image-2ddbd0f9.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8a0ad0...@syzkaller.appspotmail.com

================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:633:9
index 19 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 1 PID: 5502 Comm: syz-executor.1 Not tainted 5.15.102-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282
xtInsert+0xca8/0xd28 fs/jfs/jfs_xtree.c:633
extAlloc+0x884/0xe38 fs/jfs/jfs_extent.c:148
jfs_get_block+0x34c/0xbfc fs/jfs/inode.c:258
nobh_write_begin+0x2d8/0xa28 fs/buffer.c:2650
jfs_write_begin+0x58/0xa0 fs/jfs/inode.c:322
generic_perform_write+0x24c/0x520 mm/filemap.c:3776
__generic_file_write_iter+0x230/0x454 mm/filemap.c:3903
generic_file_write_iter+0xb4/0x1b8 mm/filemap.c:3935
call_write_iter include/linux/fs.h:2101 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x87c/0xb3c fs/read_write.c:594
ksys_write+0x15c/0x26c fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:656
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 <unknown>:584
================================================================================
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:1381:9
index 20 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 1 PID: 5502 Comm: syz-executor.1 Not tainted 5.15.102-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282
xtExtend+0x10f4/0x131c fs/jfs/jfs_xtree.c:1381
extAlloc+0x84c/0xe38 fs/jfs/jfs_extent.c:146
jfs_get_block+0x34c/0xbfc fs/jfs/inode.c:258
nobh_write_begin+0x2d8/0xa28 fs/buffer.c:2650
jfs_write_begin+0x58/0xa0 fs/jfs/inode.c:322
generic_perform_write+0x24c/0x520 mm/filemap.c:3776
__generic_file_write_iter+0x230/0x454 mm/filemap.c:3903
generic_file_write_iter+0xb4/0x1b8 mm/filemap.c:3935
call_write_iter include/linux/fs.h:2101 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x87c/0xb3c fs/read_write.c:594
ksys_write+0x15c/0x26c fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:656
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 <unknown>:584

syzbot

unread,
May 26, 2023, 11:25:02 AM5/26/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: a343b0dd87b4 Linux 6.1.30
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1598dae1280000
kernel config: https://syzkaller.appspot.com/x/.config?x=8ec86bd749598dca
dashboard link: https://syzkaller.appspot.com/bug?extid=6b1d79dad6cc6b3eef41
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=139d3519280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/aebc00d6f042/disk-a343b0dd.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7ff0321ebb5a/vmlinux-a343b0dd.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c928974a56d6/Image-a343b0dd.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/36e9ea69e515/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6b1d79...@syzkaller.appspotmail.com

================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:622:9
index 19 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 1 PID: 4282 Comm: syz-executor.0 Not tainted 6.1.30-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:282
xtInsert+0xd04/0xd70 fs/jfs/jfs_xtree.c:622
extAlloc+0x868/0xdd0 fs/jfs/jfs_extent.c:145
jfs_get_block+0x340/0xb98 fs/jfs/inode.c:248
__block_write_begin_int+0x340/0x13b4 fs/buffer.c:1991
__block_write_begin fs/buffer.c:2041 [inline]
block_write_begin+0x98/0x11c fs/buffer.c:2102
jfs_write_begin+0x44/0x88 fs/jfs/inode.c:304
generic_perform_write+0x278/0x55c mm/filemap.c:3754
__generic_file_write_iter+0x168/0x388 mm/filemap.c:3882
generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:3914
__kernel_write_iter+0x264/0x5f8 fs/read_write.c:517
dump_emit_page fs/coredump.c:881 [inline]
dump_user_range+0x384/0x6b8 fs/coredump.c:908
elf_core_dump+0x2fe4/0x3714 fs/binfmt_elf.c:2312
do_coredump+0x14a0/0x2234 fs/coredump.c:755
get_signal+0xfd8/0x158c kernel/signal.c:2844
do_signal arch/arm64/kernel/signal.c:1076 [inline]
do_notify_resume+0x314/0x3470 arch/arm64/kernel/signal.c:1129
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_da+0xb8/0x184 arch/arm64/kernel/entry-common.c:516
el0t_64_sync_handler+0xcc/0xf0 arch/arm64/kernel/entry-common.c:658
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
================================================================================
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:1370:9
index 20 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 1 PID: 4282 Comm: syz-executor.0 Not tainted 6.1.30-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:282
xtExtend+0x10fc/0x1334 fs/jfs/jfs_xtree.c:1370
extAlloc+0x830/0xdd0 fs/jfs/jfs_extent.c:143
jfs_get_block+0x340/0xb98 fs/jfs/inode.c:248
__block_write_begin_int+0x340/0x13b4 fs/buffer.c:1991
__block_write_begin fs/buffer.c:2041 [inline]
block_write_begin+0x98/0x11c fs/buffer.c:2102
jfs_write_begin+0x44/0x88 fs/jfs/inode.c:304
generic_perform_write+0x278/0x55c mm/filemap.c:3754
__generic_file_write_iter+0x168/0x388 mm/filemap.c:3882
generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:3914
__kernel_write_iter+0x264/0x5f8 fs/read_write.c:517
dump_emit_page fs/coredump.c:881 [inline]
dump_user_range+0x384/0x6b8 fs/coredump.c:908
elf_core_dump+0x2fe4/0x3714 fs/binfmt_elf.c:2312
do_coredump+0x14a0/0x2234 fs/coredump.c:755
get_signal+0xfd8/0x158c kernel/signal.c:2844
do_signal arch/arm64/kernel/signal.c:1076 [inline]
do_notify_resume+0x314/0x3470 arch/arm64/kernel/signal.c:1129
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_da+0xb8/0x184 arch/arm64/kernel/entry-common.c:516
el0t_64_sync_handler+0xcc/0xf0 arch/arm64/kernel/entry-common.c:658
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
================================================================================


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
May 27, 2023, 7:25:03 PM5/27/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 1fe619a7d252 Linux 5.15.113
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10c513fe280000
kernel config: https://syzkaller.appspot.com/x/.config?x=8f10ee30ae29b021
dashboard link: https://syzkaller.appspot.com/bug?extid=8a0ad0c54d7928463823
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=174346b9280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1b707a1e1816/disk-1fe619a7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/19cc598a8bbe/vmlinux-1fe619a7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a6cf7269bae5/Image-1fe619a7.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/d3dbf0c3f688/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8a0ad0...@syzkaller.appspotmail.com

================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:633:9
index 19 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 0 PID: 4032 Comm: syz-executor.0 Not tainted 5.15.113-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282
xtInsert+0xca8/0xd28 fs/jfs/jfs_xtree.c:633
extAlloc+0x884/0xe38 fs/jfs/jfs_extent.c:148
jfs_get_block+0x34c/0xbfc fs/jfs/inode.c:258
nobh_write_begin+0x2d8/0xa28 fs/buffer.c:2650
jfs_write_begin+0x58/0xa0 fs/jfs/inode.c:322
generic_perform_write+0x24c/0x520 mm/filemap.c:3776
__generic_file_write_iter+0x230/0x454 mm/filemap.c:3903
generic_file_write_iter+0xb4/0x1b8 mm/filemap.c:3935
__kernel_write+0x488/0x8b0 fs/read_write.c:539
__dump_emit+0x200/0x338 fs/coredump.c:875
dump_emit+0x288/0x36c fs/coredump.c:912
dump_user_range+0xd0/0x35c fs/coredump.c:949
elf_core_dump+0x2ef4/0x3640 fs/binfmt_elf.c:2285
do_coredump+0x12c8/0x2890 fs/coredump.c:826
get_signal+0x3dc/0x1550 kernel/signal.c:2875
do_signal arch/arm64/kernel/signal.c:890 [inline]
do_notify_resume+0x320/0x32b8 arch/arm64/kernel/signal.c:943
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline]
el0_da+0x118/0x20c arch/arm64/kernel/entry-common.c:483
el0t_64_sync_handler+0xc0/0xe4 arch/arm64/kernel/entry-common.c:617
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
================================================================================
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:190:9
index 19 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 0 PID: 4032 Comm: syz-executor.0 Not tainted 5.15.113-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282
xtLookup+0x70c/0x710 fs/jfs/jfs_xtree.c:190
extHint+0x200/0x544 fs/jfs/jfs_extent.c:374
jfs_get_block+0x308/0xbfc fs/jfs/inode.c:256
nobh_write_begin+0x2d8/0xa28 fs/buffer.c:2650
jfs_write_begin+0x58/0xa0 fs/jfs/inode.c:322
generic_perform_write+0x24c/0x520 mm/filemap.c:3776
__generic_file_write_iter+0x230/0x454 mm/filemap.c:3903
generic_file_write_iter+0xb4/0x1b8 mm/filemap.c:3935
__kernel_write+0x488/0x8b0 fs/read_write.c:539
__dump_emit+0x200/0x338 fs/coredump.c:875
dump_emit+0x288/0x36c fs/coredump.c:912
dump_user_range+0xd0/0x35c fs/coredump.c:949
elf_core_dump+0x2ef4/0x3640 fs/binfmt_elf.c:2285
do_coredump+0x12c8/0x2890 fs/coredump.c:826
get_signal+0x3dc/0x1550 kernel/signal.c:2875
do_signal arch/arm64/kernel/signal.c:890 [inline]
do_notify_resume+0x320/0x32b8 arch/arm64/kernel/signal.c:943
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline]
el0_da+0x118/0x20c arch/arm64/kernel/entry-common.c:483
el0t_64_sync_handler+0xc0/0xe4 arch/arm64/kernel/entry-common.c:617
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
================================================================================
================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:1381:9
index 20 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 0 PID: 4032 Comm: syz-executor.0 Not tainted 5.15.113-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282
xtExtend+0x10f4/0x131c fs/jfs/jfs_xtree.c:1381
extAlloc+0x84c/0xe38 fs/jfs/jfs_extent.c:146
jfs_get_block+0x34c/0xbfc fs/jfs/inode.c:258
nobh_write_begin+0x2d8/0xa28 fs/buffer.c:2650
jfs_write_begin+0x58/0xa0 fs/jfs/inode.c:322
generic_perform_write+0x24c/0x520 mm/filemap.c:3776
__generic_file_write_iter+0x230/0x454 mm/filemap.c:3903
generic_file_write_iter+0xb4/0x1b8 mm/filemap.c:3935
__kernel_write+0x488/0x8b0 fs/read_write.c:539
__dump_emit+0x200/0x338 fs/coredump.c:875
dump_emit+0x288/0x36c fs/coredump.c:912
dump_user_range+0xd0/0x35c fs/coredump.c:949
elf_core_dump+0x2ef4/0x3640 fs/binfmt_elf.c:2285
do_coredump+0x12c8/0x2890 fs/coredump.c:826
get_signal+0x3dc/0x1550 kernel/signal.c:2875
do_signal arch/arm64/kernel/signal.c:890 [inline]
do_notify_resume+0x320/0x32b8 arch/arm64/kernel/signal.c:943
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline]
el0_da+0x118/0x20c arch/arm64/kernel/entry-common.c:483
el0t_64_sync_handler+0xc0/0xe4 arch/arm64/kernel/entry-common.c:617
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

syzbot

unread,
Jun 4, 2023, 12:09:49 AM6/4/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: d2869ace6eeb Linux 6.1.31
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=129eb345280000
kernel config: https://syzkaller.appspot.com/x/.config?x=623aacf949348d7d
dashboard link: https://syzkaller.appspot.com/bug?extid=6b1d79dad6cc6b3eef41
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15dbde93280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=167f0b79280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2ed651ed0d8f/disk-d2869ace.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b8d3199c542c/vmlinux-d2869ace.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a44812549bf7/bzImage-d2869ace.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/84ae90a0480d/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6b1d79...@syzkaller.appspotmail.com

================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:622:9
index 19 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 1 PID: 3572 Comm: syz-executor647 Not tainted 6.1.31-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
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
xtInsert+0xf41/0xfa0 fs/jfs/jfs_xtree.c:622
extAlloc+0xa60/0x1010 fs/jfs/jfs_extent.c:145
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:3754
__generic_file_write_iter+0x176/0x400 mm/filemap.c:3882
generic_file_write_iter+0xab/0x310 mm/filemap.c:3914
call_write_iter include/linux/fs.h:2205 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x7ae/0xba0 fs/read_write.c:584
ksys_write+0x19c/0x2c0 fs/read_write.c:637
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:0x7f47e98b9739
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f47e98652f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f47e99447e0 RCX: 00007f47e98b9739
RDX: 00000000000ffe00 RSI: 0000000020004200 RDI: 0000000000000005
RBP: 00007f47e991117c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f47e9910f78
R13: 0000000020004200 R14: 0031656c69662f2e R15: 00007f47e99447e8
</TASK>

syzbot

unread,
Aug 14, 2023, 4:56:19 PM8/14/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 24c4de4069cb Linux 5.15.126
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12db9763a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=295181026c532aa4
dashboard link: https://syzkaller.appspot.com/bug?extid=8a0ad0c54d7928463823
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16690d53a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=130ffd6fa80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d5a4ab4e1019/disk-24c4de40.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a59ca5ab086b/vmlinux-24c4de40.xz
kernel image: https://storage.googleapis.com/syzbot-assets/007e8add9f9f/bzImage-24c4de40.xz
mounted in repro #1: https://storage.googleapis.com/syzbot-assets/739c68ce3df8/mount_0.gz
mounted in repro #2: https://storage.googleapis.com/syzbot-assets/82c3b3bee93d/mount_8.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8a0ad0...@syzkaller.appspotmail.com

================================================================================
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_xtree.c:633:9
index 19 is out of range for type 'xad_t[18]' (aka 'struct xad[18]')
CPU: 0 PID: 3487 Comm: syz-executor147 Not tainted 5.15.126-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+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
xtInsert+0xf41/0xfa0 fs/jfs/jfs_xtree.c:633
extAlloc+0xa60/0x1010 fs/jfs/jfs_extent.c:148
jfs_get_block+0x417/0xe50 fs/jfs/inode.c:258
nobh_write_begin+0x398/0xda0 fs/buffer.c:2650
jfs_write_begin+0x3e/0x80 fs/jfs/inode.c:322
generic_perform_write+0x2bf/0x5b0 mm/filemap.c:3776
__generic_file_write_iter+0x381/0x4f0 mm/filemap.c:3871
generic_file_write_iter+0xa7/0x1b0 mm/filemap.c:3935
do_iter_readv_writev+0x594/0x7a0
do_iter_write+0x1ea/0x760 fs/read_write.c:855
iter_file_splice_write+0x806/0xfa0 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0xe3/0x1c0 fs/splice.c:936
splice_direct_to_actor+0x500/0xc10 fs/splice.c:891
do_splice_direct+0x285/0x3d0 fs/splice.c:979
do_sendfile+0x625/0xff0 fs/read_write.c:1249
__do_sys_sendfile64 fs/read_write.c:1317 [inline]
__se_sys_sendfile64+0x178/0x1e0 fs/read_write.c:1303
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+0x61/0xcb
RIP: 0033:0x7f0ea777da69
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:00007f0ea7738218 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f0ea7816728 RCX: 00007f0ea777da69
RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000008
RBP: 00007f0ea7816720 R08: 0000000000000000 R09: 0000000000000000
R10: 0001000000201004 R11: 0000000000000246 R12: 00007f0ea77e34e4
R13: 00007f0ea77d204f R14: 00007f0ea77d2057 R15: 0031656c69662f2e

syzbot

unread,
Nov 28, 2023, 1:23:06 AM11/28/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit a779ed754e52d582b8c0e17959df063108bd0656
git tree: upstream
Author: Dave Kleikamp <dave.k...@oracle.com>
Date: Thu Oct 5 14:16:14 2023 +0000

jfs: define xtree root and page independently

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=147bbac4e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=d1540e3da5e5623f
dashboard link: https://syzkaller.appspot.com/bug?extid=6b1d79dad6cc6b3eef41
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1221b384e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=100a1a14e80000


Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages