Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1276494lfc; Wed, 1 Jun 2022 13:56:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXzDC7S0vC6uxI3IWrfGY5pXLruKjPh7VWgh1SrpSZdB+ddth7p3uGqngL6ny8mFqrmseO X-Received: by 2002:a17:902:ecc5:b0:164:1a5d:576f with SMTP id a5-20020a170902ecc500b001641a5d576fmr1280558plh.19.1654117019193; Wed, 01 Jun 2022 13:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654117019; cv=none; d=google.com; s=arc-20160816; b=ErsTj9aoo1QiiVcZbob1+aA+PC40IB73Q2L44xqNAkraxYY2scmQjXnI9f9sTpiKPf ZpsEPlRrYvd8CD6NGLUjIkCg/U6hRW23w2MvN0CiCjzyrspnzNaz04lfVpEkUsQ3MPVY Z2QZGyPtE5giRTBnrXGGXyYgDxOpVXZ+TKUdlJbOs4zdUmKC2MI/GO7LCcYjlC8nXkmY zlfVTsX75o85x4K1KXZafAerXSZEtiKfLcJkvubu9oIgjmtJ9TqbDCN3IKdSx7IN1Ys5 WHVphQm2qiOaT6y22ctdXDtMPhwwbTVm//EC+1KWTG0paK4SUeeELyR7Ai2rZj1bpoMV VHPQ== 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=hdz49r3V2X3U4pi1USEl8OmSAZKCJRD+QzfUeTux25s=; b=d5myDb5VwTs87oOVAbuEB9bllQxg2nBsI2Ng8CxWk2KSSJWlHFxbCtjuZyOhmXuYu/ Dn2n4/hhmAstGrvlxPKkOmRGbydRtNEQLt3xs4qAe9deek3NAqPXfJ5CYMSg44Yv8vYR d8DNxPpCpBsi0WSo6kxHSPFWp6F1qPio2Q7KNPr3RRfwW/XBaMhp63RDWhHbetGf0L2+ PxYCvfyvL7s7PZBPMWMw3GkUByUk0mH6iPSF1LmKNscYlEEOzCelwlpfjIDGpdQpKeS1 q8S6yiGwKogCI8HuhzTNkFFA48IO7PbvrdUbIoS3AYGp57FG1xhY9mKrDuVJYYoFMJFN /zbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=TNJmaOj2; 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 h62-20020a638341000000b003f6382e04edsi3676581pge.340.2022.06.01.13.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:56:59 -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=TNJmaOj2; 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 712C314CDF7; Wed, 1 Jun 2022 12:58:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245001AbiEaIwa (ORCPT + 99 others); Tue, 31 May 2022 04:52:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244117AbiEaIw2 (ORCPT ); Tue, 31 May 2022 04:52:28 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F042032ED1 for ; Tue, 31 May 2022 01:52:23 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id br17so20378860lfb.2 for ; Tue, 31 May 2022 01:52:23 -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=hdz49r3V2X3U4pi1USEl8OmSAZKCJRD+QzfUeTux25s=; b=TNJmaOj24mhsrSk94wpVXAbkJKeNJX6tOccrc4N8hmQfoaET8m7TSwEohBoYxRihFU vbqzYwYM6Bfo5OSj/gxzloziDoL5C+iVjpqSD2TgFYbXKbnsaizWC0A3pK3nBmnBFY99 JNcitfsMokb+yCr2wje+baZK13PgiuqCiUf7JYhJ4dJsMpSIy9p5u2HkFJq9ZjpNB/EZ qHK1koJrLPlTMCX1w6nixQCbw8fujVWEpYz4+Zrz6YRjWCyV+jq9bnG3bEUi+RyBdgFM rTi28iVBAxOryrOwdPZPwNEsco5ixgqLbiaGS5AnyFrLf/G6CT5yArJejo0lLw1FkBmE 4xUw== 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=hdz49r3V2X3U4pi1USEl8OmSAZKCJRD+QzfUeTux25s=; b=HXEIQksrt/74hRanJ+hVkYVtaaof0AgdRU1H6VDwSNYK64iLE0mSOOSBIHcuJNN4k5 6K/qx72O+5/oWjw6dnrUS4paGlw9Xn6XyFvbueXTu1NmwqqTpEs/IKYNlYYKxcKxdT7h 2/XisO0tDjrc3OhauftIPwj5MmVegq69d5gGodXSTbebr3Q3SzUPko9AZlz3cxtJMwGV o5oqLfODJNUIh0yeOji1K+A8AI76ba6SoKKjwruO/aiHIjK17/QuD00gLmS77lEhsYnK qukLIFn1cU0quOl0a9LMgma1AM+XnyYUy6GRHY9ofeTxUs9velF6KlWYQQyCwG+tihKQ +k4Q== X-Gm-Message-State: AOAM533PTIs8+NJo0UMSWkcmrbKnMcl22gPf1AQbwdiqvuQblOtbzQvE Nlaha2fCHmbTB3FO3rz5ZmtX7RYBKzwg+ehoHMsAhA== X-Received: by 2002:a19:7106:0:b0:478:68b5:86d9 with SMTP id m6-20020a197106000000b0047868b586d9mr32260909lfc.417.1653987142058; Tue, 31 May 2022 01:52:22 -0700 (PDT) MIME-Version: 1.0 References: <000000000000f0b26205e04a183b@google.com> <3d3c6b5f-84cd-cb25-812e-dac77e02ddbf@kernel.dk> In-Reply-To: <3d3c6b5f-84cd-cb25-812e-dac77e02ddbf@kernel.dk> From: Dmitry Vyukov Date: Tue, 31 May 2022 10:52:10 +0200 Message-ID: Subject: Re: [syzbot] UBSAN: array-index-out-of-bounds in io_submit_sqes To: Jens Axboe Cc: 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 10: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. An interesting thing about C is that now the compiler is within its rights to actually remove the check that is supposed to validate the index because indexing io_op_defs[opcode] implies that opcode is already within bounds, otherwise the program already has undefined behavior, so removing the check is that case is also OK ;)