[edk2-devel] [PATCH V1 1/2] OvmfPkg/AcpiPlatformDxe: Avoid possible NULL pointer dereference
sunceping
cepingx.sun at intel.com
Thu Oct 19 06:21:41 UTC 2023
From: Ceping Sun <cepingx.sun at intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4568
The function InstallCloudHvTablesTdx had an Assert when "DsdtTable == NULL",
but this comes into play only in DEBUG mode. In Release mode , there is
no handling if the pointer is NULL. To avoid the possible null pointer
dereference, it is better to handle it when the pointer is null.
Cc: Gerd Hoffmann <kraxel at redhat.com>
Cc: Jiewen Yao <jiewen.yao at intel.com>
Cc: Min Xu <min.m.xu at intel.com>
Signed-off-by: Ceping Sun <cepingx.sun at intel.com>
---
OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
index d3e73c155e8f..24c22bb646ca 100644
--- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
@@ -71,6 +71,7 @@ InstallCloudHvTablesTdx (
if (DsdtTable == NULL) {
DEBUG ((DEBUG_INFO, "%a: no DSDT found\n", __func__));
ASSERT (FALSE);
+ CpuDeadLoop ();
}
Status = AcpiProtocol->InstallAcpiTable (
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109792): https://edk2.groups.io/g/devel/message/109792
Mute This Topic: https://groups.io/mt/102055424/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list