PXE driver's LoadFile protocol should check the input parameter FilePath to see whether it's a supported device path.If not, it should return invalid parameter, do not continue PXE boot.
Cc: Fu Siyuan<[email protected]> Cc: Ye Ting<[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <[email protected]> --- NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c index cdcf2f0..367a135 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c @@ -2326,10 +2326,14 @@ EfiPxeLoadFile ( EFI_PXE_BASE_CODE_PROTOCOL *PxeBc; BOOLEAN UsingIpv6; EFI_STATUS Status; BOOLEAN MediaPresent; + if (FilePath == NULL || !IsDevicePathEnd (FilePath)) { + return EFI_INVALID_PARAMETER; + } + VirtualNic = PXEBC_VIRTUAL_NIC_FROM_LOADFILE (This); Private = VirtualNic->Private; PxeBc = &Private->PxeBc; UsingIpv6 = FALSE; Status = EFI_DEVICE_ERROR; -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

