From: Herbert Xu <herbert@gondor.apana.org.au>
To: "Jérémy Jean" <Jeremy.Jean@oss.cyber.gouv.fr>
Cc: "David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v3] crypto: essiv: fix use-after-free in AEAD path
Date: Wed, 4 Nov 2026 17:47:51 +0800 [thread overview]
Message-ID: <aur_R6HA1ylklPB_@gondor.apana.org.au> (raw)
In-Reply-To: <20261016075030.3463123-2-Jeremy.Jean@oss.cyber.gouv.fr>
On Fri, Oct 16, 2026 at 07:50:31AM +0000, Jérémy Jean wrote:
> The request that ESSIV submits to its wrapped AEAD transform may
> finish before crypto_aead_encrypt() or crypto_aead_decrypt() returns.
> In case this happens, essiv_aead_done() calls aead_request_complete()
> on the original ESSIV request, which can end up freeing the request
> before essiv_aead_crypt() resumes, creating a UAF:
>
> BUG: KASAN: slab-use-after-free in essiv_aead_crypt+0x8e6/0x950
> Read of size 8 at addr ffff888102af1360 by task init/66
>
> Check the return status before dereferencing rctx after submitting that
> request. If the operation did not return -EINPROGRESS or -EBUSY, then
> the request cannot have been freed yet.
>
> Fixes: be1eb7f78aa8 ("crypto: essiv - create wrapper template for ESSIV generation")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
> ---
>
> Changes in v3:
> - Code simplification.
>
> Changes in v2:
> - Drop the local assoc variable and check the return status before
> dereferencing rctx, as requested by Herbert Xu.
>
> v1: https://lore.kernel.org/linux-crypto/20261014222351.2930674-1-Jeremy.Jean@oss.cyber.gouv.fr/
> v2: https://lore.kernel.org/linux-crypto/20261015121743.3151400-2-Jeremy.Jean@oss.cyber.gouv.fr/
>
> crypto/essiv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2026-11-04 9:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 7:50 Jérémy Jean
2026-11-04 9:47 ` Herbert Xu [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=aur_R6HA1ylklPB_@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=Jeremy.Jean@oss.cyber.gouv.fr \
--cc=davem@davemloft.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®