lkml.org 
[lkml]   [2014]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v2] x86, microcode, AMD: Sanity-check initrd image
On 02/03/2014 02:30 PM, Borislav Petkov wrote:
> On Mon, Feb 03, 2014 at 02:13:27PM -0500, Boris Ostrovsky wrote:
>> I thought that it may be sufficient to check for !container in
>> save_microcode_in_initrd_amd() before performing relocation. If the
>> signature was wrong, we would have found out about it in
>> load_ucode_bsp() -> apply_ucode_in_initrd() and returned right away,
> Your original test case which exploded had exactly that scenario - it
> was pointing to Intel ucode so container wasn't NULL. Thus we need to
> check the sig in find_ucode_in_initrd().
>

It exploded when 'if (!container)' check was done *after* relocation,
which made container non-zero. If you do the check *before* then I think
you will catch the fact that container is empty.

load_ucode_bsp() -> apply_ucode_in_initrd() path does not include
save_microcode_in_initrd_amd() and (if I understand the code correctly)
we already verify signature in apply_ucode_in_initrd().

I am pretty sure I tested this scenario but I can verify it again.

-boris


\
 
 \ /
  Last update: 2014-02-03 23:41    [W:0.068 / U:2.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site