Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3320544rdb; Wed, 13 Sep 2023 08:35:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHY3ajRpEKxPGHeIzJNg8cpKnHrd3evHpAE0sKRzLmLWB7G1vlv5ItGgdxMkRvF2SZZstnc X-Received: by 2002:a17:902:cec4:b0:1bb:ce4a:5893 with SMTP id d4-20020a170902cec400b001bbce4a5893mr3774372plg.30.1694619331554; Wed, 13 Sep 2023 08:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694619331; cv=none; d=google.com; s=arc-20160816; b=T8kKnqjJ8I7uBZ2TcjT0ch1mSteJ1s3fhTkGqpo9dUanCsJ64dpCzD5ZxFlS37pOQJ ReCkMUtRATsMaeqrT9coyhZMRg7d+/LC4Il8R3rLmYeAG41r11UI7bnsjNl+qPQj6nEb eDQw2wR0MlYbE2kLREFOnRUa8rrI6pNputPnOtTpvm9MYUU5NrQCup5tUapoEBW1BGob JxRVAmr2WjEA8zFSK/YJO8+aas/EnDMBA+CyMZI/RwciGlyFot8ikJoY4iG2hqJIKw2z yLujIRGkHrlWyzI+CW//fWBIMfyDFwFwdeizlSe1LtLsJPEmPlkLxgbwS7kttOUishdM LNzw== 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:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=EItSaMMIQ4l0sl5dWXf433pLMyLU6EyR+eht2eo0tf4=; fh=4bAwdfA+uJ5wEeFI/fgdLlzi/HAwY3X/2oNjAZiPzoM=; b=drRxlCKULlqVnCj9Rgu1YMNK8TRBY7gUuFc121R9XVde1v0cIMnrEz1PQNqcdCaGmh VH1rzywIq+C7GOp6h7qOmCGGnN3VEpqIEAv8VfCTflYQ7iafSKiOxPs/EjvQkxLUR1Xb NgkE1v9jYGc193skr3YvXxIyCgUJ9f4VgQrO+1L0Oj1MA2E5YdFntuovJfFgVRNBBV8F Et8G7L7DfokSICK34qsqJ2zZGr9U1vdHxOlkzpsmCtmAKeOlIiJd6PA3XjHJVemQRlQH cKWGxC1yGj9BYTfCYL+j4T8piibxvEHSeiawuaO2Mr8GbZJI4uovo9PUlv5WOLs9wbG8 OAPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=oZhN97+3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id w10-20020a170902d10a00b001c370dc4445si10107447plw.210.2023.09.13.08.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 08:35:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=oZhN97+3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id D6FB380D7544; Wed, 13 Sep 2023 06:10:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240748AbjIMNKf (ORCPT + 99 others); Wed, 13 Sep 2023 09:10:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231579AbjIMNKe (ORCPT ); Wed, 13 Sep 2023 09:10:34 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C332C19B9; Wed, 13 Sep 2023 06:10:30 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-99bcf2de59cso873029366b.0; Wed, 13 Sep 2023 06:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694610629; x=1695215429; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EItSaMMIQ4l0sl5dWXf433pLMyLU6EyR+eht2eo0tf4=; b=oZhN97+3QjThY2NXckVNp2H5XEz8OC0Ed1IVZtdaeBea+DFmsLgxlkNYUUlq6x2jcd 4dLOY9ldREGlJRbkyzTwhBF66jF0hMX0/IPG1sFFZg8sFJnvXgaC8YvCzs1f/8NKyH84 sBMxn/+5b0ac7OxQ1XoueEix4vEYJz28Idx29AAFT++Z/K9ZJnuw3njN8M17KSjk2XGG buygfKuQFOmyE63P2Q5/VdGiszeKS00aN7cliUjJ1eVDPkgD/ExaKyJ2FcGCe4EorC5l OvUvZnDEZtqdvyVb6byWWPR+/vmp0vKwQ/JJf9PysFHAlKnuntM0yEhs0qvtFkLoS0EN r06g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694610629; x=1695215429; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EItSaMMIQ4l0sl5dWXf433pLMyLU6EyR+eht2eo0tf4=; b=EhU5JmXPBFqE5qQv1u26yQdcpdUPNjVmtk9hSgwBfYCH8xUJzLEWuGslF17ejzqElp 1wC6Q1ArPZvgE16y8BrZJkYbe60HzWE3edqviISqNg/OvVJBSP1NrjcKc+TCdRGoiY/C n0DoerM5WqdsJ8x2b2NBoG7mkOI8XizNrc+dNrJQWRKKWor/5oWsFRw3bCNu6G8Ofpg2 eZ4KeUJ56onxNJkZphHrnPFOgOAcNCXQ86/xgj8lMRqoBfc+T3UkP5e6Ed4Mql4BQI5W kbtCRDOZ/UoNMkgeRq7ZBhe6y5mT6wxRMeOePqWJAMbtBnuKIbz91lpzfL7J9eEzh7s8 LfhQ== X-Gm-Message-State: AOJu0YwBk5DgXrVyr5nsUas7dKMfceYWwnkKHEKaKKd4PN+2TOvLMvgS GoQqt4wbdLFzYd8FCZa5oq4= X-Received: by 2002:a17:906:8a63:b0:9aa:138d:9f4e with SMTP id hy3-20020a1709068a6300b009aa138d9f4emr1807330ejc.56.1694610628947; Wed, 13 Sep 2023 06:10:28 -0700 (PDT) Received: from ?IPV6:2620:10d:c096:310::2eef? ([2620:10d:c092:600::2:7e52]) by smtp.gmail.com with ESMTPSA id lj16-20020a170906f9d000b00992d0de8762sm8419626ejb.216.2023.09.13.06.10.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Sep 2023 06:10:28 -0700 (PDT) Message-ID: Date: Wed, 13 Sep 2023 14:10:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [syzbot] [io-uring?] UBSAN: array-index-out-of-bounds in io_setup_async_msg Content-Language: en-US To: syzbot , axboe@kernel.dk, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com References: <0000000000002770be06053c7757@google.com> From: Pavel Begunkov In-Reply-To: <0000000000002770be06053c7757@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 13 Sep 2023 06:10:44 -0700 (PDT) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email On 9/13/23 13:11, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 0bb80ecc33a8 Linux 6.6-rc1 > git tree: upstream > console+strace: https://syzkaller.appspot.com/x/log.txt?x=12d1eb78680000 > kernel config: https://syzkaller.appspot.com/x/.config?x=f4894cf58531f > dashboard link: https://syzkaller.appspot.com/bug?extid=a4c6e5ef999b68b26ed1 > compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16613002680000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13912e30680000 > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/eeb0cac260c7/disk-0bb80ecc.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/a3c360110254/vmlinux-0bb80ecc.xz > kernel image: https://storage.googleapis.com/syzbot-assets/22b81065ba5f/bzImage-0bb80ecc.xz > > The issue was bisected to: > > commit 2af89abda7d9c2aeb573677e2c498ddb09f8058a > Author: Pavel Begunkov > Date: Thu Aug 24 22:53:32 2023 +0000 > > io_uring: add option to remove SQ indirection > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15892e30680000 > final oops: https://syzkaller.appspot.com/x/report.txt?x=17892e30680000 > console output: https://syzkaller.appspot.com/x/log.txt?x=13892e30680000 > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+a4c6e5ef999b68b26ed1@syzkaller.appspotmail.com > Fixes: 2af89abda7d9 ("io_uring: add option to remove SQ indirection") > > ================================================================================ > UBSAN: array-index-out-of-bounds in io_uring/net.c:189:55 > index 3779567444058 is out of range for type 'iovec [8]' > CPU: 1 PID: 5039 Comm: syz-executor396 Not tainted 6.6.0-rc1-syzkaller #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 > Call Trace: > > __dump_stack lib/dump_stack.c:88 [inline] > dump_stack_lvl+0x125/0x1b0 lib/dump_stack.c:106 > ubsan_epilogue lib/ubsan.c:217 [inline] > __ubsan_handle_out_of_bounds+0x111/0x150 lib/ubsan.c:348 > io_setup_async_msg+0x2a0/0x2b0 io_uring/net.c:189 Which is /* if were using fast_iov, set it to the new one */ if (iter_is_iovec(&kmsg->msg.msg_iter) && !kmsg->free_iov) { size_t fast_idx = iter_iov(&kmsg->msg.msg_iter) - kmsg->fast_iov; async_msg->msg.msg_iter.__iov = &async_msg->fast_iov[fast_idx]; } The bisection doesn't immediately make sense, I'll try it out -- Pavel Begunkov