lkml.org 
[lkml]   [2014]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] crypto: x86/sha1: fix coverity CID 1195603
Date
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


\
 
 \ /
  Last update: 2014-05-24 20:21    [W:0.100 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site