lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190702002522.GA693@sol.localdomain>
Date:   Mon, 1 Jul 2019 17:25:22 -0700
From:   Eric Biggers <ebiggers@...nel.org>
To:     Cfir Cohen <cfir@...gle.com>
Cc:     Tom Lendacky <thomas.lendacky@....com>,
        Gary Hook <gary.hook@....com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        David Rientjes <rientjes@...gle.com>,
        linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org
Subject: Re: [PATCH] crypto: ccp/gcm - use const time tag comparison.

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@...gle.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@...r.kernel.org> # v4.12+

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ