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: <20160125072334.GC5609@gondor.apana.org.au>
Date:	Mon, 25 Jan 2016 15:23:34 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Cyrille Pitchen <cyrille.pitchen@...el.com>
Cc:	davem@...emloft.net, nicolas.ferre@...el.com,
	linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 5/5] crypto: atmel-sha: fix algorihtm registration

On Fri, Jan 15, 2016 at 03:49:35PM +0100, Cyrille Pitchen wrote:
>
> +static int atmel_sha_export(struct ahash_request *req, void *out)
> +{
> +	const struct atmel_sha_reqctx *ctx = ahash_request_ctx(req);
> +	struct atmel_sha_state *state = out;
> +
> +	memcpy(state->digest, ctx->digest, SHA512_DIGEST_SIZE);
> +	memcpy(state->buffer, ctx->buffer, ctx->bufcnt);
> +	state->bufcnt = ctx->bufcnt;
> +	state->digcnt[0] = ctx->digcnt[0];
> +	state->digcnt[1] = ctx->digcnt[1];
> +	return 0;
> +}

Hmm, you're assuming that out is aligned but that is not necessarily
the case.  Ditto for import.

Cheers,
-- 
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