Re: [syzbot] [io-uring?] UBSAN: array-index-out-of-bounds in io_setup_async_msg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 9/13/23 14:10, Pavel Begunkov wrote:
On 9/13/23 13:11, syzbot wrote:

syzbot found the following issue on:

HEAD commit:    0bb80ecc33a8 Linux 6.6-rc1
git tree:       upstream
kernel config:
dashboard link:
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro:
C reproducer:

Downloadable assets:
disk image:
kernel image:

The issue was bisected to:

commit 2af89abda7d9c2aeb573677e2c498ddb09f8058a
Author: Pavel Begunkov <asml.silence@xxxxxxxxx>
Date:   Thu Aug 24 22:53:32 2023 +0000

     io_uring: add option to remove SQ indirection

bisection log:
final oops:
console output:

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a4c6e5ef999b68b26ed1@xxxxxxxxxxxxxxxxxxxxxxxxx
Fixes: 2af89abda7d9 ("io_uring: add option to remove SQ indirection")

UBSAN: array-index-out-of-bounds in io_uring/net.c:189:55
index 3779567444058 is out of range for type 'iovec [8]'
CPU: 1 PID: 5039 Comm: syz-executor396 Not tainted 6.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
  __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
  io_setup_async_msg+0x2a0/0x2b0 io_uring/net.c:189

Which is

/* if were using fast_iov, set it to the new one */
if (iter_is_iovec(&kmsg->msg.msg_iter) && !kmsg->free_iov) {
     size_t fast_idx = iter_iov(&kmsg->msg.msg_iter) - kmsg->fast_iov;
     async_msg->msg.msg_iter.__iov = &async_msg->fast_iov[fast_idx];

The bisection doesn't immediately make sense, I'll try
it out

#syz test: netmsg-init-base

First just test upstream because I'm curious about reproducibility

Pavel Begunkov

[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux