Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4065135imw; Tue, 12 Jul 2022 00:33:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sMiecMieljAjKx4fWS3ov2tGdhW90OVZHCfz1ESz+eH2oZdltotJHibWRmMIrkMblw3Qro X-Received: by 2002:a17:906:9c82:b0:6df:baa2:9f75 with SMTP id fj2-20020a1709069c8200b006dfbaa29f75mr22374761ejc.762.1657611184850; Tue, 12 Jul 2022 00:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657611184; cv=none; d=google.com; s=arc-20160816; b=zhmFeELWCLR7WGvgMevQuYwDdqpNwblNHa2koqogsJqYXWi5rCY+7jq7IrKdWYI9+7 IphbW874JYDjp0YumWz8T0hko5kPcNsxEu81DZrzhrSilpx2uc48UNu7q5OnaZPU0vIk iNx7kCMSgPLnMsLxSvO/YuBRS0sDFt8EHxaFBeUaUlu3YVv7WZz+35tOY12tdvww1qh6 RzSL3/M1qyRdzjTAERe4nJr3J/l+ID8YwT+6lB1hCo1psRrDNWQOnuTF29Wor7oRLOZc 6UfCzKmf6YdHp0yLGQEiVdkm1RlOeEKpzUEfss0RlMzehVE1XateflloWTbj5ywnVWo8 Nhwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PmYxYlVEbmLNDIWw1l5Uey7aTnCD1Sp3UKdoSwnRF7o=; b=angIL9pMOBGN3OTkXzqVxmYMGA2X2qp5Twtk0Q7/m0Eh+92tP50Vuhs2DIgLqmQj/T lcRe8/aTLHPRdw0KGVeRL2tN/Etwu0mxD3FqYjvVC2eKk9W0/SLou5OOmBNJnnnAb44n DNdIZx52L8XvlXzicyBkrTbPs2Yw5CnL452lSsIdSc1uBMUwuvVTtAdpaevXikI44eTj dNlGfJqy73SDiUV9NhZSL2cTOlDZZD56CZp9sY537tBf3JSha+rkIk6sCvfKUCr2w/Nj zQgNPF6Dw2xwFKBV/eB5OErJYPEihocCH7NvewGynHmEtGNgwkdF4ZKKNHinlom0fQhv lbew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=reRLqpm9; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx12-20020a0564020b4c00b0043a219efe71si11274266edb.55.2022.07.12.00.32.39; Tue, 12 Jul 2022 00:33:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=reRLqpm9; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229935AbiGLH2p (ORCPT + 99 others); Tue, 12 Jul 2022 03:28:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbiGLH2p (ORCPT ); Tue, 12 Jul 2022 03:28:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2467ACE3D for ; Tue, 12 Jul 2022 00:28:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C9FB3B816C2 for ; Tue, 12 Jul 2022 07:28:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D98BC3411E; Tue, 12 Jul 2022 07:28:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657610921; bh=LpTX8BtQ4nk3s/QpUBEBjyqybWzs+v3XLR2Bdeqf0p0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=reRLqpm9GgvTgHoyQYC923IczXG+CVC2LXpg+hFgwV3YXmwXQnTKchxyOl1ZYJTVC 1aN0UiG2ViFdcJAfxxrDGk+rSSUCGel0aYO4MGPXgRwDIncvEFBREXfTqdO8m3RWrL 4gVXn7AgLMwnnBO1J9/sGEeWm76ppEUs0zUbC4018qvVE7OY1ps58c2kYIGDiAyXFF PqtTZF8K0ohy8sRjrRKpQ1vF3fedTEg98ozCtqymW8QucUCZ/1FExg2FUdy6dxe5zm t3aXHCRBQFVcn+qVyUZQaO5BzK86WooLk0Z4YQY3yMM6/IrPBtI0L33l2t+vnbstPB MfwFST995TFhA== Date: Tue, 12 Jul 2022 00:28:39 -0700 From: Eric Biggers To: GUO Zihua Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, herbert@gondor.apana.org.au, davem@davemloft.net, catalin.marinas@arm.com, will@kernel.org Subject: Re: [PATCH] arm64/crypto: poly1305 fix a read out-of-bound Message-ID: References: <20220712033215.45960-1-guozihua@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-crypto@vger.kernel.org On Tue, Jul 12, 2022 at 12:08:36AM -0700, Eric Biggers wrote: > > Is the special reproducer really needed? I'd expect this to be reproduced by > the existing crypto self-tests just by booting a kernel built with both > CONFIG_KASAN=y and CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y. > Ah, probably the self-tests don't find this because with poly1305 the key is actually read from the "data", and for the self-tests the data addresses happens to always be in the kernel direct map, so KASAN doesn't work for it (I think). Ideally the self-tests would test with kmalloc'ed data buffers too, or a buffer in vmalloc'ed memory that's directly followed by a guard page. - Eric