From: Wolfgang Walter <linux@stwm.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Sasha Levin <sashal@kernel.org>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH] crypto: authencesn - Fix src offset when decrypting in-place
Date: Wed, 15 Apr 2026 21:54:34 +0200 [thread overview]
Message-ID: <9225cb77b2c7e71f209865bada94beb1@stwm.de> (raw)
In-Reply-To: <ad7QGhjPKRh-Vvm5@gondor.apana.org.au>
Hello,
Am 2026-04-15 01:39, schrieb Herbert Xu:
> On Tue, Apr 14, 2026 at 06:52:22PM +0200, Wolfgang Walter wrote:
>> Hello,
>>
>> with 6.12.18 ipsec stopped working for us. After reverting commit
>>
>> commit 153d5520c3f9fd62e71c7e7f9e34b59cf411e555.
>> Author: Herbert Xu <herbert@gondor.apana.org.au>
>> Date: Fri Mar 27 15:04:17 2026 +0900
>>
>> crypto: authencesn - Do not place hiseq at end of dst for
>> out-of-place
>> decryption
>
> Yes this is broken. Please try this patch:
>
> ---8<---
> The src SG list offset wasn't set properly when decrypting in-place,
> fix it.
>
> Reported-by: Wolfgang Walter <linux@stwm.de>
> Fixes: e02494114ebf ("crypto: authencesn - Do not place hiseq at end of
> dst for out-of-place decryption")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> diff --git a/crypto/authencesn.c b/crypto/authencesn.c
> index c0a01d738d9b..af3d584e584f 100644
> --- a/crypto/authencesn.c
> +++ b/crypto/authencesn.c
> @@ -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,
Applied the patch on v6.18.22, and ipsec works again.
Thanks,
--
Wolfgang Walter
Studierendenwerk München Oberbayern
Anstalt des öffentlichen Rechts
prev parent reply other threads:[~2026-04-15 19:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 12:53 Linux 6.18.22 Greg Kroah-Hartman
2026-04-11 12:53 ` Greg Kroah-Hartman
2026-04-14 16:52 ` Regression Linux 6.18.22: ipsec stops working: reason: commit 153d5520c3f9 "crypto: authencesn - Do not place hiseq at end of dst for out-of-place d.cryption" Wolfgang Walter
2026-04-14 16:58 ` Sasha Levin
2026-04-14 17:41 ` Wolfgang Walter
2026-04-14 17:04 ` 6.18.22: a question to commit "crypto: algif_aead - Revert to operating out-of-place" Wolfgang Walter
2026-04-14 17:28 ` Sasha Levin
2026-04-14 23:39 ` [PATCH] crypto: authencesn - Fix src offset when decrypting in-place Herbert Xu
2026-04-15 19:54 ` Wolfgang Walter [this message]
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=9225cb77b2c7e71f209865bada94beb1@stwm.de \
--to=linux@stwm.de \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/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