public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Gary R Hook <ghook@amd.com>
To: Eric Biggers <ebiggers@kernel.org>, Cfir Cohen <cfir@google.com>
Cc: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
	"Hook, Gary" <Gary.Hook@amd.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	David Rientjes <rientjes@google.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH] crypto: ccp/gcm - use const time tag comparison.
Date: Tue, 2 Jul 2019 15:41:23 +0000	[thread overview]
Message-ID: <1eea04e4-ac19-241d-695b-61be43640509@amd.com> (raw)
In-Reply-To: <20190702002522.GA693@sol.localdomain>

On 7/1/19 7:25 PM, Eric Biggers wrote:
> On Mon, Jul 01, 2019 at 05:01:32PM -0700, Cfir Cohen wrote:
>> Avoid leaking GCM tag through timing side channel.
>>
>> Signed-off-by: Cfir Cohen <cfir@google.com>
>> ---
>>   drivers/crypto/ccp/ccp-ops.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
>> index db8de89d990f..633670220f6c 100644
>> --- a/drivers/crypto/ccp/ccp-ops.c
>> +++ b/drivers/crypto/ccp/ccp-ops.c
>> @@ -840,7 +840,8 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q,
>>   		if (ret)
>>   			goto e_tag;
>>   
>> -		ret = memcmp(tag.address, final_wa.address, AES_BLOCK_SIZE);
>> +		ret = crypto_memneq(tag.address, final_wa.address,
>> +				    AES_BLOCK_SIZE) ? -EBADMSG : 0;
>>   		ccp_dm_free(&tag);
>>   	}
>>   
>> -- 
>> 2.22.0.410.gd8fdbe21b5-goog
>>
> 
> Looks like this needs:
> 
> 	Fixes: 36cf515b9bbe ("crypto: ccp - Enable support for AES GCM on v5 CCPs")
> 	Cc: <stable@vger.kernel.org> # v4.12+


Yes, it does. For clarity, does that mean you've taken care of this?


  reply	other threads:[~2019-07-02 15:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02  0:01 [PATCH] crypto: ccp/gcm - use const time tag comparison Cfir Cohen
2019-07-02  0:25 ` Eric Biggers
2019-07-02 15:41   ` Gary R Hook [this message]
2019-07-02 15:53     ` Eric Biggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1eea04e4-ac19-241d-695b-61be43640509@amd.com \
    --to=ghook@amd.com \
    --cc=Gary.Hook@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=cfir@google.com \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox