x86/microcode/AMD: Extend the SHA check to Zen5
Subsystems (2)
PATCH 1/1 x86/microcode/AMD: Extend the SHA check to Zen5
From: "Borislav Petkov (AMD)" <[email protected]>
All Zen5 machines out there should get BIOS updates which update to the correct microcode patches addressing the microcode signature issue. However, silly people carve out random microcode blobs from BIOS packages and think are doing other people a service this way...
Block loading of any unreleased standalone Zen5 microcode patches.
--- arch/x86/kernel/cpu/microcode/amd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/microcode/amd.c +7 -2
@@ -199,6 +199,12 @@ static bool need_sha_check(u32 cur_rev)case 0xa70c0 :return cur_rev <=0xa70C009 ;break ;case 0xaa001 :return cur_rev <=0xaa00116 ;break ;case 0xaa002 :return cur_rev <=0xaa00218 ;break ; +case 0xb0021 :return cur_rev <=0xb002146 ;break ; +case 0xb1010 :return cur_rev <=0xb101046 ;break ; +case 0xb2040 :return cur_rev <=0xb204031 ;break ; +case 0xb4040 :return cur_rev <=0xb404031 ;break ; +case 0xb6000 :return cur_rev <=0xb600031 ;break ; +case 0xb7000 :return cur_rev <=0xb700031 ;break ;default :break ; }
@@ -214,8 +220,7 @@ static bool verify_sha256_digest(u32 patch_id, u32 cur_rev, const u8 *data, unsistruct sha256_state s;int i; -if (x86_family (bsp_cpuid_1_eax) <0x17 || -x86_family (bsp_cpuid_1_eax) >0x19 ) +if (x86_family (bsp_cpuid_1_eax) <0x17 )return true;if (!need_sha_check (cur_rev))
Signature · 1 line
2.43.0
[tip: x86/urgent] x86/microcode/AMD: Extend the SHA check to Zen5, block loading of any unreleased standalone Zen5 microcode patches
The following commit has been merged into the x86/urgent branch of tip:
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 805b743fc163f1abef7ce1bea8eca8dfab5b685b Gitweb: https://git.kernel.org/tip/805b743fc163f1abef7ce1bea8eca8dfab5b685b Author: Borislav Petkov (AMD) <[email protected]> AuthorDate: Thu, 10 Apr 2025 13:42:22 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Sat, 12 Apr 2025 21:09:42 +02:00
x86/microcode/AMD: Extend the SHA check to Zen5, block loading of any unreleased standalone Zen5 microcode patches
All Zen5 machines out there should get BIOS updates which update to the correct microcode patches addressing the microcode signature issue. However, silly people carve out random microcode blobs from BIOS packages and think are doing other people a service this way...
Block loading of any unreleased standalone Zen5 microcode patches.
--- arch/x86/kernel/cpu/microcode/amd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/microcode/amd.c +7 -2
@@ -199,6 +199,12 @@ static bool need_sha_check(u32 cur_rev)case 0xa70c0 :return cur_rev <=0xa70C009 ;break ;case 0xaa001 :return cur_rev <=0xaa00116 ;break ;case 0xaa002 :return cur_rev <=0xaa00218 ;break ; +case 0xb0021 :return cur_rev <=0xb002146 ;break ; +case 0xb1010 :return cur_rev <=0xb101046 ;break ; +case 0xb2040 :return cur_rev <=0xb204031 ;break ; +case 0xb4040 :return cur_rev <=0xb404031 ;break ; +case 0xb6000 :return cur_rev <=0xb600031 ;break ; +case 0xb7000 :return cur_rev <=0xb700031 ;break ;default :break ; }
@@ -214,8 +220,7 @@ static bool verify_sha256_digest(u32 patch_id, u32 cur_rev, const u8 *data, unsistruct sha256_state s;int i; -if (x86_family (bsp_cpuid_1_eax) <0x17 || -x86_family (bsp_cpuid_1_eax) >0x19 ) +if (x86_family (bsp_cpuid_1_eax) <0x17 )return true;if (!need_sha_check (cur_rev))