]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/bugs: Fix use of possibly uninit value in amd_check_tsa_microcode()
authorMichael Zhivich <mzhivich@akamai.com>
Wed, 23 Jul 2025 13:40:19 +0000 (09:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Aug 2025 08:48:44 +0000 (09:48 +0100)
commit3ad50c7c66cc2bd6e09f4601b6a115f4f77d33d9
tree1eec24d2daca668af422418b63d1753a8833e2aa
parentb85815675fc5a175c2499ca35c4641f1924d5ad5
x86/bugs: Fix use of possibly uninit value in amd_check_tsa_microcode()

For kernels compiled with CONFIG_INIT_STACK_NONE=y, the value of __reserved
field in zen_patch_rev union on the stack may be garbage.  If so, it will
prevent correct microcode check when consulting p.ucode_rev, resulting in
incorrect mitigation selection.

This is a stable-only fix.

Cc: <stable@vger.kernel.org>
Signed-off-by: Michael Zhivich <mzhivich@akamai.com>
Fixes: 7a0395f6607a5 ("x86/bugs: Add a Transient Scheduler Attacks mitigation")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/amd.c