]> 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:47:31 +0000 (09:47 +0100)
commit98be604d96a6e4ec0c2c08f4bf2beb868eb80e92
treeb790556eda78cb909b49e85bd85bcc4074976b7c
parentf9377bdf86ea5e8f5073c4c4ab0e69b80b220247
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: 90293047df18 ("x86/bugs: Add a Transient Scheduler Attacks mitigation")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/amd.c