Received: by 10.213.65.68 with SMTP id h4csp659947imn; Fri, 6 Apr 2018 06:56:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+25Ct/5bH2PmZESTTjR9ExMk/5DIhRNDtP41b9JhWgwSuREKXgeeDVhlZ1zi7eM9m6rmlf X-Received: by 2002:a17:902:8501:: with SMTP id bj1-v6mr28019820plb.239.1523022989610; Fri, 06 Apr 2018 06:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523022989; cv=none; d=google.com; s=arc-20160816; b=Y4gdPagxCaZL0K14d231GrtbTxF/V2fu0zpQJYVFyou0XHkbQz1Rk4iOgeDrwCbiCA QjHI81AtokdIyjMZ3kYKRcUi8DPLHTcKBqmTFu9XsqlP+xe0ync1UlsMist4+xFn6zwP JlUhqqruonwq6L2+YVuGwrssuYmbT8VKN9vb8yCY2NtxNNOjgDcDeCXjj3/LonWbzTpl 786zOkLUB8SFV4aFIg6gEtWvvVWedXemrQjp97S9vvQCWHbmra1xzUMkqp/GYDD2VDDQ TWGQGhe+PQ2EwiFJe9dHonojPEWtABNhAC5NCY48WlD3+/OyED4WkgeuR2QZoUnY880b 5+KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WMApy3XM+3Pp3+bgMxJb0u4KB/tMFtG/qVxVWQ2TUnE=; b=gVLlztGEEOXzpkpGcGs5BwCNq72O31MQjz9KYKZQ/Yla5S10PsGAqnFmzao+RmHmhR u5Ge6ZUv6RHfuxA3KLLwx2ZOmFiVoVZ50T7opObdz0MLTfsjUD940ewrdAgRkoYgShoo YKtxu7lp7Y/6LfTiM2AOTc83jgOdSOIiSjKebH9f9BuPVWa95LXsreiJJWGmEQtP8bX0 /ZJxmsuvvG/eF5rfilDW8NKclVw8EzS5PB8d/ngrNo8H0OKAHKZEirYLRa4zgBiN88Lb rRXzaUVpRvr/4hjCzTrcHkFCT41ufbQn3US/QV6PNneURpNyex34EyOWsrY2+E0xjnew TS6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si7344645pgn.191.2018.04.06.06.56.15; Fri, 06 Apr 2018 06:56:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756804AbeDFNnp (ORCPT + 99 others); Fri, 6 Apr 2018 09:43:45 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37416 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752461AbeDFNnm (ORCPT ); Fri, 6 Apr 2018 09:43:42 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id ED286E03; Fri, 6 Apr 2018 13:43:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Giovanni Cabiddu , Conor McLoughlin , Stephan Mueller , Herbert Xu Subject: [PATCH 4.15 52/72] crypto: testmgr - Fix incorrect values in PKCS#1 test vector Date: Fri, 6 Apr 2018 15:24:27 +0200 Message-Id: <20180406084353.081766497@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084349.367583460@linuxfoundation.org> References: <20180406084349.367583460@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Conor McLoughlin commit 333e18c5cc74438f8940c7f3a8b3573748a371f9 upstream. The RSA private key for the first form should have version, prime1, prime2, exponent1, exponent2, coefficient values 0. With non-zero values for prime1,2, exponent 1,2 and coefficient the Intel QAT driver will assume that values are provided for the private key second form. This will result in signature verification failures for modules where QAT device is present and the modules are signed with rsa,sha256. Cc: Signed-off-by: Giovanni Cabiddu Signed-off-by: Conor McLoughlin Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- crypto/testmgr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/crypto/testmgr.h +++ b/crypto/testmgr.h @@ -548,7 +548,7 @@ static const struct akcipher_testvec rsa static const struct akcipher_testvec pkcs1pad_rsa_tv_template[] = { { .key = - "\x30\x82\x03\x1f\x02\x01\x10\x02\x82\x01\x01\x00\xd7\x1e\x77\x82" + "\x30\x82\x03\x1f\x02\x01\x00\x02\x82\x01\x01\x00\xd7\x1e\x77\x82" "\x8c\x92\x31\xe7\x69\x02\xa2\xd5\x5c\x78\xde\xa2\x0c\x8f\xfe\x28" "\x59\x31\xdf\x40\x9c\x60\x61\x06\xb9\x2f\x62\x40\x80\x76\xcb\x67" "\x4a\xb5\x59\x56\x69\x17\x07\xfa\xf9\x4c\xbd\x6c\x37\x7a\x46\x7d" @@ -597,8 +597,8 @@ static const struct akcipher_testvec pkc "\xfe\xf8\x27\x1b\xd6\x55\x60\x5e\x48\xb7\x6d\x9a\xa8\x37\xf9\x7a" "\xde\x1b\xcd\x5d\x1a\x30\xd4\xe9\x9e\x5b\x3c\x15\xf8\x9c\x1f\xda" "\xd1\x86\x48\x55\xce\x83\xee\x8e\x51\xc7\xde\x32\x12\x47\x7d\x46" - "\xb8\x35\xdf\x41\x02\x01\x30\x02\x01\x30\x02\x01\x30\x02\x01\x30" - "\x02\x01\x30", + "\xb8\x35\xdf\x41\x02\x01\x00\x02\x01\x00\x02\x01\x00\x02\x01\x00" + "\x02\x01\x00", .key_len = 804, /* * m is SHA256 hash of following message: