[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200416024216.GA18571@gondor.apana.org.au>
Date: Thu, 16 Apr 2020 12:42:16 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Eric Biggers <ebiggers@...nel.org>
Cc: syzbot <syzbot+fc0674cde00b66844470@...kaller.appspotmail.com>,
davem@...emloft.net, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: crypto: api - Fix use-after-free and race in crypto_spawn_alg
On Wed, Apr 15, 2020 at 07:30:01PM -0700, Eric Biggers wrote:
>
> I'm not sure what you mean here. crypto_alg_get() is:
>
> static inline struct crypto_alg *crypto_alg_get(struct crypto_alg *alg)
> {
> refcount_inc(&alg->cra_refcnt);
> return alg;
> }
>
> So given:
>
> target = crypto_alg_get(alg);
>
> Both alg and target have to be non-NULL.
Yes I know that we know that it can't be NULL, but gcc 8.3 doesn't.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists