Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5859302ioo; Wed, 1 Jun 2022 14:17:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzexhE/tLhtQBYfrX+z69oGNNXeQR+CN1Ea0obLxsnMwgJbJMCNyc4/B/TtjWUvgDbpPjw/ X-Received: by 2002:a17:902:690b:b0:159:65c:9044 with SMTP id j11-20020a170902690b00b00159065c9044mr1386115plk.47.1654118225727; Wed, 01 Jun 2022 14:17:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654118225; cv=none; d=google.com; s=arc-20160816; b=stK2yrMxx89WlmXxSLi4Gxql7KVD3YqpnyzG8sztalEj2N9Rd2OAOOuGmnH/ScfSdc 8r6JXa6u6IzC6KNuOSJPzQFj8xLwaVgVXEUT1faCjVT9pJobhvrEfGQEzuAJgngy5Nwf JdrNlWi15fnF0gPH17S2nZR6+pusYbyHtfabXXbBiqcxYSNeGhP7hP1UZI4Sut+TBHpM uMfdF0kBGvas+zvSw0CLVtF5oaf4j5QSbtcGiBGMdeid+GbfMP8saGC2/SDCSIZqAbX6 Qd0GPO9HgkGL7Mitr/91F8lzIjH2aemO+XelxbZljcFKbTbJyhZYVw62P1UdR7h8Mo0+ Av7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uXvtrwihxvcxSs1Fpbv4pO6ci42Kw2r2BvzhnZ4/XRo=; b=N/kDPQYyeC6zn7UEshB5fnO0wQRU0asB2f7eo0763rPDtlQRu2MLmWPLVPu7TE28K3 FD5ol5XoKkG4dVec0dbzBh6UL6LBmLTz5X1y5Jli7PsgDYCX7v3oa/imU+g5lElK+jPq y7tpsdX+ALDCtkre8RbL6tWmR6yBJlQsMGMjPQ9D6nLWWxLzl0d1QBUsx5KYGrh52gxq +DA1F7fLbnY/dvquTYiN7JWeq+o/jAPDyD9z0bHbpJSBGbehqxNqTyrJ4Ty9A5L/3H5o CwivBo50X4BR4A0iPPayYKfMVPr+p5LxkIfxc9hslJcfdzBrJliiyKrpB2O962Yx1gpi ZXuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Kbi70Pls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k13-20020a170902c40d00b001570e00e0cesi4263511plk.536.2022.06.01.14.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:17:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Kbi70Pls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5E84B22CEF9; Wed, 1 Jun 2022 13:07:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242649AbiEaJHB (ORCPT + 99 others); Tue, 31 May 2022 05:07:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245123AbiEaJFc (ORCPT ); Tue, 31 May 2022 05:05:32 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51E00369C9 for ; Tue, 31 May 2022 02:05:31 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id s6so4429395lfo.13 for ; Tue, 31 May 2022 02:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uXvtrwihxvcxSs1Fpbv4pO6ci42Kw2r2BvzhnZ4/XRo=; b=Kbi70PlsR5+i802aBEmHE5kSCiTflqXipOGStTJBs7NP5am4ttQBpDKSC/hOGNlPMy tPACEWG22DC0KB6dkW2WlKLfsmHkNVRPHWbE/zLJJWx5el74LNPkTotrhwwn+jf/+w/Y nI9YCvELVEYgAiGlLYRs9ySgxD2TmI+gHcAUgTPLzQeFscQYoNM7/VjJWdkwzo3NIOcX mzsG42+ToUxlCjQbQuf16n5Bu+kGWDNYuKQh/WS0dmuQ3Jh3mWuU72I03QvymNoF0SyD qAatat4lTj2CUpcFoeDWenrT2jU39J+m2GS7CDjezZpEtxdh2AOXtZj2p6bztXsThp0y swZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uXvtrwihxvcxSs1Fpbv4pO6ci42Kw2r2BvzhnZ4/XRo=; b=IcH8G/fwM2iXKIk7DJvu97Sx2VR7R1lCfc5o0MYX6SsH8TxiQE4vKiCP+qizkkmeZc lPoDo2zjJKdTeqgrLucJSxSSQHDJkwjFrJPsrC8H0O+OzXUHjPlellewD0Aee9NMPQCP b7s+O+bs4GP/qYlAX0H11P1iSJVfWyWBYu32tZTJOqafIvtVnSZLaMnr/5sUvXDRy/y1 eC70xolzrEAbh6C6CltI79z5VquesZrlXHKRZa4qpX1vpoXZtH3DbND/arYrTV7bILaW +JVzPrWx7ViqcLpg7TPWbp0q3nrnWvDmt0gYH84VFedr3rv0wedUdaB6HaWVdA2o3FYW cv4w== X-Gm-Message-State: AOAM5328B5f3jPz1ZS7Uspuv2rrGkwifZyNQWeV36m3DpMOKeZDZaTxb kXGVxfEff00DAC9BQZ473+B6kC37V5q3hODOpxUuMQ== X-Received: by 2002:a05:6512:1156:b0:478:79b1:583c with SMTP id m22-20020a056512115600b0047879b1583cmr29681645lfg.206.1653987929308; Tue, 31 May 2022 02:05:29 -0700 (PDT) MIME-Version: 1.0 References: <000000000000f0b26205e04a183b@google.com> <3d3c6b5f-84cd-cb25-812e-dac77e02ddbf@kernel.dk> In-Reply-To: From: Dmitry Vyukov Date: Tue, 31 May 2022 11:05:18 +0200 Message-ID: Subject: Re: [syzbot] UBSAN: array-index-out-of-bounds in io_submit_sqes To: Jens Axboe Cc: Hao Xu , syzbot , asml.silence@gmail.com, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 31 May 2022 at 11:01, Jens Axboe wrote: > > On 5/31/22 3:00 AM, Hao Xu wrote: > > On 5/31/22 16:45, Jens Axboe wrote: > >> On 5/31/22 1:55 AM, syzbot wrote: > >>> Hello, > >>> > >>> syzbot found the following issue on: > >>> > >>> HEAD commit: 3b46e4e44180 Add linux-next specific files for 20220531 > >>> git tree: linux-next > >>> console output: https://syzkaller.appspot.com/x/log.txt?x=16e151f5f00000 > >>> kernel config: https://syzkaller.appspot.com/x/.config?x=ccb8d66fc9489ef > >>> dashboard link: https://syzkaller.appspot.com/bug?extid=b6c9b65b6753d333d833 > >>> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 > >>> > >>> Unfortunately, I don't have any reproducer for this issue yet. > >>> > >>> IMPORTANT: if you fix the issue, please add the following tag to the commit: > >>> Reported-by: syzbot+b6c9b65b6753d333d833@syzkaller.appspotmail.com > >>> > >>> ================================================================================ > >>> ================================================================================ > >>> UBSAN: array-index-out-of-bounds in fs/io_uring.c:8860:19 > >>> index 75 is out of range for type 'io_op_def [47]' > >> > >> 'def' is just set here, it's not actually used after 'opcode' has been > >> verified. > >> > > > > Maybe we can move it to be below the opcode check to comfort UBSAN. > > Yeah that's what I did, just rebased it to get rid of it: > > https://git.kernel.dk/cgit/linux-block/commit/?h=io_uring-5.19&id=fcde59feb1affb6d56aecadc3868df4631480da5 If you are rebasing it, please add the following tag so that the bug is closed later: Tested-by: syzbot+b6c9b65b6753d333d833@syzkaller.appspotmail.com