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] [day] [month] [year] [list]
Date:   Tue, 11 Dec 2018 17:26:06 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Christophe Leroy <christophe.leroy@....fr>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK

On Tue, Dec 11, 2018 at 07:29:40AM +0000, Christophe Leroy wrote:
>
> diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
> index 6988012deca4..385ec970b639 100644
> --- a/drivers/crypto/talitos.c
> +++ b/drivers/crypto/talitos.c
> @@ -1668,8 +1668,11 @@ static struct talitos_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request *
>  	struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
>  	unsigned int ivsize = crypto_ablkcipher_ivsize(cipher);
>  
> +	if (ivsize)
> +		memcpy(ctx->iv, areq->info, ivsize);

The ctx is per-tfm, not per-request.  So you cannot write to it.
This needs to go into a pre-request area.

>  	return talitos_edesc_alloc(ctx->dev, areq->src, areq->dst,
> -				   areq->info, 0, areq->nbytes, 0, ivsize, 0,
> +				   ctx->iv, 0, areq->nbytes, 0, ivsize, 0,
>  				   areq->base.flags, encrypt);
>  }

Thanks,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ