lkml.org 
[lkml]   [2018]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/microcode/AMD: fix read of uninitialized data
On Tue, Apr 10, 2018 at 02:41:23PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently function __load_ucode_amd can assign an uninitialized cp to *ret
> if get_builtin_microcode returns false.

What are you looking at? Here is how it looks in linux-next:

270
271 if (!get_builtin_microcode(&cp, x86_family(cpuid_1_eax)))
272 cp = find_microcode_in_initrd(path, use_pa);
273


If get_builtin_microcode() returns false, then cp is initialized on the
next line.

Maybe the issue is that cp.name is uninitialized. It doesn't cause an
issue but it would be understandable for a static checker to warn about
it when we do "*ret = cp;".

regards,
dan carpenter

\
 
 \ /
  Last update: 2018-04-10 16:23    [W:0.039 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site