From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1D6CFAC05CC for ; Wed, 30 Aug 2023 01:48:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=jGuVUMGwFLnhsSlfZW3mUtRuxZYDQRdB8frngL5pmQI=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1693360106; v=1; b=sw2GO4FfYH1gEFpZKibpoZqKlcJ008FMkl92JtUey5rRPjbWAB/YU/R0ljtOOobCQnnEgZIH 4hc0DwXAUuYlU7PNNrNg3butmfmv8w2yrwImdKKZI0CzmN9AtYx12JXu6/54aNVLvcEBhiwVXVO ynMo1NHm/0EgMxQPcaWgy4Cs= X-Received: by 127.0.0.2 with SMTP id EhU4YY7687511xqVQEdxRPFJ; Tue, 29 Aug 2023 18:48:26 -0700 X-Received: from NAM04-MW2-obe.outbound.protection.outlook.com (NAM04-MW2-obe.outbound.protection.outlook.com [40.107.101.81]) by mx.groups.io with SMTP id smtpd.web11.4748.1693360106204125138 for ; Tue, 29 Aug 2023 18:48:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fmsIjV58i9fySjjHsRYx9tonsdKo76IKllU0JQMDNTorNFfcK0NM5ZoBA+ee5F2QmcfnSwJsKP7zzDMFr2VxDj8u/TkDwgtsTjBQyVZqlSsDV8usvKbXloV3ASvq2z8hyoaQMdj91tUoxOUM+4vsAEI0KurBq9cQKsV+hOTKGHFShIegVSuZwuEeEk9ZKHtkoMpihIXKFAHSuKR/j0405wrzMllDJWB3sF8ddn570vlEcqtid5XPfkjwOn5vRrY39tlJzTc2/VNWv5kuLQbxoEsTanfc6c7QRJRyMU11hM4Cd0UmNvHEn2Qg/Z9Q9hPbOA1+qC0W4nmDJyT/+XXi0Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2de6/FL1VpNUUdmhX708sXVzvH7kRKxe4LNYxlmVVis=; b=ll3kJ7xiSwYlU72fie/DFyrcXwD+mupolkJUbe9ie4f++6NqU7B1P590QfE7k1T1Gx0JF6aXNbVMoLYViBAOY26384cPIfOUCgtjFm8cNDRry/asPPrawJeYL/MmvX18IByPymgcaD48McxMdOSKumJ6co10zto0M2TRQWfLSfKuqpAcO3c+amQL5j+k+0uNYVjBiE8kJf38RpvxjoRdMYfrjSrn7SoelHYFHKAmnv/707JbC1msljyA/5A2kIkKQB+uLCHTl4eZrgAHLRdIdhfwbXpCe1wmlAm9nQieRD4tdLFgu2HRek0SKVkjMozV9zOfOPGpG9eVDoi/L0kwoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by PH7PR12MB8426.namprd12.prod.outlook.com (2603:10b6:510:241::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.35; Wed, 30 Aug 2023 01:48:24 +0000 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::1390:de0a:6b46:9837]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::1390:de0a:6b46:9837%7]) with mapi id 15.20.6699.035; Wed, 30 Aug 2023 01:48:23 +0000 From: "Nickle Wang via groups.io" To: Mike Maslenkin , "devel@edk2.groups.io" CC: "abner.chang@amd.com" , "igork@ami.com" Subject: Re: [edk2-devel] [PATCH v2 2/6] RedfishClientPkg: fix access to uninitialized variable Thread-Topic: [PATCH v2 2/6] RedfishClientPkg: fix access to uninitialized variable Thread-Index: AQHZ2k8AabrLKX7JQEenxoJbM/O0JLACE2wg Date: Wed, 30 Aug 2023 01:48:23 +0000 Message-ID: References: <20230829080112.12748-1-mike.maslenkin@gmail.com> <20230829080112.12748-3-mike.maslenkin@gmail.com> In-Reply-To: <20230829080112.12748-3-mike.maslenkin@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|PH7PR12MB8426:EE_ x-ms-office365-filtering-correlation-id: b296775e-03b9-4f04-5625-08dba8fb3265 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: X/5WXcrLRveJEYMpgMZj87b2cgmguSNy9mP8U+bierbt1qv/JHPSFkFtNHQQgorKyjcl8HExywlBIDUayBZCozpxMLMKyamSJ/LwsKUuVywa+MqJfHDbFJx8YmeEbbZErGReN+DCBtJuL6yu+uUcX7KkSboAIHwAoaxM1W/mpEBNAmC0pujrSDcxXyjzQdf9Y4U7AjOFNB5HkSFsDjSjRSPl9e/8wXAJzzjOX04UuJg9OKGs9IIGn4D5KZPt/ZDF8fG4mTh6ugodGwjxKvr4K5jxKgLIHY8e9JGWaLeBBF/y7rXlOxuP7Ah3ChEd2NfrgJjDZrcpk65Yx7fTSWlMhh4BkeIZTrCnbD6WBSuBnf+WG5TeGe8iWtNKR0/P0pCRvEKw2/W080T4qIV0tNl50eCh7sHS4dnKZ5WySL6kBf7Ctit3+FIN8BArMIO2nYRCqh18Al98tw0NuUT1X6p1Jxqun5q5grZczapy9Sk+ncn+mlcjKUwgD4ZPeC+m1Sfqxn0goC8J1Ux4mfFa+nBasdl3yTqkJ8mTHNIcRh5WDovTS3YawVwaylBxiMrIwtAUfl9dqqkopmLkUxE43FpYiQ2DKxRin4hxMURa/9TUyQ3/gFAWsV6Hu0Tw5Gyt16h5 x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?lBjkFRSJAya8EHrI0wtBpVyYPp7Xa7FuYB5NQtEAxJ1BWzfE2HUpq8lRVAFh?= =?us-ascii?Q?ub3dKqrmFqRguab9zvC574zbLqK0xvK+JsQ7kAJsJB2QaKkSe+6GmzpXOcOs?= =?us-ascii?Q?hJS/T0aslf3EZQ9aVkeqXgdSfuU9auj6ACaIPvnzKatAFlPH4DnHIBBJUCus?= =?us-ascii?Q?tha/qFl3vEzAvTD8YtZLo7CbHoFCV09Oud6YEgM0ksv00uu5WRB/nNt42JTy?= =?us-ascii?Q?wu585BXaKbrr2jxA5dI0cda8LWg42/CW5o0AkYGYJknpxsccoa1IfUQzcEe6?= =?us-ascii?Q?72f391uFDZsZGjpysYbzE5GkIGA/0HwYEvz28/9r0mRKXpe/y+drMFTV8Pbx?= =?us-ascii?Q?7EmoJUof7bEb1lE+c8o7LMPidtyBYKDeMg4Nkec7N7cZwCC4YiIoyhY9hXkI?= =?us-ascii?Q?rHu9QNYzNbOU1u9mMgPSLEwkXevpMCOleoJibbMiAURNAmNkgY7E3fzFyGXJ?= =?us-ascii?Q?a6FhyRc1MlvHKJJb5Nc3//Dn24lQZZv5zHXKYr5baTV+vtmhwI8XTYgjl4op?= =?us-ascii?Q?wKPOTW8Sb2jCY5Xitaw033pJpcH5igCYNLbj8byUC4RuC3kvoE4iy4+kA77y?= =?us-ascii?Q?qhju3bQD9F9P6Mr4GhKN/WlhKhbtvs+8sOm5+6U5B8JSg4bYiG1oEZaJwYCV?= =?us-ascii?Q?PXyNf6ZF/8UazR12KIQxoBBbiufSy3CpWSh1EzrJ8XprJP53uTZIgSoCzK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Y=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b296775e-03b9-4f04-5625-08dba8fb3265 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2023 01:48:23.8261 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ESvZ1Jt561Shze/SgD0vqiyCdcz4oX/GicAPNATD42l7/yf9+kExJO5MHjfsl9LcdHo0jdHIIKt4lNIrYbxe1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8426 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: L1YqSggMVzeJ7yx5R4BYLI7mx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=sw2GO4Ff; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Thanks for fixing this issue, Mike. Reviewed-by: Nickle Wang Regards, Nickle > -----Original Message----- > From: Mike Maslenkin > Sent: Tuesday, August 29, 2023 4:01 PM > To: devel@edk2.groups.io > Cc: abner.chang@amd.com; Nickle Wang ; > igork@ami.com; Mike Maslenkin > Subject: [PATCH v2 2/6] RedfishClientPkg: fix access to uninitialized var= iable >=20 > External email: Use caution opening links or attachments >=20 >=20 > This patch fixes access to uninitialized variable, causing ASSERT from Fr= eePool at > least. >=20 > Before this patch RedfishSettingsResponse was initialized by GetResourceB= yUri > under 'if (JsonValue !=3D NULL)' condition. > But freed under 'if (Private->Payload !=3D NULL)' condition. > Thus uninitialized pointers caused ASSERT on attempt to free memory. >=20 > Signed-off-by: Mike Maslenkin > --- > RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > index e7ac8779581c..f5562fb49cab 100644 > --- a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > @@ -128,6 +128,8 @@ RedfishResourceConsumeResource ( > return Status; >=20 > } >=20 >=20 >=20 > + ZeroMem (&RedfishSettingsResponse, sizeof (REDFISH_RESPONSE)); >=20 > + >=20 > ExpectedResponse =3D &Response; >=20 > RedfishSettingsUri =3D NULL; >=20 > JsonValue =3D RedfishJsonInPayload (Response.Payload); >=20 > -- > 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108106): https://edk2.groups.io/g/devel/message/108106 Mute This Topic: https://groups.io/mt/101027004/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-