From: Heinrich Schuchardt <xypron.glpk@gmx.de> Date: Fri, 11 May 2018 10:09:21 +0000 (+0200) Subject: efi_loader: check interface when uninstalling protocol X-Git-Tag: v2025.01-rc5-pxa1908~4160^2~18 X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/index.html?a=commitdiff_plain;h=1f470e1790e7303d0fcd6592f79f6e9888be3f12;p=u-boot.git efi_loader: check interface when uninstalling protocol The interface has to be checked in UninstallProtocolInterface. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de> --- 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;