]> git.dujemihanovic.xyz Git - u-boot.git/commit
efi_loader: variable: keep temporary buffer during the authentication
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Wed, 12 Aug 2020 00:37:50 +0000 (09:37 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 13 Aug 2020 20:37:36 +0000 (22:37 +0200)
commit0658bb29b026a6af434b9e0cdeced5d25bdd206f
tree12decf1ec25063794275f29a285910eac8fac1fc
parentbc78d22d0f0db58b8a340ebf7d36ea2a217bfeac
efi_loader: variable: keep temporary buffer during the authentication

This is a bug fix; Setting an authenticated variable may fail due to
a memory corruption in the authentication.

A temporary buffer will, if needed, be allocated to parse a variable's
authentication data, and some portion of buffer, specifically signer's
certificates, will be referenced by efi_signature_verify().

So the buffer should be kept valid until the authentication process
is finished.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_variable.c