Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1240449lfc; Wed, 1 Jun 2022 12:47:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTwH3vLy30118HN8jhljhM3ceMwzDWERJrQsJU1HHjvvD27IiFulExQ+Jaom3mU+NfMHgy X-Received: by 2002:a17:903:1107:b0:15e:f451:4034 with SMTP id n7-20020a170903110700b0015ef4514034mr1022906plh.3.1654112821332; Wed, 01 Jun 2022 12:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654112821; cv=none; d=google.com; s=arc-20160816; b=p3/LpCZ6+6xDhjfJmN1OZxDjPLnyPFr7nowIYElorNIAs4sSMCACc/92x5a7DYFHe4 b5wEJTYDE4pT4QgmGKInbP8BmXEhG+OEA/Ke7zzQKpR7/OGbI7G3VDtufybYXyk2jwT+ +tTksxWl9i89v62n5uAdR6I++MEWouEsBLC27+cK1DdQh6ZkyN2E2Xsmt39nAfvcUNhJ aBYFjZdLgQqzTvFxVUTKketeQU+vU4q8xsfhWwhenS5usLbZxkfLNvTSTn8UTUJfunLq J+Apv5kbNt4EOXUrbYrRV85+IXB4o6KzjGJhGLP3DQkAyD265BvUNdwCGA5WiFeS3H9T 3s3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Da7CpUzfigAT4CIYpAa4S3dnkp2cNQHn7AtCXpqTizs=; b=eMhmexIUks9z8tNVqTehHrBpr+WRRCc5HWX0Wg2sL1L3OIqYBzcRvoMyd1v445PLCx P83LQtBVM9EfIXXoWBq2eC2faKxKgyWD87fkOZF88yyAsh1jo1xMd9Bb1leyyXnmPiDI xGTRXUGBibzsgu53WkerLlf1bZydV0MShhkPUtJwMKP0dV1Z/LNWgmWayZ6wHkuDQ426 gNEboBXdA3Y0rs/XuyDW4aUBgX/2wU8zApNWkWCTL44xC39QM6Do7eahQdcQXZDeJzRT 3O+//qV7sHI72k+JBnux3EtiX3VLZrFpzu+ZO2r9euSsyc92vFzDhfGS4tUkrXSh0Qe3 +2ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=lIHzKa+j; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id mm3-20020a17090b358300b001e673529d50si1317591pjb.65.2022.06.01.12.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 12:47:01 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=lIHzKa+j; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8E1541312BC; Wed, 1 Jun 2022 12:11:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245075AbiEaJH0 (ORCPT + 99 others); Tue, 31 May 2022 05:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245095AbiEaJHQ (ORCPT ); Tue, 31 May 2022 05:07:16 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AA2421251 for ; Tue, 31 May 2022 02:07:13 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id s24so10424901wrb.10 for ; Tue, 31 May 2022 02:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Da7CpUzfigAT4CIYpAa4S3dnkp2cNQHn7AtCXpqTizs=; b=lIHzKa+jSnfytsD+Mp7xDDDZi7o4cUhwyisi0ts+8d3JRUbjVIV38DYCJHOl8pq2ib UB6/+hbLc2Sy2SYynmoqY/YWspccNUcJhI3/Sr2/+C9rg4S+digPGeenGn/SlFQCtKTd Gv8Jb+u/6n3HRS+vVcBKXeNKB2B40wlgPmWTbJqat3UipFJjX4oQmjTNENDYcMOvWUoT Eps+CWDrirAYSy07eTbSUzozxFjnoTuWQ/RyWsrs3m2UCCUU29fSVVaiJfWmtkAL/bUq Km2FcwbmPjMSMDx2wv+6XivFP7x6QJGHUYpyBcr4ouSR3yHAjaFL0T/YPnPy47UxTgIY jJlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Da7CpUzfigAT4CIYpAa4S3dnkp2cNQHn7AtCXpqTizs=; b=6IoRBWsdbU9M9Tfj2p8TecASy1Xf9rY28ku4mwg9GVnu9Iefuy23bm6aLVEILwWzLg KEjcxFCK9acNrLykF6afvlPDfYDFVcs3dZXOc9JXuuENrUDGBYjme1REEg4McspV8GeW 6ezYNeeAO45a1WTLJNoddj5LGIDRzCobgJjON+seQ1xssDFTNxngQuKerdROoSLqTTPk k10aKl24dbCROJqdxMuTMGBLc8YmBkHMIevokg/SAwkd+NP3b6X39y1KyqCwGwFMDxEX F3T9Qh8SbjNBsWe21aAxPlQZb6QNPUqiEIUROHXgAv0c3wVRgjABD5zJFwwglwwEhowk oMEQ== X-Gm-Message-State: AOAM5328L39lIcapQC8atFd+AKqh7u6RhOesa8+SU5H+BOKjHJ+lOTYp RtgoDJyp7fZ/f3RrEk3JnrCVPw== X-Received: by 2002:a5d:4fc2:0:b0:210:940:b1fd with SMTP id h2-20020a5d4fc2000000b002100940b1fdmr21151584wrw.134.1653988031891; Tue, 31 May 2022 02:07:11 -0700 (PDT) Received: from [10.188.163.71] (cust-east-parth2-46-193-73-98.wb.wifirst.net. [46.193.73.98]) by smtp.gmail.com with ESMTPSA id m10-20020a7bcb8a000000b00397243d3dbcsm1545690wmi.31.2022.05.31.02.07.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 May 2022 02:07:11 -0700 (PDT) Message-ID: <7c582099-0eef-6689-203a-606cb2f69391@kernel.dk> Date: Tue, 31 May 2022 03:07:10 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [syzbot] UBSAN: array-index-out-of-bounds in io_submit_sqes Content-Language: en-US To: Dmitry Vyukov Cc: Hao Xu , syzbot , asml.silence@gmail.com, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com References: <000000000000f0b26205e04a183b@google.com> <3d3c6b5f-84cd-cb25-812e-dac77e02ddbf@kernel.dk> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 5/31/22 3:05 AM, Dmitry Vyukov wrote: > 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 Sorry, missed that, would be a bit confusing? 5.20 branch is rebased on top of that too. Can we just do: #syz fix: io_uring: add io_op_defs 'def' pointer in req init and issue ? -- Jens Axboe