Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1266217lfc; Wed, 1 Jun 2022 13:35:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrb4Crp/khcoocYUFUOzWxxg3HuSJ+ACKZhK2xku5qQchrA+RAK3zQz/O62tJ8Sw4JN+yG X-Received: by 2002:a05:6a00:ad2:b0:4f1:2734:a3d9 with SMTP id c18-20020a056a000ad200b004f12734a3d9mr68183336pfl.61.1654115702422; Wed, 01 Jun 2022 13:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654115702; cv=none; d=google.com; s=arc-20160816; b=w9oLIU7DcmK785q9kDy579tZN5DesD0RBWZeQzaCV2HHK2NcFwqnjGUXSzvB9GoAiO i0Oe+MLW6F3CCwOjA77do1dc3sAP/l4B5bCIDITatysw03VpzKPeVtSXOEfe+QFr2yIG kmcCvsAlTOxYzpBTku03uKqoBFZLKZ+chVFgXtp+hosGPKjxv3np451Q6fu3HVQ/2J5S 6QRgVqvRZf+RJcZo3nciwjXxg951xinDQlcOgSuYLK5PCZZa6cFRysJFD35+pDYbFecb mJAWCSlpsHZpCaqvr8d4U4G0YO1q5QVr0uVOQrlAv1g9gax88AF40vjImGoCBjJWcd7T HFIA== 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=4rKprNNec0+8a+HzIgH8CQphH+rVeuEGy0qnazrjUTg=; b=EhfcuEBjKCrU49PsVti9QvFTUwY2TWN4jp2Yv7sNvgbX5FkOs0WshicRJouEO6509R D7HBh78lr9IhmJ1VXvPs6Z9jKSHIfgz0hZd7oKh8B/LPV+SZ2d6E4XiyPpH8gjMYwNR8 CGQoPRRy4OE9Apwm0BpvzwYtqC5MZFgYuK6XJ+c176pCOs5MvWWxb3mXgIeE2F7UXi6S eLd5rkLi5V6l4KfbNlRXqPZcK/XcHZwGMUt3k0nIT1Ly+iseCEF5JOeZfHUdJ7UTiugD j0OdHguNEja1Haoo1wQUP9P7nEdCv2dsO9PwDSSO32auNQ+Ya0k2M+Ho7aq25heE8Scc xwxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="3Seb/Sz+"; 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 s5-20020a63f045000000b003ab1f09b881si3345464pgj.514.2022.06.01.13.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:35:02 -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="3Seb/Sz+"; 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 B95A827F5D0; Wed, 1 Jun 2022 12:44:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244888AbiEaJx2 (ORCPT + 99 others); Tue, 31 May 2022 05:53:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240624AbiEaJxU (ORCPT ); Tue, 31 May 2022 05:53:20 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12E8513C for ; Tue, 31 May 2022 02:53:18 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id c5-20020a1c3505000000b0038e37907b5bso933543wma.0 for ; Tue, 31 May 2022 02:53:17 -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=4rKprNNec0+8a+HzIgH8CQphH+rVeuEGy0qnazrjUTg=; b=3Seb/Sz+CcptZDi7CfLb3KgZbKncX0COAHsXhzL6CjsKPWirp71M6Djsn1k5YpLrUG VQmKsc7E3EDMcXZEvGY91Q6SictNYrMkxRuIXbyAp1RpudQjeex0/Ieta/SlDbjdVz8J SXJMcYiQ6TLjKCNjKMlVSvDXlauq5dZv8FqIKd0MG59IvzGlk5PNPq0raHqwjXYDRavn oBYFg14YHtKehznVGuxqRwVAC7AfYV5pnZaCclLqUynw/UBRGBmgd80N1DF4Ec2f07aF fxzEaWglThg0celts2sOV2kSSy1+pMH38+LXiHUdZ8lGjwa1EsuOuRLGlARu4mVETmb5 NdDw== 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=4rKprNNec0+8a+HzIgH8CQphH+rVeuEGy0qnazrjUTg=; b=k0PEvgOY0+qRV3VVTSbRLH+jyaVyxaR4cggMmJxDYxJCb7G+7qVY5XSKqxXCV4uwj/ 2eHFw60/6b0R4vzAjvxXZlGxXCFs4niYC5HJeN74jEKTvExqLMxpu7fwhXp9btn9bloK rH33xHzUkenKfFCsxDsusHH8Ap6NE3zDW0gh3OGBucgv9G7Nlj+oc8sFGDtPu3GpEuht xg36S+LDLrLQXWvQTK8S+JUCF1G3ILz/wnZpWcWtsgptg1iXzwMWaJIDMADurrgaIrHY fNldtwQjN3vz+A6WR5SAnTdoWDb0iy7o3ay/RUeB0axkmr0KC5l0xAT5x54NyoOo3loi IZwA== X-Gm-Message-State: AOAM532rA1625YLqCz5//2nfMpzy6gMxlZ0J3pTl0RbpzxbovWXbxkGW CAD8E/KYeEjTIjArEUUib2N8R3FIMa8ep1J0 X-Received: by 2002:a05:600c:4f0c:b0:397:6a3a:d3f9 with SMTP id l12-20020a05600c4f0c00b003976a3ad3f9mr22904723wmq.103.1653990796546; Tue, 31 May 2022 02:53:16 -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 c18-20020a5d5292000000b0020ff3a2a925sm13236509wrv.63.2022.05.31.02.53.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 May 2022 02:53:15 -0700 (PDT) Message-ID: <7b07cce6-b8a8-7f0b-f4ab-285a9369ef0a@kernel.dk> Date: Tue, 31 May 2022 03:53:14 -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> <7c582099-0eef-6689-203a-606cb2f69391@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:14 AM, Dmitry Vyukov wrote: > On Tue, 31 May 2022 at 11:07, Jens Axboe wrote: >> >> 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? > > Why confusing? It tested it, no? Usually I'd use that tag if it's a separate commit that fixes an issue, and someone (or a bot) has tested it. I think we both agree that the change will fix it, but not really tested at that point. Or maybe it is now :) > >> 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 >> >> ? > > In most cases it will work. However, there is no way to distinguish > unfixed and fixed versions of the patch based on the title. > So if the unfixed version manages to reach all syzbot builds, it will > close the bug at that point. And then can start reporting duplicates > since the bug is still present. But practically unlikely to happen. > The tag allows to distinguish unfixed and fixed versions of the patch, > so it will work reliably w/o possible duplicates. Gotcha. Usually I don't rebase anyway, but easier in this case. -- Jens Axboe