x86/ucode/amd: Fix potential buffer overrun with equiv table handling
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 27 Mar 2020 11:59:02 +0000 (11:59 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 27 Mar 2020 13:13:26 +0000 (13:13 +0000)
commit1f97b6b9f1b5978659c5735954c37c130e7bb151
tree0d2c87f1f2e082d597cdb9e23c5f4c43e3dff6f1
parente741f71d1d40f21dacaf32d4272e3e04137129f7
x86/ucode/amd: Fix potential buffer overrun with equiv table handling

find_equiv_cpu_id() loops until it finds a 0 installed_cpu entry.  Well formed
AMD microcode containers have this property.

Extend the checking in install_equiv_cpu_table() to reject tables which don't
have a sentinal at the end.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/microcode/amd.c