linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: syzbot 
	<bot+6f724d52da8e3ff8872545bd8444f50f0d174c5f@syzkaller.appspotmail.com>
Cc: davem@davemloft.net, herbert@gondor.apana.org.au,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: KASAN: stack-out-of-bounds Write in sha3_update
Date: Tue, 28 Nov 2017 17:53:47 -0800	[thread overview]
Message-ID: <20171129015347.GA24001@zzz.localdomain> (raw)
In-Reply-To: <20171128205845.GF45321@gmail.com>

On Tue, Nov 28, 2017 at 12:58:45PM -0800, Eric Biggers wrote:
> diff --git a/crypto/hmac.c b/crypto/hmac.c
> index 92871dc2a63e..82436db6b6a6 100644
> --- a/crypto/hmac.c
> +++ b/crypto/hmac.c
> @@ -196,6 +196,11 @@ static int hmac_create(struct crypto_template *tmpl, struct rtattr **tb)
>  	if (IS_ERR(salg))
>  		return PTR_ERR(salg);
>  
> +	/* The underlying hash algorithm must be unkeyed */
> +	err = -EINVAL;
> +	if (crypto_shash_alg_has_setkey(salg))
> +		goto out_put_alg;
> +
>  	err = -EINVAL;
>  	ds = salg->digestsize;
>  	ss = salg->statesize;

I messed this up; it needs to initialize 'alg' first.  I'll send a fixed
version.

Eric

  reply	other threads:[~2017-11-29  1:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 13:23 KASAN: stack-out-of-bounds Write in sha3_update syzbot
2017-11-28 20:58 ` Eric Biggers
2017-11-29  1:53   ` Eric Biggers [this message]
2017-12-01 19:07 ` Eric Biggers

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=20171129015347.GA24001@zzz.localdomain \
    --to=ebiggers3@gmail.com \
    --cc=bot+6f724d52da8e3ff8872545bd8444f50f0d174c5f@syzkaller.appspotmail.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).