public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrey Skvortsov <andrej.skvortzov@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Corentin Labbe <clabbe.montjoie@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Ovidiu Panait <ovidiu.panait@windriver.com>,
	linux-crypto@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
	Arnaud Ferraris <arnaud.ferraris@collabora.com>
Subject: Re: [PATCH] crypto: sun8i-ce - Fix use after free in unprepare.
Date: Wed, 28 Feb 2024 23:46:12 +0300	[thread overview]
Message-ID: <Zd-blOvXjU4_t8p9@skv.local> (raw)
In-Reply-To: <Zd76W98Ypq5uJmqm@gondor.apana.org.au>

Hi Herbert,
On 24-02-28 17:18, Herbert Xu wrote:
> On Tue, Feb 27, 2024 at 12:53:57AM +0300, Andrey Skvortsov wrote:
> > sun8i_ce_cipher_unprepare should be called before
> > crypto_finalize_skcipher_request, because client callbacks may
> > immediately free memory, that isn't needed anymore. But it will be
> > used by unprepare after free. Before removing prepare/unprepare
> > callbacks it was handled by crypto engine in crypto_finalize_request.
> > 
> > Usually that results in a pointer dereference problem during a in
> > crypto selftest.
> >  Unable to handle kernel NULL pointer dereference at
> >                                       virtual address 0000000000000030
...
> > 
> > Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
> > Fixes: 4136212ab18e ("crypto: sun8i-ce - Remove prepare/unprepare request")
> > ---
> >  .../allwinner/sun8i-ce/sun8i-ce-cipher.c      | 34 +++++++++----------
> >  1 file changed, 17 insertions(+), 17 deletions(-)
> 
> Patch applied.  Thanks.

You marked your rockchip fix for backport to stable releases.
  Cc: <stable@vger.kernel.org>

I think it makes sense to do the same for the sun8i-ce fix as well. 

-- 
Best regards,
Andrey Skvortsov

  reply	other threads:[~2024-02-28 20:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 21:53 [PATCH] crypto: sun8i-ce - Fix use after free in unprepare Andrey Skvortsov
2024-02-26 22:05 ` Andrey Skvortsov
2024-02-28  9:07   ` Herbert Xu
2024-02-28  9:08     ` Herbert Xu
2024-02-28  9:13 ` [PATCH] crypto: rk3288 " Herbert Xu
2024-02-28 13:35   ` Andrey Skvortsov
2024-02-28  9:18 ` [PATCH] crypto: sun8i-ce " Herbert Xu
2024-02-28 20:46   ` Andrey Skvortsov [this message]
2024-02-29  1:40     ` Herbert Xu

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=Zd-blOvXjU4_t8p9@skv.local \
    --to=andrej.skvortzov@gmail.com \
    --cc=arnaud.ferraris@collabora.com \
    --cc=clabbe.montjoie@gmail.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=ovidiu.panait@windriver.com \
    --cc=samuel@sholland.org \
    --cc=wens@csie.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