From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) by mx.groups.io with SMTP id smtpd.web09.6685.1661308288288858274 for ; Tue, 23 Aug 2022 19:31:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20210112 header.b=D/W9XmEX; spf=pass (domain: flex--yuanyu.bounces.google.com, ip: 209.85.214.202, mailfrom: 3f40fywykbc4ieu7ie08805y.w86xyfy5yx4m.0b8e9c.28@flex--yuanyu.bounces.google.com) Received: by mail-pl1-f202.google.com with SMTP id q6-20020a17090311c600b0017266460b8fso10081155plh.4 for ; Tue, 23 Aug 2022 19:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc; bh=AdR5vOoa3ABzkjkhqVDqGVySaFLnDlse42aMFz2MHiM=; b=D/W9XmEXDVaMT7l7XkmXh34iDOdtHucw1Jg7ug9vf+PDePbPfJlz+UJW7c4+ffq7AZ 8IGJ3mcL1BWGAN5KqT/DI4uhuxuxuULJAN+z8x9sEDUVuyMunOUaKCzkwecWHbuWBewt 97emPDFIPlF2PAgLJqJSGkboUEY/tuU965XRjEft8YXCg/IC47A0SZOfUbbWYBF2GMRW z6Rw0WdCkY2loxzzIypdjjTgLP/gdewsFzKaZSD+6R6wpWBDUxWGtB5DIWgAN+xpbdm7 d1QFrSKsIXGCBQhKUlgsw5PL5ZCyWcS2hRfVg8g4OnlbLupxzAEFJ3jBU4bwOpMaWiAt if0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc; bh=AdR5vOoa3ABzkjkhqVDqGVySaFLnDlse42aMFz2MHiM=; b=iJXhGdyFb/PMYwmG/vEvFancIuv2L9Yqwgxwbftoedjd/FTMhryLpfW6B3xdTZtvd2 WkDQoJKaAvz2KwZF0Pzogk8WL8nng67nazkc8kjgf1x2eetk2PVGk+deLDWkgM9lBVdy N35dmPqn0nCW8odH15rV6zpPAqBW6Im+Iqk76D/YEru4zfLuNmpjfT5kTH5/gNh67oXP Q29H2Gpb7xuyN+HCWxw9ZSoBx6nzT06o1IX44ehjDRS8MqeejW7p0sSCm8vreJBnBO2V H8JAmCtMfLzcCQMMcog6dEj2i/E7yCBVgRA3jQTf6ABmlYQi5MdI2TEG8aJ7PLXjQSW2 VBBw== X-Gm-Message-State: ACgBeo0qJSrz5URfukTnv2JH99JinDTRVpKHOS/XNtRHIF1sMr0Tcr3d gH09a+mUyHeCkfhuZdJLMtcxkSAfUdLN28Qe0bPXID/6IX13j4nrOEDVydi1FpUYMiAAm6o5oLY /7MXpxuFusblw+5qEJz37n0xlp5bYQWrdE2k8PjAa4I7QQzWUmkhBkhww08Y= X-Google-Smtp-Source: AA6agR59eGj7ypT1qa0eXwobPq47krXizmAbaf1BO0hSycKj9hQkSga3/Tzc5dKb6S1TDC9AoU9J+FfN/+4= X-Received: from yuanyu.kir.corp.google.com ([2620:15c:29:204:2db3:282b:550e:d4f]) (user=yuanyu job=sendgmr) by 2002:a05:6a00:1812:b0:536:dde9:8ef2 with SMTP id y18-20020a056a00181200b00536dde98ef2mr8139404pfa.70.1661308287742; Tue, 23 Aug 2022 19:31:27 -0700 (PDT) Date: Tue, 23 Aug 2022 19:31:23 -0700 In-Reply-To: <20220824023123.3060905-1-yuanyu@google.com> Message-Id: <20220824023123.3060905-2-yuanyu@google.com> Mime-Version: 1.0 References: <20220824023123.3060905-1-yuanyu@google.com> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog Subject: [PATCH v1 1/1] OvmfPkg/PlatformDxe: Check RouteConfig arguments for spec compliance From: "Yuan Yu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jordan Justen , Laszlo Ersek , Anthony Perard , Julien Grall Content-Type: text/plain; charset="UTF-8" Per UEFI Spec 2.9, EFI_HII_CONFIG_ROUTING_PROTOCOL.RouteConfig() should return EFI_INVALID_PARAMETERS if caller passes in a NULL for the Configuration parameter (see 35.4 EFI HII Configuration Routing Protocol). Add a check to return EFI_INVALID_PARAMETERS when Configuration is NULL. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Laszlo Ersek Cc: Anthony Perard Cc: Julien Grall Signed-off-by: Yuan Yu --- OvmfPkg/PlatformDxe/Platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c index a6d459f3dfd7..83dcd2216c6d 100644 --- a/OvmfPkg/PlatformDxe/Platform.c +++ b/OvmfPkg/PlatformDxe/Platform.c @@ -344,7 +344,7 @@ RouteConfig ( Configuration )); - if (Progress == NULL) { + if (Progress == NULL || Configuration == NULL) { return EFI_INVALID_PARAMETER; } -- 2.37.2.672.g94769d06f0-goog