linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Chen <tim.c.chen@linux.intel.com>
To: Eric Biggers <ebiggers@google.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, dm-devel@redhat.com,
	Milan Broz <mbroz@redhat.com>,
	Megha Dey <megha.dey@linux.intel.com>
Subject: Re: Crash in crypto mcryptd
Date: Fri, 02 Dec 2016 10:30:26 -0800	[thread overview]
Message-ID: <1480703426.3064.55.camel@linux.intel.com> (raw)
In-Reply-To: <20161202070658.GA18690@google.com>

On Thu, 2016-12-01 at 23:06 -0800, Eric Biggers wrote:
> On Thu, Dec 01, 2016 at 05:47:02PM -0800, Tim Chen wrote:
> > 
> > On Thu, 2016-12-01 at 19:00 -0500, Mikulas Patocka wrote:
> > > 
> > > Hi
> > > 
> > > There is a bug in mcryptd initialization.
> > > 
> > > This is a test module that tries various hash algorithms. When you load 
> > > the module with "insmod test.ko 'alg=mcryptd(md5)'", the machine crashes.
> > I don't think your test setup is right.  The mcryptd supports only multi-buffer
> > algorithm.  I don't think there is such an implementation for md5.
> > 
> > Please refer to arch/x86/crypto/sha1-mb 
> > multi-buffer implementation of sha1 to see the proper
> > setup and usage with mcryptd.  You can also run tcrypt test to
> > exercise this code.
> > 
> > Tim
> No, mcryptd must not crash the kernel if it's passed the wrong algorithm.

That's true.  We should detect the case when mcryptd is being passed invalid
argument and not crash.  We'll take a look at it.

Tim

  reply	other threads:[~2016-12-02 18:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02  0:00 Crash in crypto mcryptd Mikulas Patocka
2016-12-02  1:47 ` Tim Chen
2016-12-02  7:06   ` Eric Biggers
2016-12-02 18:30     ` Tim Chen [this message]
2016-12-03  0:16 ` Tim Chen

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=1480703426.3064.55.camel@linux.intel.com \
    --to=tim.c.chen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=dm-devel@redhat.com \
    --cc=ebiggers@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=mbroz@redhat.com \
    --cc=megha.dey@linux.intel.com \
    --cc=mpatocka@redhat.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).