summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_http.c
AgeCommit message (Collapse)Author
2025-10-18efi_loader: correctly check if the HTTP protocol is foundHeinrich Schuchardt
In function efi_http_service_binding_destroy_child() phandler is created as as a local variable. If efi_search_protocol() fails, phandler will hold a random value from the stack. Even it is not zero, we must not use it. If efi_search_protocol() succeeds, the pointer has already be dereferenced, so checking against NULL makes not sense here. If ChildHandle is not a valid UEFI handle, we must return EFI_INVALID_PARAMETER. Use a single location for EFI_EXIT(). Addresses-Coverity-ID: CID 531974 (Unchecked return value) Fixes: 5753dc3f6572 ("efi_loader: Prevent dereference of uninitialised variable") Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2025-07-03efi_loader: Prevent dereference of uninitialised variableAndrew Goodbody
If phandler is returned as NULL from efi_search_protocol then protocol_interface is never assigned to. Instead return EFI_UNSUPPORTED as per the spec. This issue found by Smatch. Also eliminate the use of the variable protocol_interface as it is not needed. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
2025-03-10efi_loader: efi_net: Add support for multiple efi_net_objAdriano Cordova
Add support for multiple efi_net_obj structs in efi_net.c. This comes in preparation for an EFI network driver supporting multiple network interfaces. For now the EFI network stack still registers a single ethernet udevice as an EFI network device even if multiple are present, namely the one that was the current device at the moment of EFI initialization. Signed-off-by: Adriano Cordova <[email protected]>
2025-03-10efi_loader: efi_net: Add device path cacheAdriano Cordova
In preparation to support mutiple efi net udevices. Add a device path cache to support device paths from multiple ethernet udevices. The device paths can be added to the cache before EFI gets initialized and the protocols get installed. Signed-off-by: Adriano Cordova <[email protected]>
2025-01-26efi_loader: use LOGC_EFI consistentlyHeinrich Schuchardt
The log category should be LOGC_EFI all over the EFI sub-system. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-12-04efi_loader: efi_net: add EFI_HTTP_PROTOCOLAdriano Cordova
Add an EFI HTTP driver. This commit implements the EFI_HTTP_PROTOCOL and the EFI_HTTP_SERVICE_BINDING_PROTOCOL. The latter is attached to the handle of th efi network device. This is the same handle where snp, pxe, and ipconfig are attached to. Signed-off-by: Adriano Cordova <[email protected]>