All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH 1/2] crypto: api - Fix race condition in crypto_spawn_alg
Date: Wed, 11 Dec 2019 13:41:38 +0800	[thread overview]
Message-ID: <20191211054138.2jny27pguo5kkghc@gondor.apana.org.au> (raw)
In-Reply-To: <20191211033828.GH732@sol.localdomain>

On Tue, Dec 10, 2019 at 07:38:28PM -0800, Eric Biggers wrote:
> On Sat, Dec 07, 2019 at 10:15:15PM +0800, Herbert Xu wrote:
> > The function crypto_spawn_alg is racy because it drops the lock
> > before shooting the dying algorithm.  The algorithm could disappear
> > altogether before we shoot it.
> > 
> > This patch fixes it by moving the shooting into the locked section.
> > 
> > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 
> Does this need Fixes and Cc stable tags?

Fixes: 6bfd48096ff8 ("[CRYPTO] api: Added spawns")

I don't think we want this to go through stable right away.  Perhaps
a few cycles down the track it could be pushed to stable.  It's
certainly not an urgent problem.

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:[~2019-12-11  5:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 14:39 [PATCH 0/2] crypto: api - Fix spawn races Herbert Xu
2019-12-06 14:39 ` [PATCH 1/2] crypto: api - Fix race condition in crypto_spawn_alg Herbert Xu
2019-12-06 14:39 ` [PATCH 2/2] crypto: api - Do not zap spawn->alg Herbert Xu
2019-12-06 22:50   ` Eric Biggers
2019-12-07  3:40     ` Herbert Xu
2019-12-07 14:33       ` [PATCH] crypto: api - Add more comments to crypto_remove_spawns Herbert Xu
2019-12-07 14:15 ` [v2 PATCH 0/2] crypto: api - Fix spawn races Herbert Xu
2019-12-07 14:15   ` [PATCH 1/2] crypto: api - Fix race condition in crypto_spawn_alg Herbert Xu
2019-12-11  3:38     ` Eric Biggers
2019-12-11  5:41       ` Herbert Xu [this message]
2019-12-07 14:15   ` [PATCH 2/2] crypto: api - Do not zap spawn->alg 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=20191211054138.2jny27pguo5kkghc@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=ebiggers@kernel.org \
    --cc=linux-crypto@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.