diff options
author | Nikita Zhandarovich <n.zhandarovich@fintech.ru> | 2023-03-06 19:06:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-22 15:28:09 +0300 |
commit | 8d26a4fecce5675208d3c53bca71c8523c514692 (patch) | |
tree | 7e4da4404ee27fb16791866e8a6d118c95abba99 /.mailmap | |
parent | a976ff743eb1d6897dcc4e53516fe2e1167aa804 (diff) | |
download | linux-8d26a4fecce5675208d3c53bca71c8523c514692.tar.xz |
x86/mm: Fix use of uninitialized buffer in sme_enable()
commit cbebd68f59f03633469f3ecf9bea99cd6cce3854 upstream.
cmdline_find_option() may fail before doing any initialization of
the buffer array. This may lead to unpredictable results when the same
buffer is used later in calls to strncmp() function. Fix the issue by
returning early if cmdline_find_option() returns an error.
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.
Fixes: aca20d546214 ("x86/mm: Add support to make use of Secure Memory Encryption")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/20230306160656.14844-1-n.zhandarovich@fintech.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions