Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4074231imw; Tue, 12 Jul 2022 00:50:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1usybPS5M1QPI9+DbrwL/MkYtGnElcgCiVX90+cPJRq4RzgnYcC0jTZ/TJwcfcsEE1E1Yaj X-Received: by 2002:a17:906:99c5:b0:6fe:b069:4ab6 with SMTP id s5-20020a17090699c500b006feb0694ab6mr22525839ejn.436.1657612204963; Tue, 12 Jul 2022 00:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657612204; cv=none; d=google.com; s=arc-20160816; b=NoJTxf+830LNpsOk2AZJpkZhtB3ceWqHGgvfZTh4nfmlYAYZVKs3V5bPHpJ2Hq5NAK 9rVPuTYRNFF27YQBcE0JzOQc63xoxKO0uQa74PICDDHDMtfpclWGEMGNd2DQdmIuRUgS 6+GQoJcKrye5Karam6U03plcLEvOxLMZMBMLSf3WqZEGfk5yxNuZzciC0aYPv7QZV5YB t3NQzRTyBFRRshCknFGiYXMJPcUTps5Ly481C54GkKiZgrtQLgWSzMErIQlyxeJKgCWG unXch6nr1sneX2rs8+LgOL7NaSVHu1St1q6v4VUlbqA+8WOTYCyzWZS0JXJhXTpgqsWE t4CQ== 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; bh=oGqRXWOFiDDfyN1A7qx+eUvNKy5UGqCQUv1VGnaoR5Y=; b=kQi9rXboa0UN01jdCC08A2iZACD+MdJK2fkoHHghCYoRujuVE4MVh32gvToprL7Si+ UlS+2cs8mrBx9xgiuWXb3qh+3a1f0nbq4y5KTn6/ts+h41iTbyjTqhdm8x8OuVyZ2T5u 0PVobhB6m8XgNURuuz2Gh1Vk6FAgKmmkr/FxyC9EY2Y07xiHUJibU38y95QZHerWFsUN llvjiVlWxtmAYo+Ys4XjcwRcMgJ3bmZVM6UgMKNtPNITIwYRWRZLOyLKVR320yZI817S 1x/ob8ZTfeNEks1SPvOVfipf/YfaJX6wgT7IywjqZdVujReELZ6w1XFp05vgQv0TyOjw RK6Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds18-20020a170907725200b0072b872c4714si365721ejc.600.2022.07.12.00.49.33; Tue, 12 Jul 2022 00:50: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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232410AbiGLHrW (ORCPT + 99 others); Tue, 12 Jul 2022 03:47:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232418AbiGLHrU (ORCPT ); Tue, 12 Jul 2022 03:47:20 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F15F69C254 for ; Tue, 12 Jul 2022 00:47:18 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Lht6H6sSBzVfkd; Tue, 12 Jul 2022 15:43:35 +0800 (CST) Received: from [10.67.110.173] (10.67.110.173) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 12 Jul 2022 15:47:09 +0800 Message-ID: Date: Tue, 12 Jul 2022 15:46:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] arm64/crypto: poly1305 fix a read out-of-bound Content-Language: en-US To: Eric Biggers CC: , , , , , References: <20220712033215.45960-1-guozihua@huawei.com> From: "Guozihua (Scott)" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.110.173] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500024.china.huawei.com (7.185.36.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 2022/7/12 15:28, Eric Biggers wrote: > 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 > . Hi Eric, I just tried and it seems that the extra self-test won't find this bug so I will just keep the reproducer in place. -- Best GUO Zihua