From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.46]) by mx.groups.io with SMTP id smtpd.web12.2641.1588755273908918042 for ; Wed, 06 May 2020 01:54:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nxp.com header.s=selector2 header.b=NLi6pbDI; spf=pass (domain: nxp.com, ip: 40.107.22.46, mailfrom: gaurav.jain@nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mbwZAUx/agBTjO0CZ/WascZXvGp3yCdB9QE38qYwe1r9we1XvT8yiTjscfJ7GVf2CDSTVD48usIFBLK4u/Q5qcdAY0bMJLRWBF+hw5MysfStQ60zoUI4MtE7/cjp81libN6G/6Vi9eUQFvthsBjBymHABd9qdr5yd22AC748CGaha3nvoYWHVvxDnbw7t4Vz+5uzW7XRqjVJrnisFhWiqEZABVIX/aRAw2OiFHlCcvGo7HQqc4Jp3tiXpF9odd9xBwP0ovt3kLZm/QcICZ+7GroAajdOcfZ7GQqHgntOMZ5krA97b+OjNVurwEEBSBXr9RsSgJS2e1SwLG8LpbxK6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JZjuq30v9pX671x6VpHhAMv5HwYoQn42HfPj2igtNPU=; b=awxupLq+ks0BfqvDXOj/l9pQ9g7GZZcGbG7p9HUnwZYUBa/8wx2pXWgg7vIdGrH9fLR27oGRyhBOxLkchSUkEp9J2gHPbEUyzRLSWMKUsSMJ7hdLZ3PxtiYa7phUjTSohDMzlGikIyHfkgba1YkZfEZgNjKP0CbcVnmbO78O9BkLggyeC+PaLbILlShq8D+9LeKJLJMvKdS3hHHk//G+0ygK+gEQCrl6279fCULJbTID7nNLu+oj1dFA0Z+aUkhf6cRKG2ZTRzZe4Zen5Jnl+nxE4FqBTRIjrBStFh5rrDMblpqyYPg/hArObsY1JJ99XFE1PW+kd9BeXGbzK4iZww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JZjuq30v9pX671x6VpHhAMv5HwYoQn42HfPj2igtNPU=; b=NLi6pbDIVbNdVGfoCaj7oAVcOOTbu3f4xP2BHg7gh7fK56fkx6VC+RXAqiD0I8krcpG8WMVKZM5eCdlQhKro28vcCDxZuYaD+yJmWKMJLmkciMyfib8M3a39LwyDb1kw1I3cn1Qtmpocnlc/9+IxmBHVNlUvMW6JRoALdz0VyiQ= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=nxp.com; Received: from AM5PR04MB3074.eurprd04.prod.outlook.com (2603:10a6:206:4::16) by AM5PR04MB3059.eurprd04.prod.outlook.com (2603:10a6:206:b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Wed, 6 May 2020 08:54:32 +0000 Received: from AM5PR04MB3074.eurprd04.prod.outlook.com ([fe80::e50b:610e:7080:e559]) by AM5PR04MB3074.eurprd04.prod.outlook.com ([fe80::e50b:610e:7080:e559%7]) with mapi id 15.20.2958.030; Wed, 6 May 2020 08:54:32 +0000 From: "Gaurav Jain" To: devel@edk2.groups.io CC: Jiewen Yao , Chao Zhang , Pankaj Bansal , Gaurav Jain Subject: [PATCH 1/1] SignedCapsulePkg: Add handling of NULL returned from FMP Descriptor Date: Wed, 6 May 2020 14:24:13 +0530 Message-ID: <1588755253-25016-1-git-send-email-gaurav.jain@nxp.com> X-Mailer: git-send-email 2.7.4 X-ClientProxiedBy: SG2PR02CA0002.apcprd02.prod.outlook.com (2603:1096:3:17::14) To AM5PR04MB3074.eurprd04.prod.outlook.com (2603:10a6:206:4::16) Return-Path: gaurav.jain@nxp.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03032.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR02CA0002.apcprd02.prod.outlook.com (2603:1096:3:17::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Wed, 6 May 2020 08:54:30 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [14.142.151.118] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7fa300e4-39b3-46a8-c138-08d7f19b17d7 X-MS-TrafficTypeDiagnostic: AM5PR04MB3059:|AM5PR04MB3059: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 03950F25EC X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tW1pCitLRGTLgWcRaDEPASwEUVFCw5TzhONi8PoIgpghg2QR9WDax38RFQsdjtudj8GCa/Xd8idAdpfKbiY4HtioZre99xHn9uOVOqLG21Xulc1z6GCqXCVd1CYfaMjUJxDmLrT+dAK1Qz3pqH1hU80locR0zKKpQYO1t6Ri5lOGSX74km4CziwDXsoeEc98mPJMq/B1Sv2poOVUHMeEdfzIeYkjkVqel+URU+gCdZhkvnNtsj5pERdULcKkMw6OCv7ne2Lw8lCEtzhlZTpsK6Ylqxq7ch0wBBHkirmyhE5YhQxZ9ZJI/P0JMJ2rHczSFyKEeNjwH9EgK1BD4z7CmRMdd7LGLoQ/bi0bVHDD9UQ4LcUQVsGbT/D276c57pU0/mCjgcxEUVKM7CcDMuahvHtZhCdd7Bh7h/C4SyXqQmKpKrnOUNGhMev1yFvVX1ZT90crmxyZKo5FH0L8OIiKKvv5NBvetyUSuM0r9KFzswZOeTyCFLSCJm6YW38sBssRjJpCfUJFvHIcg7lDlpAdH3C0JfnTWfNQ7H63q5pba14veJPFi+siIiy0HMOXgxia X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM5PR04MB3074.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(396003)(136003)(39860400002)(346002)(376002)(33430700001)(54906003)(4326008)(33440700001)(956004)(2616005)(478600001)(8936002)(5660300002)(36756003)(2906002)(316002)(66476007)(66556008)(6486002)(7696005)(52116002)(66946007)(6916009)(44832011)(26005)(55236004)(8676002)(16526019)(1006002)(6666004)(186003)(86362001)(110426005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 3JwlO+U8CckTMA9n2w9WdfbRE6IEWtjUx7eVPqe+VSG5dg5oyRva/O+I66JX40MyoIBrarfNU0dA7mPUBPuVqgDUYvcK+UNfckrlD53C5QiACb99CXTipeG3wv38HfIYLIDzPwNvUu6BP8zh8XWaxrIFbWUxxOx/y7gcnwre3bZGYABMXjwgCWdRiObud/2wxshgo8hq7t/Ek24dKn7f/FklfGUiicQpdO62QTxZh1zDaY2OXkULyvjSaLLxvY09JlYDcDS8niSwrQtWJNzkhFzoQzp5kUzS/2H7KiOSSH8l+uzIiKENzt5Chg5ZMmLiPBw5l6IWBbuaS9/ma6s23ETLFGZGJ2nAGEbGqIn1PUvvYyQqNrejLgn1bofzz7vJDiZmEFlzTptJOw56QRKZ32lWeSurGcd2tOOqtquOR1I+jIkwvp9hECALPmAPCsHsRPglYfLnxYJzEu623oxgJzuHcCJJ7wAthNdkY64ygbRx+bVyYIS4dg62GuMmJY8W3P1k+I423gUW58zr5UDb6KQOAP2BoyVd8Sd6YlpJUh7UcU8TpcyQ7aokfZ5Sr5WTaJ5mkdrrK07xGcwH4242Kuqzo/nvRKD0KhG/yzhNlNJ6RTkC4PQVhREz0Tf5U48JuAe7KA5nxiWHkK3+z5XLudJEfY+7kn6DQJK4rrPerc+TVg+23u2zgKdEyKPZ3GOrKaMTst+x29IyXwc+zNdUf9XFo8L4Y6boUEcFgFSXrUXSPuC5Sd7ykEexHA7U1/dk1j/cUk26tbsuskBfAMe+ipx7OpEdKOusyKhp94PDdCc= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7fa300e4-39b3-46a8-c138-08d7f19b17d7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2020 08:54:31.9974 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XxF5vfHB2BB0pl1BtFwC0c8ih5gcpXq9S2Pc8iWb/tqyfmVteEz24jPPD32RB8om/PegT7zlj/7Qtbs72halzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR04MB3059 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Firmware management protocol that does not support GetImageInfo return Unsupported. hence FMP Image Information Buffer is NULL. Freeing NULL buffer results in Exception. Added NULL check for Image Info buffer and skip processing FMP protocol handle, which does not support GetImageInfo. Signed-off-by: Gaurav Jain --- .../Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c | 5 += +++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmware= UpdateDxe.c b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwar= eUpdateDxe.c index bdb70bdb32cc..b4438ac6f55a 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateD= xe.c +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateD= xe.c @@ -579,7 +579,7 @@ GetFmpImageDescriptors ( &PackageVersionName // PackageVersionName ); if (Status !=3D EFI_BUFFER_TOO_SMALL) { - DEBUG ((DEBUG_ERROR, "SystemFirmwareUpdateDxe: Unexpected Failure. St= atus =3D %r\n", Status)); + DEBUG ((DEBUG_INFO, "SystemFirmwareUpdateDxe: Status =3D %r\n", Status= )); return NULL; } =20 @@ -678,6 +678,9 @@ FindMatchingFmpHandles ( &DescriptorSize ); =20 + if (OriginalFmpImageInfoBuf =3D=3D NULL) { + continue; + } // // Loop through the set of EFI_FIRMWARE_IMAGE_DESCRIPTORs. // --=20 2.7.4