linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Milos Vyletel <milos.vyletel@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	"maintainer:X86 ARCHITECTURE..." <x86@kernel.org>,
	"open list:CRYPTO API" <linux-crypto@vger.kernel.org>,
	"open list:X86 ARCHITECTURE..." <linux-kernel@vger.kernel.org>,
	linux-coverity@vger.kernel.org
Subject: Re: [PATCH] crypto: x86/sha1: fix coverity CID 1195603
Date: Sat, 24 May 2014 14:30:42 +0200	[thread overview]
Message-ID: <201405241430.42673.marex@denx.de> (raw)
In-Reply-To: <20140508133025.GB12700@gondor.apana.org.au>

On Thursday, May 08, 2014 at 03:30:25 PM, Herbert Xu wrote:
> On Wed, Apr 30, 2014 at 03:17:54PM -0400, Milos Vyletel wrote:
> > Coverity detected possible use of uninitialized pointer when printing
> > info message during module load. While this is higly unlikely to cause
> > any troubles simple change in sha1_ssse3_mod_init to make it look like
> > sha256/512 init function will fix this.
> > 
> > 260
> > 
> >    	6. Condition sha1_transform_asm, taking true branch
> > 
> > 261        if (sha1_transform_asm) {
> > 
> > CID 1195603 (#1 of 1): Uninitialized pointer read (UNINIT)
> > 7. uninit_use_in_call: Using uninitialized value algo_name when calling
> > printk. 262                pr_info("Using %s optimized SHA-1
> > implementation\n", algo_name); 263                return
> > crypto_register_shash(&alg);
> > 264        }
> > 
> > Reported-by: <scan-admin@coverity.com>
> > Signed-off-by: Milos Vyletel <milos.vyletel@gmail.com>
> 
> Unless I'm missing something there is no way this code can use
> the variable without initialising it.
> 
> So this is a false positive and I'm not applying this.

I suppose changing the commit message to "align the code with sha256 ... NOTE: 
this also fixed CIDxyz." would work better and might get this applied ? I think 
unification of code is always good.

Best regards,
Marek Vasut

      reply	other threads:[~2014-05-24 12:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 19:17 [PATCH] crypto: x86/sha1: fix coverity CID 1195603 Milos Vyletel
2014-05-06  8:28 ` Pavel Machek
2014-05-06 14:04   ` Milos Vyletel
     [not found]   ` <CAAFXRd3UPRU7AgZCGbxo_YW_PGuO-FPvB4VC5zKb+LuqGxFxkQ@mail.gmail.com>
2014-05-06 21:11     ` Pavel Machek
2014-05-08 13:30 ` Herbert Xu
2014-05-24 12:30   ` Marek Vasut [this message]

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=201405241430.42673.marex@denx.de \
    --to=marex@denx.de \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=linux-coverity@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=milos.vyletel@gmail.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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 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).