From: Heinrich Schuchardt Date: Fri, 11 May 2018 10:09:21 +0000 (+0200) Subject: efi_loader: check interface when uninstalling protocol X-Git-Tag: v2018.07-rc1~10^2~18 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1f470e1790e7303d0fcd6592f79f6e9888be3f12;p=oweals%2Fu-boot.git efi_loader: check interface when uninstalling protocol The interface has to be checked in UninstallProtocolInterface. Signed-off-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 862ba11728..91c923f560 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -493,6 +493,8 @@ efi_status_t efi_remove_protocol(const efi_handle_t handle, return ret; if (guidcmp(handler->guid, protocol)) return EFI_INVALID_PARAMETER; + if (handler->protocol_interface != protocol_interface) + return EFI_INVALID_PARAMETER; list_del(&handler->link); free(handler); return EFI_SUCCESS;