From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=C+k0ehPj; spf=pass (domain: arm.com, ip: 40.107.3.86, mailfrom: krzysztof.koch@arm.com) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.86]) by groups.io with SMTP; Thu, 01 Aug 2019 01:44:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TTaRI25v8QlSI92jcs55ZQ//q2FsRKcouByRpqzqneQ=; b=C+k0ehPjPggTK/AsRSPWik3Y8tUME1guIxRX/ZTbBUpuL4WoDBWeFpjSUXqFJqthop11wV55CJzLumZFjZFD91MM91v485B5LrvlJ6Sx5iLFXgLuBIa2vqjmAQzx9awfc4YulvsExheMc19xXK54jaunWa7FBFddfoLGlfwFVYU= Received: from VI1PR08CA0247.eurprd08.prod.outlook.com (2603:10a6:803:dc::20) by HE1PR0801MB1850.eurprd08.prod.outlook.com (2603:10a6:3:86::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.16; Thu, 1 Aug 2019 08:44:49 +0000 Received: from DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::208) by VI1PR08CA0247.outlook.office365.com (2603:10a6:803:dc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2136.14 via Frontend Transport; Thu, 1 Aug 2019 08:44:49 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT021.mail.protection.outlook.com (10.152.20.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Thu, 1 Aug 2019 08:44:47 +0000 Received: ("Tessian outbound a1fd2c3cfdb0:v26"); Thu, 01 Aug 2019 08:44:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 87bb7f1c85c670e4 X-CR-MTA-TID: 64aa7808 Received: from 0ddf5e8498f6.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.8.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 296CBDAC-54E9-423C-A05B-C00592ECC597.1; Thu, 01 Aug 2019 08:44:39 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-am5eur03lp2052.outbound.protection.outlook.com [104.47.8.52]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0ddf5e8498f6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Thu, 01 Aug 2019 08:44:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C+bxycks4LLfnIwhPwdPNnDsAjV848V403f4DLaPMrya56IJ2tHO19Cp4Rw1J+l5gOaBaetCUyyFT7X0cbui8ZeqrmccJeIpM///BvQVFiZLuwBXq8Y7x7aBLglDp8dIry3Q/l2HJROqaZcHcua7FhYna47raQlRAfPJX38mnwi+ev24/8QOIdDMqDFO3ZHh+G28YZMQNWyaL91Xu5fuwpXquBcXczfAmWTl6kAIYP/UgYD73KJMOojWaMrulmXjYm+sytBptZzieVtOrbGV4+hFpiwZ85rnDsPDhPs6Vg3/E+GXB+zxfp14oVFhEQVxvVaTv8Z82jjm/5CkgqmbTA== 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=TTaRI25v8QlSI92jcs55ZQ//q2FsRKcouByRpqzqneQ=; b=Fm9xCzN4HCRCBuMz1h16VwsdnVJWlNCwypAgENp2xexoROuS4f64/fivzsDJyAm7Gw39gWHvX+pd1SnKTi8LUqPChsfUDEq6VN0xsL4VMrBoCsrWnvcn0ofo2aa6wgoWCvHiW9zv8MkKY1Vuo66CrvHdr/Re+4jkoZG86wPeTsEvLwzJOZ5PrzTyTNzoz0hWPzUPumv1wV7MZWf/7wKElLyvTewUQ+CAT0ORQyDTjTetw8WnRmny/4r6S5TQU9jv+TAMN0VmI/v4XElN+6BIliOg25hR4IvVHKSPdoDGA4M6mzMQkbsVlxkuWGQnwUfSvD/6Iv8j7O3GFaHudkc9/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=temperror (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com;dmarc=temperror action=none header.from=arm.com;dkim=none (message not signed);arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TTaRI25v8QlSI92jcs55ZQ//q2FsRKcouByRpqzqneQ=; b=C+k0ehPjPggTK/AsRSPWik3Y8tUME1guIxRX/ZTbBUpuL4WoDBWeFpjSUXqFJqthop11wV55CJzLumZFjZFD91MM91v485B5LrvlJ6Sx5iLFXgLuBIa2vqjmAQzx9awfc4YulvsExheMc19xXK54jaunWa7FBFddfoLGlfwFVYU= Received: from VI1PR08CA0176.eurprd08.prod.outlook.com (2603:10a6:800:d1::30) by HE1PR0801MB1850.eurprd08.prod.outlook.com (2603:10a6:3:86::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.16; Thu, 1 Aug 2019 08:44:36 +0000 Received: from VE1EUR03FT036.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::204) by VI1PR08CA0176.outlook.office365.com (2603:10a6:800:d1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.12 via Frontend Transport; Thu, 1 Aug 2019 08:44:36 +0000 Authentication-Results-Original: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT036.mail.protection.outlook.com (10.152.19.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2052.18 via Frontend Transport; Thu, 1 Aug 2019 08:44:32 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Thu, 1 Aug 2019 08:44:15 +0000 Received: from E119924.Arm.com (10.1.199.124) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Thu, 1 Aug 2019 08:44:15 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [PATCH v1 1/6] ShellPkg: acpiview: DBG2: Prevent buffer overruns Date: Thu, 1 Aug 2019 09:44:02 +0100 Message-ID: <20190801084407.48712-2-krzysztof.koch@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20190801084407.48712-1-krzysztof.koch@arm.com> References: <20190801084407.48712-1-krzysztof.koch@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(136003)(376002)(39860400002)(346002)(2980300002)(199004)(189003)(45080400002)(186003)(50226002)(26005)(8936002)(5660300002)(356004)(2906002)(6666004)(68736007)(53416004)(1076003)(6916009)(48376002)(50466002)(70586007)(70206006)(2351001)(478600001)(76176011)(86362001)(44832011)(53936002)(36756003)(486006)(476003)(126002)(316002)(54906003)(51416003)(16586007)(7696005)(47776003)(8676002)(4326008)(426003)(63370400001)(63350400001)(81166006)(81156014)(2616005)(11346002)(446003)(336012)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0801MB1850;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d82e8d2-937f-4e70-c752-08d7165c824e X-Microsoft-Antispam-Untrusted: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328);SRVR:HE1PR0801MB1850; X-MS-TrafficTypeDiagnostic: HE1PR0801MB1850:|HE1PR0801MB1850: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true X-MS-Oob-TLC-OOBClassifiers: OLM:431;OLM:431; X-Forefront-PRVS: 01165471DB X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: nd2YIragJlTFKgWiAM5O9n1ZCkXJJOqp9sZzOpO1C/XMhzgG+EEh47NPo/pUY0cW4F2iJVc84e/RFrATPxzZ22hS5IvtKp0kpWIr2ootFo7/GbjbS4DJievN1Wg6GZOycEvtiNqw9kWLhww4EaAEI/unIIn2JM517a3KJYH6yueHS3/0mDbLRmHvFajjyTWj9S2d0Wzan0A9unPOK0yvvHf80ErvYuNOAcVcQ+ltoTMdFkkNSD91oTPMnuVNXkLUTzNmsrI5P/6bwN8UZBsEc8NZdG1lZEjfntUu8cC/R1n3QHFWHKeL3wLSgeGgK/inedLkZmOHEU1w3LbcaOvt6xhXSuCfXg2FBn6oydO3CTQYOHoH5RFWKK6Rx+F3hIFo8W9PwgUng/dV20w7PJhWuQvEn2CoDP0uT4k4UjSxg3E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1850 Original-Authentication-Results: spf=temperror (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=temperror action=none header.from=arm.com; Return-Path: Krzysztof.Koch@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;IPV:CAL;SCL:-1;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(136003)(376002)(39860400002)(346002)(2980300002)(199004)(189003)(45080400002)(186003)(50226002)(26005)(8936002)(5660300002)(2906002)(6666004)(22756006)(53416004)(1076003)(6916009)(48376002)(50466002)(70586007)(70206006)(2351001)(26826003)(478600001)(76176011)(86362001)(76130400001)(44832011)(36756003)(486006)(476003)(126002)(316002)(54906003)(51416003)(16586007)(7696005)(47776003)(8676002)(4326008)(426003)(63370400001)(63350400001)(81166006)(81156014)(2616005)(11346002)(446003)(336012)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR0801MB1850;H:64aa7808-outbound-1.mta.getcheckrecipient.com;FPR:;SPF:TempError;LANG:en;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;A:1;MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: aa1fcf1a-2e2d-4d40-88be-08d7165c7a91 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(710020)(711020)(4605104)(1401327)(2017052603328);SRVR:HE1PR0801MB1850; NoDisclaimer: True X-Forefront-PRVS: 01165471DB X-Microsoft-Antispam-Message-Info: ddbo85bNTxuVTJTmQCOx5TtjH5ah4vA4tpMg4CYxqdtIxXIbHTUVXgYXKUUaS3JVM7bP7Qu+XGUkTsf5VsJ8zq1YQlQ9KSWE0wbxnpt+EOcrucF9hN6coF3X6vkUNkEVa1lFkI/ccGqfJEMfcP/wOuKeEz8FKdE74Ek1hmD13P8w5OHZAGb9fW3arPFaynuUJmlxReqrQqHuEAiw89wYnNFMl6OmI1HDWdwZwr/5r5iU/nRuzdk1XFm2Z07W34MlRjmnR1kT0YmFrCamlxOw5XnWYicUxLDtWDpww3yTdcEAJFhKCwrLQB4jjEpeo0mDkz3pm2Dk/TaMGkhing9LLAfY+wlDH5zPf5AGe7KRTe/zQKD85cwEW2X9MgQr1TSllgFo+fh8picm1458Fe2vQhs2qz3jsn+Ct+BH67tdOyI= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2019 08:44:47.4517 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d82e8d2-937f-4e70-c752-08d7165c824e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1850 Content-Type: text/plain Modify the DBG2 table parsing logic to prevent reading past the ACPI buffer lengths provided. Modify the signature of the DumpDbgDeviceInfo() function to make it consistent with the ACPI structure processing functions in other acpiview parsers. Now, the length of the Debug Device Information Structure is read before the entire structure is dumped. This refactoring change makes it easier to stop reading beyond the DBG2 table buffer if the Debug Device Information Structure Buffer does not fit in the DBG2 buffer. For processing the first two fields of the Debug Device Information Structure (to get the length) a new ACPI_PARSER array is defined. References: - Microsoft Debug Port Table 2 (DBG2), December 10, 2015 Signed-off-by: Krzysztof Koch --- Notes: v1: - Prevent buffer overruns in DBG2 acpiview parser [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c | 141 +++++++++++++------- 1 file changed, 92 insertions(+), 49 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c index c6929695a1032c57761ef85002d6c51b7800ce23..869e700b9beda4886bf7bc5ae4ced3ab9a59efa3 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c @@ -64,10 +64,17 @@ STATIC CONST ACPI_PARSER Dbg2Parser[] = { (VOID**)&NumberDbgDeviceInfo, NULL, NULL} }; +/// An ACPI_PARSER array describing the debug device information structure +/// header. +STATIC CONST ACPI_PARSER DbgDevInfoHeaderParser[] = { + {L"Revision", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, + {L"Length", 2, 1, L"%d", NULL, (VOID**)&DbgDevInfoLen, NULL, NULL} +}; + /// An ACPI_PARSER array describing the debug device information. STATIC CONST ACPI_PARSER DbgDevInfoParser[] = { {L"Revision", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, - {L"Length", 2, 1, L"%d", NULL, (VOID**)&DbgDevInfoLen, NULL, NULL}, + {L"Length", 2, 1, L"%d", NULL, NULL, NULL, NULL}, {L"Generic Address Registers Count", 1, 3, L"0x%x", NULL, (VOID**)&GasCount, NULL, NULL}, @@ -93,76 +100,91 @@ STATIC CONST ACPI_PARSER DbgDevInfoParser[] = { /** This function parses the debug device information structure. - @param [in] Ptr Pointer to the start of the buffer. - @param [out] Length Pointer in which the length of the debug - device information is returned. + @param [in] Ptr Pointer to the start of the buffer. + @param [in] Length Length of the debug device information structure. **/ STATIC VOID EFIAPI DumpDbgDeviceInfo ( - IN UINT8* Ptr, - OUT UINT32* Length + IN UINT8* Ptr, + IN UINT16 Length ) { UINT16 Index; - UINT8* DataPtr; - UINT32* AddrSize; - - // Parse the debug device info to get the Length - ParseAcpi ( - FALSE, - 0, - "Debug Device Info", - Ptr, - 3, // Length is 2 bytes starting at offset 1 - PARSER_PARAMS (DbgDevInfoParser) - ); + UINT16 Offset; ParseAcpi ( TRUE, 2, "Debug Device Info", Ptr, - *DbgDevInfoLen, + Length, PARSER_PARAMS (DbgDevInfoParser) ); - // GAS and Address Size + // GAS Index = 0; - DataPtr = Ptr + (*BaseAddrRegOffset); - AddrSize = (UINT32*)(Ptr + (*AddrSizeOffset)); - while (Index < (*GasCount)) { + Offset = *BaseAddrRegOffset; + while ((Index++ < *GasCount) && + (Offset < Length)) { PrintFieldName (4, L"BaseAddressRegister"); - DumpGasStruct (DataPtr, 4, GAS_LENGTH); + Offset += (UINT16)DumpGasStruct ( + Ptr + Offset, + 4, + Length - Offset + ); + } + + // Make sure the array of address sizes corresponding to each GAS fit in the + // Debug Device Information structure + if ((*AddrSizeOffset + (*GasCount * sizeof (UINT32))) > Length) { + IncrementErrorCount (); + Print ( + L"ERROR: Invalid GAS count. GasCount = %d. RemainingBufferLength = %d. " \ + L"Parsing of the Debug Device Information structure aborted.\n", + *GasCount, + Length - *AddrSizeOffset + ); + return; + } + + // Address Size + Index = 0; + Offset = *AddrSizeOffset; + while ((Index++ < *GasCount) && + (Offset < Length)) { PrintFieldName (4, L"Address Size"); - Print (L"0x%x\n", AddrSize[Index]); - DataPtr += GAS_LENGTH; - Index++; + Print (L"0x%x\n", *((UINT32*)(Ptr + Offset))); + Offset += sizeof (UINT32); } // NameSpace String Index = 0; - DataPtr = Ptr + (*NameSpaceStringOffset); + Offset = *NameSpaceStringOffset; PrintFieldName (4, L"NameSpace String"); - while (Index < (*NameSpaceStringLength)) { - Print (L"%c", DataPtr[Index++]); + while ((Index++ < *NameSpaceStringLength) && + (Offset < Length)) { + Print (L"%c", *(Ptr + Offset)); + Offset++; } Print (L"\n"); // OEM Data - Index = 0; - DataPtr = Ptr + (*OEMDataOffset); - PrintFieldName (4, L"OEM Data"); - while (Index < (*OEMDataLength)) { - Print (L"%x ", DataPtr[Index++]); - if ((Index & 7) == 0) { - Print (L"\n%-*s ", OUTPUT_FIELD_COLUMN_WIDTH, L""); + if (*OEMDataOffset != 0) { + Index = 0; + Offset = *OEMDataOffset; + PrintFieldName (4, L"OEM Data"); + while ((Index++ < *OEMDataLength) && + (Offset < Length)) { + Print (L"%x ", *(Ptr + Offset)); + if ((Index & 7) == 0) { + Print (L"\n%-*s ", OUTPUT_FIELD_COLUMN_WIDTH, L""); + } + Offset++; } + Print (L"\n"); } - Print (L"\n"); - - *Length = *DbgDevInfoLen; } /** @@ -187,8 +209,7 @@ ParseAcpiDbg2 ( ) { UINT32 Offset; - UINT32 DbgDeviceInfoLength; - UINT8* DevInfoPtr; + UINT32 Index; if (!Trace) { return; @@ -202,14 +223,36 @@ ParseAcpiDbg2 ( AcpiTableLength, PARSER_PARAMS (Dbg2Parser) ); - DevInfoPtr = Ptr + Offset; - while (Offset < AcpiTableLength) { - DumpDbgDeviceInfo ( - DevInfoPtr, - &DbgDeviceInfoLength + Offset = *OffsetDbgDeviceInfo; + Index = 0; + + while (Index++ < *NumberDbgDeviceInfo) { + + // Parse the Debug Device Information Structure header to obtain Length + ParseAcpi ( + FALSE, + 0, + NULL, + Ptr + Offset, + AcpiTableLength - Offset, + PARSER_PARAMS (DbgDevInfoHeaderParser) ); - Offset += DbgDeviceInfoLength; - DevInfoPtr += DbgDeviceInfoLength; + + // Make sure the Debug Device Information structure lies inside the table. + if ((Offset + *DbgDevInfoLen) > AcpiTableLength) { + IncrementErrorCount (); + Print ( + L"ERROR: Invalid Debug Device Information structure length. " \ + L"DbgDevInfoLen = %d. RemainingTableBufferLength = %d. " \ + L"DBG2 parsing aborted.\n", + *DbgDevInfoLen, + AcpiTableLength - Offset + ); + return; + } + + DumpDbgDeviceInfo (Ptr + Offset, (*DbgDevInfoLen)); + Offset += (*DbgDevInfoLen); } } -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'