[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <db1f2e8f-089d-5f42-3641-8963b19ed834@canonical.com>
Date: Tue, 10 Apr 2018 16:35:43 +0100
From: Colin Ian King <colin.king@...onical.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/microcode/AMD: fix read of uninitialized data
On 10/04/18 15:22, Dan Carpenter wrote:
> On Tue, Apr 10, 2018 at 02:41:23PM +0100, Colin King wrote:
>> From: Colin Ian King <colin.king@...onical.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;".
Oh, oops, you are totally correct on that. My bad.
>
> regards,
> dan carpenter
>
Powered by blists - more mailing lists