linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Biggers <ebiggers@kernel.org>
Cc: syzbot <syzbot+fc0674cde00b66844470@syzkaller.appspotmail.com>,
	davem@davemloft.net, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: crypto: api - Fix use-after-free and race in crypto_spawn_alg
Date: Thu, 16 Apr 2020 12:42:16 +1000	[thread overview]
Message-ID: <20200416024216.GA18571@gondor.apana.org.au> (raw)
In-Reply-To: <20200416023001.GE816@sol.localdomain>

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@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2020-04-16  2:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 18:16 WARNING: refcount bug in crypto_destroy_tfm syzbot
2020-04-10  6:09 ` crypto: api - Fix use-after-free and race in crypto_spawn_alg Herbert Xu
2020-04-16  2:17   ` Eric Biggers
2020-04-16  2:25     ` Herbert Xu
2020-04-16  2:30       ` Eric Biggers
2020-04-16  2:42         ` Herbert Xu [this message]
2020-04-10  9:18 Markus Elfring

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=20200416024216.GA18571@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=ebiggers@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+fc0674cde00b66844470@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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;
as well as URLs for NNTP newsgroup(s).