From 1f470e1790e7303d0fcd6592f79f6e9888be3f12 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 11 May 2018 12:09:21 +0200 Subject: [PATCH] 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 --- lib/efi_loader/efi_boottime.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.25.1