[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zd-blOvXjU4_t8p9@skv.local>
Date: Wed, 28 Feb 2024 23:46:12 +0300
From: Andrey Skvortsov <andrej.skvortzov@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Corentin Labbe <clabbe.montjoie@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Jonathan Corbet <corbet@....net>,
Ovidiu Panait <ovidiu.panait@...driver.com>,
linux-crypto@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-sunxi@...ts.linux.dev, linux-kernel@...r.kernel.org,
Arnaud Ferraris <arnaud.ferraris@...labora.com>
Subject: Re: [PATCH] crypto: sun8i-ce - Fix use after free in unprepare.
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@...il.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@...r.kernel.org>
I think it makes sense to do the same for the sun8i-ce fix as well.
--
Best regards,
Andrey Skvortsov
Powered by blists - more mailing lists