Commit c976a7da authored by Khazhismel Kumykov's avatar Khazhismel Kumykov Committed by sanglipeng
Browse files

gsmi: fix null-deref in gsmi_get_variable

stable inclusion
from stable-v5.10.165
commit ae2a9dcc8caa60b1e14671294e5ec902ea5d1dfd
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7T7G4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ae2a9dcc8caa60b1e14671294e5ec902ea5d1dfd



--------------------------------

commit a769b05e upstream.

We can get EFI variables without fetching the attribute, so we must
allow for that in gsmi.

commit 85974825 ("efi: pstore: Omit efivars caching EFI varstore
access layer") added a new get_variable call with attr=NULL, which
triggers panic in gsmi.

Fixes: 74c5b31c ("driver: Google EFI SMI")
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarKhazhismel Kumykov <khazhy@google.com>
Link: https://lore.kernel.org/r/20230118010212.1268474-1-khazhy@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 004b4451
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment