All of lore.kernel.org
 help / color / mirror / Atom feed
From: PanBian <bianpan2016@163.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: do not free algorithm before using
Date: Thu, 29 Nov 2018 15:47:56 +0800	[thread overview]
Message-ID: <20181129074756.GA73370@bp> (raw)
In-Reply-To: <20181129065711.7renu7xnxzp7sr2d@gondor.apana.org.au>

On Thu, Nov 29, 2018 at 02:57:11PM +0800, Herbert Xu wrote:
> On Thu, Nov 22, 2018 at 06:00:16PM +0800, Pan Bian wrote:
> > In multiple functions, the algorithm fields are read after its reference
> > is dropped through crypto_mod_put. In this case, the algorithm memory
> > may be freed, resulting in use-after-free bugs. This patch delays the
> > put operation until the algorithm is never used.
> > 
> > Signed-off-by: Pan Bian <bianpan2016@163.com>
> 
> Patch applied.  Thanks!
> 
> BTW, this problem exists in almost every other skcipher template,
> e.g., in ctr.  Are you working on a fix for them too?

Probably not. Could you please provide patches to fix them?

Thanks,
Pan

> 
> 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:[~2018-11-29 18:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 10:00 [PATCH] crypto: do not free algorithm before using Pan Bian
2018-11-22 14:44 ` Herbert Xu
2018-11-23  1:05   ` PanBian
2018-11-23  2:36     ` Herbert Xu
2018-11-29  6:57 ` Herbert Xu
2018-11-29  7:47   ` PanBian [this message]
2018-11-29  8:29     ` 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=20181129074756.GA73370@bp \
    --to=bianpan2016@163.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@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.