]> git.baikalelectronics.ru Git - kernel.git/commit
gsmi: fix null-deref in gsmi_get_variable
authorKhazhismel Kumykov <khazhy@chromium.org>
Wed, 18 Jan 2023 01:02:12 +0000 (17:02 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:18:01 +0000 (07:18 +0100)
commitc6c4e54923da680db89d9b73dabff4b00745b65d
tree38de6e5199258fee7c1fe2c886ff4219955778b5
parent7e09af6dfef122bf4d17d4a8bae78a31efce3c9c
gsmi: fix null-deref in gsmi_get_variable

commit a769b05eeed7accc4019a1ed9799dd72067f1ce8 upstream.

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

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

Fixes: 8be0a26de1f2 ("driver: Google EFI SMI")
Cc: stable <stable@kernel.org>
Signed-off-by: Khazhismel Kumykov <khazhy@google.com>
Link: https://lore.kernel.org/r/20230118010212.1268474-1-khazhy@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/gsmi.c