Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1267203lfc; Wed, 1 Jun 2022 13:36:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMVDM2T9NhCkc4lP58UjrejLVQ+AksAPyrAZjxnl0Dt6gcLQStmhIIJog6065y6CaJnP+Z X-Received: by 2002:a17:902:e745:b0:163:5074:6c2f with SMTP id p5-20020a170902e74500b0016350746c2fmr1279102plf.140.1654115811671; Wed, 01 Jun 2022 13:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654115811; cv=none; d=google.com; s=arc-20160816; b=n76BqsrbxswyUrJ/lZfWxWFFzqHpIN2uZPbQTR7rP4CNahZ/oGmE86a3ruNVA8mBeb eQTBiIYI3m5yACbW06kxVxoIpy8XJXa+82vkOQnTnk1fF3EU6xk8n96Ut6DUOETf8OJ2 np0kyTTH8Jiqbtzkrv1w7ZPEHZgqQ88l5sAn3dtk051u4uPXL1kNrwMMMEySNQm0DjV5 EsYZPRzv1JayZe4fTTbFLcwR3992ij5n1mX+CEFtJRJlFI7JHsHvoPZoDPZ/bbEGXV99 85Q43+5DRGz3tB+zMPafAFR30iwYYZ/cizmggkG9e0fiKQfWqELzfgnXnrBHixIauP2c 9KTQ== 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=HgvSkaz2FuWSd/vi2YSVeb+lmMXTx/j35bYriHV9OxE=; b=GdCABmWlKOh3BJVZiFqDymC0+k2eKXglBZuGkS2rKIj0PN+y12XpF+K0VAt/0RgS2Z 0NB2mkO1sDZKX7kGxCOTL+UXaOERsfdw5nWpbdgYpluPwKnLZspelUQEicHNZ8f8A+gr 669kVIXa2jqfrmysS1f3OLpGk+Z0/aoIPHoqkCqvaJBst09ZhSBdp28CrfwGxDAqof+J E1zmcs2j3efmsv9JE16rigktyX/L/9hjcrpdKkigaX9wfDdEId5LKSfmKMb0ZJ3vYEgf GBi4qvyUiUJrs6QtUZZ5oRMsKkzYyZXR09Z5R2/rsUJMGWOO22NvfiPEvdzMkn+JG5uI 27GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=CREHGaKs; 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 i10-20020a170902e48a00b00153bc4c8388si3286138ple.499.2022.06.01.13.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:36:51 -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=CREHGaKs; 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 007971DE8DA; Wed, 1 Jun 2022 12:45:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245027AbiEaI5C (ORCPT + 99 others); Tue, 31 May 2022 04:57:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233830AbiEaI5A (ORCPT ); Tue, 31 May 2022 04:57:00 -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 7AAB4BF71 for ; Tue, 31 May 2022 01:56:50 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id s24so10384400wrb.10 for ; Tue, 31 May 2022 01:56:49 -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=HgvSkaz2FuWSd/vi2YSVeb+lmMXTx/j35bYriHV9OxE=; b=CREHGaKstjNogJznHmWAIZNbrWaTcNE4Ru4s2PowqiinEyXhLbbW/PUkq6Lqn8Gy4M ifY/tA+RPJfHyrJR5DvydTDr++woNyydw8+NCfiiZR+XlsuPyN/BSSGIZoEzXjRJ9Wf8 vj6DtQPWKdN5kZ9c88/vH2WwY36hVGaU32jIZmsIdDgRkJcRspn0bQLj6B7OwV9HwfTN hTo050PDtpMstOPly/KAboCpwTx5fyLb7znd5VJz4nMdeC4LnVXdv4BOXnWEh3D3Zf/Z Pmx+VCoc/7/bRlvtWCtMno/v7N+znhO8w5UWSHGr3QIZN+3xc5c4fRhRdOVWUTjVvRKL yRKQ== 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=HgvSkaz2FuWSd/vi2YSVeb+lmMXTx/j35bYriHV9OxE=; b=sDyThoc85mG1Q7ld70cDkSQZfPIAEXST0sJIK/5ajsfMMRARXGHcFbZC9MmZ1V3Aad uzHls4gmluyMN2SGeB+f7VtD1okw3SXP8wjAnteqsHpYo3l3ReuVtwd7nDkNITdGBwaC USIaNLLrUVW1J0SfYKDN6EiLHFsbxuIYtd4UkSpy16jzKR0iVqZC+BToqn7qCT/ds+3f Sne/NXmuMeh7DmRKozGdrmDd5JPXqoOIFH4Tk64CfGXxacGkiZIoiOax5PWHP/nzTkpw ZXOH1jzwkMZlF2WW0fNv0SOa3Sus1L4nvARpYIqLFj12EnFGmYJFLo57OxAq/l7p3bTG SD+Q== X-Gm-Message-State: AOAM530292mnYPAm5T2POSP8/X7MRu6XD8an0nfAzE3yG8J7cAJCk+sy 8Pw7qYPMziALNM1sHSUcE8pVRg== X-Received: by 2002:a05:6000:1887:b0:20f:e0c4:1eca with SMTP id a7-20020a056000188700b0020fe0c41ecamr33587323wri.465.1653987408247; Tue, 31 May 2022 01:56:48 -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 t1-20020adfe101000000b0020d110bc39esm11037444wrz.64.2022.05.31.01.56.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 May 2022 01:56:47 -0700 (PDT) Message-ID: <1c5f149c-f7d0-e8be-d236-f0089d36ca60@kernel.dk> Date: Tue, 31 May 2022 02:56:46 -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: 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 2:52 AM, Dmitry Vyukov wrote: > 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 ;) I did fix this up as I think it's just a bug waiting to happen anyway. -- Jens Axboe