Commit 1f48ad3b authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: authencesn - Fix src offset when decrypting in-place



The src SG list offset wasn't set properly when decrypting in-place,
fix it.

Reported-by: default avatarWolfgang Walter <linux@stwm.de>
Fixes: e0249411 ("crypto: authencesn - Do not place hiseq at end of dst for out-of-place decryption")
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 3ba3b02f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -228,9 +228,11 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,

decrypt:

	if (src != dst)
		src = scatterwalk_ffwd(areq_ctx->src, src, assoclen);
	dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen);
	if (req->src == req->dst)
		src = dst;
	else
		src = scatterwalk_ffwd(areq_ctx->src, src, assoclen);

	skcipher_request_set_tfm(skreq, ctx->enc);
	skcipher_request_set_callback(skreq, flags,