From nobody Sun May 5 12:09:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+46579+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46579+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=dell.com ARC-Seal: i=1; a=rsa-sha256; t=1567104443; cv=none; d=zoho.com; s=zohoarc; b=Va+jD5PmDyzPLK3UsFVnds/3+0YWxSooOPfwM2aTtILJXcHIn1cBfKrKoXuVoCYUzZm0ZGkiwQ+AuBWo23nLZrf+U5o8yuqrj/XhZqIjDnJGNZ9NN2zzIBjmhsK5IdGcQzW6ZAYqANZaFqFvuvr1cLxMeXBtAFfNlYaZD6F0774= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567104443; h=Content-Type:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=OjoPE09+TYBt8LeHIjMCHlcRF8WJAUTGeaIJAO5j7J0=; b=i6Ytwwg7ZWMKlqGUCDEppc73kRtzCIhfV5BfF9rCpcc6pnezGZqKJ/VTGrjhxq+1pK68RoO5OWl5T3KtUqwBISxZFdQVLOxc6NINDDd1po0doyeeU/3JqktUFUoFjHXnrpwOZ19xdMUeO2kYW4jFsQk0ROpUqCmLDN1kS39+aVw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46579+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 15671044436891020.0870748848963; Thu, 29 Aug 2019 11:47:23 -0700 (PDT) Return-Path: X-Received: from mx0a-00154904.pphosted.com (mx0a-00154904.pphosted.com [148.163.133.20]) by groups.io with SMTP; Thu, 29 Aug 2019 09:32:07 -0700 X-Received: from pps.filterd (m0170389.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7TCOR4P024640 for ; Thu, 29 Aug 2019 12:32:06 -0400 X-Received: from mx0b-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0a-00154904.pphosted.com with ESMTP id 2uk2fxyd3r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 29 Aug 2019 12:32:05 -0400 X-Received: from pps.filterd (m0144102.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7TCZgdA124304 for ; Thu, 29 Aug 2019 12:32:05 -0400 X-Received: from ausxipps310.us.dell.com (AUSXIPPS310.us.dell.com [143.166.148.211]) by mx0b-00154901.pphosted.com with ESMTP id 2unqv83c94-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 29 Aug 2019 12:32:04 -0400 X-LoopCount0: from 10.166.135.142 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.60,349,1549951200"; d="scan'208,217";a="415248984" From: To: Subject: [edk2-devel] Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling. Thread-Topic: Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling. Thread-Index: AdVehjHw++tTtEy/SKqgCaNBx6H93A== Date: Thu, 29 Aug 2019 16:32:03 +0000 Message-ID: <375c3f4c7c874a8d8989a8d57dd9e575@ausx13mps324.AMER.DELL.COM> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Enabled=True; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SiteId=945c199a-83a2-4e80-9f8c-5a91be5752dd; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Owner=Jayanth_Raghuram@Dell.com; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SetDate=2019-08-29T16:24:35.3685291Z; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Name=External Public; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Application=Microsoft Azure Information Protection; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Extended_MSFT_Method=Manual; aiplabel=External Public x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [143.166.24.60] MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,Jayanth.Raghuram@dell.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_375c3f4c7c874a8d8989a8d57dd9e575ausx13mps324AMERDELLCOM_" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1567104443; bh=se0VT9yBtCCw/ISkcNr45Izdn62F6MhYnm5ohUrdhrc=; h=Content-Type:Date:From:Reply-To:Subject:To; b=OxsPslOd5J/n8cRfCytzfTR+JDOepi8EB5WV+M4TCBGZetIms19NZpg5CK+tTnXYIF0 vBNExw5DbYR5llPel6r1fFeQsH27snVhEIhvtGDAupjg31PPRRH47wzqdIw/OTMn7phYJ E47o50hT2eQvIilCuxNKzs+pzhG/b1XpZhM= X-ZohoMail-DKIM: pass (identity @groups.io) --_000_375c3f4c7c874a8d8989a8d57dd9e575ausx13mps324AMERDELLCOM_ Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Hi Liming, per your recommendation, Please review the below [PATCH v2] and the commit can be found in: git@gith= ub.com:JayRaghuram/edk2.git (ht= tps://github.com/JayRaghuram/edk2) REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2138 ________________________________ From 95c48454d6d14cb7537dec98d58f7dc01efa644e Mon Sep 17 00:00:00 2001 Message-Id: <95c48454d6d14cb7537dec98d58f7dc01efa644e.1567095734.git.Jayant= h_Raghuram@Dell.com> From: Jayanth Raghuram Date: Thu, 29 Aug 2019 11:17:09 -0500 Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handli= ng. REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2138 Added checks for return parameters of GetSupportedTypes function calls in InternalHstiFindAip to improve error handling. An issue was observed on Dell Poweredge R740, where the Dell PERC H740P controller UEFI driver returned InfoTypesBuffer =3D NULL, InfoTypesBufferCount =3D 0 and caused an FreePool assert. Signed-off-by: Jayanth Raghuram Cc: Wei G Liu --- MdePkg/Library/DxeHstiLib/HstiDxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLi= b/HstiDxe.c index 9466e3dcb3..4e1c67616b 100644 --- a/MdePkg/Library/DxeHstiLib/HstiDxe.c +++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c @@ -77,7 +77,7 @@ InternalHstiFindAip ( &InfoTypesBuffer, &InfoTypesBufferCount ); - if (EFI_ERROR (Status)) { + if (EFI_ERROR (Status) || (InfoTypesBuffer =3D=3D NULL) || (InfoTypesB= ufferCount =3D=3D 0)) { continue; } -- 2.19.1.windows.1 ________________________________ Regards Jayanth Raghuram DellEMC | Server Platform BIOS office + 1 512 723 1470 -=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 (#46579): https://edk2.groups.io/g/devel/message/46579 Mute This Topic: https://groups.io/mt/33071679/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_375c3f4c7c874a8d8989a8d57dd9e575ausx13mps324AMERDELLCOM_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Liming,

per your recommendation,

 

Please review the below [PATCH v2] and the commit c= an be found in: git@github.com:JayR= aghuram/edk2.git (https= ://github.com/JayRaghuram/edk2)

REF:https://bugzilla.tianocore.org/show_bug.cgi?id= =3D2138


From 95c48454d6d14cb7537dec98d58f7dc01efa644e Mon S= ep 17 00:00:00 2001

Message-Id: <95c48454d6d14cb7537dec98d58f7dc01ef= a644e.1567095734.git.Jayanth_Raghuram@Dell.com>

From: Jayanth Raghuram <Jayanth_Raghuram@Dell.co= m>

Date: Thu, 29 Aug 2019 11:17:09 -0500

Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks= to improve error handling.

 

REF:https://bugzilla.tianocore.org/show_bug.cgi?id= =3D2138

 

Added checks for return parameters of GetSupportedT= ypes

function calls in InternalHstiFindAip to improve er= ror handling.

An issue was observed on Dell Poweredge R740, where= the Dell

PERC H740P controller UEFI driver returned InfoType= sBuffer =3D NULL,

InfoTypesBufferCount =3D 0 and caused an FreePool a= ssert.

 

Signed-off-by: Jayanth Raghuram <Jayanth.Raghura= m@Dell.com>

Cc: Wei G Liu <Wei_G_Liu@Dell.com>=

---

MdePkg/Library/DxeHstiLib/HstiDxe.c | 2 +-=

1 file changed, 1 insertion(+), 1 deletion(-)

 

diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/= MdePkg/Library/DxeHstiLib/HstiDxe.c

index 9466e3dcb3..4e1c67616b 100644

--- a/MdePkg/Library/DxeHstiLib/HstiDxe.c

+++ b/MdePkg/Library/DxeHstiLib/HstiDxe= .c

@@ -77,7 +77,7 @@ InternalHstiFindAip (

        &nb= sp;            &= InfoTypesBuffer,

        &nb= sp;            &= InfoTypesBufferCount

        &nb= sp;            );

-    if (EFI_ERROR (Status)) {<= /o:p>

+    if (EFI_ERROR (Status) || (= InfoTypesBuffer =3D=3D NULL) || (InfoTypesBufferCount =3D=3D 0)) {

       continue;=

     }

--

2.19.1.windows.1


 

Regards

Jayanth Raghuram=

DellEMC | Server Platform BIOS

office + 1 512 723 1470

 

_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#46579) | | Mu= te This Topic | New Topic

Your Subscripti= on | Contact Group Owner | Unsubscribe [importer@patchew.org]

_._,_._,_
--_000_375c3f4c7c874a8d8989a8d57dd9e575ausx13mps324AMERDELLCOM_--