From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.92.20.28]) by mx.groups.io with SMTP id smtpd.web11.370.1586383945907880963 for ; Wed, 08 Apr 2020 15:12:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=IMM1qJ8d; spf=pass (domain: outlook.com, ip: 40.92.20.28, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b2gOecXzLJtBCOFUeRHGjhkewMgJk8y1RkppMfRn2dF1UrWVncU4pmm2hQquMGEyCJXB1YK6uYPTNRv4LfZTlC09RPsBJiVQZolMlcprWMF3bMZIxDDAy3hho6o0335FKVSlGiJRfJ86beRviy/8dUR6s4MpbQfQxD/bD3oeErWPe+Xe2IXXsnyg0a5WKJ+nh6GpkeSQgIsAnIPqitlN7kshgbZNgWpYmq+tRXOdZkjAsg054u9CsvbxnW2BN+DPz/wpWUJvX7FCsnDKYEgA2yCQCJ7UC9GCVlHGnNbDoLHw129QfW0jTfy+gvXB20HSnxTKG//M+GlKoqvWHWf3Ig== 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=p7nMOrg+LDGs97SYLvD3K8/Zlq0wKTJTKRTGgjbJuo8=; b=cqGC4Q3BDAEhbMjA1r0/GQczA97yq1PMzeOqq/s8vTuGefzhK0FnsbSYENrgF5/qtcl0GByB4ivkAGUh2oVCwJjiMjEkqLqQZPyVNaRPf4xBTAMqM1Lkl0Wl0ZOIP0Mor9YzNbRDTfZTGRGksfmUP5dFrVDcRQVKliTTkkGOWS4zGSpAdJZZbUGwL9ryGUrkVngwFziJvbAS9mQG22/LGqX6xKa70mop0t5yK++Sak816EDcIqdesSRSDBVZv8Q8zL7+OJ89THsfHfWZ/qaTpkwFYfetx9ofApydUP4Uf7767dJfMW7hZIrhSS1JCPUK59WmiiQQ8dtJsOfwXKMnfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p7nMOrg+LDGs97SYLvD3K8/Zlq0wKTJTKRTGgjbJuo8=; b=IMM1qJ8d0M6dJFQ6pM6J1A7W3y2CIURBA8oMsCGaE6uf08DrzyM13G+LPCYu0EMQrTgDTdMIupMcDLcg5YGJmdbOnWJKHCXSjTtcXMIv+FAX55emy7ElenN8A0wNYB5EFIXBbChFiLkRAFw21d9ovOm3ZKC+A0cltjxR+G/0QLHdQDInGZsh2kC5glmP1qNFGZtUMIXLrhgd034pEXcZmYajAlwadYXc64iLIUBVzV1J8bdIsrGWMcRCrfxCV1Ugm+RjILJI/soBH6S3Em7syP5u+kE1WjeZgCPpZPe5D8UrMKftWInnWCtBHm6eziHrX6G+YgfPeB7KDdaSaJYu2w== Received: from DM6NAM11FT024.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::4e) by DM6NAM11HT021.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Wed, 8 Apr 2020 22:12:24 +0000 Received: from MWHPR07MB3440.namprd07.prod.outlook.com (2a01:111:e400:fc4d::42) by DM6NAM11FT024.mail.protection.outlook.com (2a01:111:e400:fc4d::159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15 via Frontend Transport; Wed, 8 Apr 2020 22:12:24 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:515EC7B0843FE6C5FA6055CBD90CBDB1F7C2F0BFEBD067C50F6E98D6C31753D8;UpperCasedChecksum:68FEA79637F232851E183B4EFBE6B76B1D9B3886602389F617B6A548BDAC2028;SizeAsReceived:7730;Count:47 Received: from MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::f5a7:e51b:e22a:959f]) by MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::f5a7:e51b:e22a:959f%7]) with mapi id 15.20.2878.022; Wed, 8 Apr 2020 22:12:24 +0000 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Dandan Bi , Hao A Wu , Jian J Wang , Kun Qin , Liming Gao Subject: [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Clear RSC Data buffer if Data is NULL Date: Wed, 8 Apr 2020 15:11:59 -0700 Message-ID: X-Mailer: git-send-email 2.16.3.windows.1 X-ClientProxiedBy: MWHPR18CA0047.namprd18.prod.outlook.com (2603:10b6:320:31::33) To MWHPR07MB3440.namprd07.prod.outlook.com (2603:10b6:301:69::28) Return-Path: michael.kubacki@outlook.com X-Microsoft-Original-Message-ID: <20200408221159.28176-1-michael.kubacki@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2001:4898:80e8:a:947a:4eba:b219:79f8) by MWHPR18CA0047.namprd18.prod.outlook.com (2603:10b6:320:31::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15 via Frontend Transport; Wed, 8 Apr 2020 22:12:24 +0000 X-Mailer: git-send-email 2.16.3.windows.1 X-Microsoft-Original-Message-ID: <20200408221159.28176-1-michael.kubacki@outlook.com> X-TMN: [wkeWa/Tclh3mS6ijCAfFxonDEbJDI064ZG/DvoFhXlvmoD4yuOupPFX4Tnks4TmD] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 97de7b8f-f3b7-47ad-1192-08d7dc09ea7f X-MS-TrafficTypeDiagnostic: DM6NAM11HT021: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wnvjfhw/MV7TjGV7N5q2X9uHe/kTNvLZs1Vc0+KHSdkA+3ODbaXDYdE+vY2TSEFdOAEpj6rB0OsZBMMnpQJYZpiTjlY6Iyd/KXyRq+QVEOJbLuEVzZrdU7KTLU5koTYiKyfoTOIeZOP0L7m+x3sl0j35YpCliL/DVsR7cunxqzu58NMDTnX1KABOf50qxmLOYjaszSWYbaNzp3wJKgYrK/H/p/j8znBZpoFIlhEvErQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR07MB3440.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: u9H8UK+Pv0mia4oHKuUs8rBSPvOcE+O6oEkX5P4z14Qd4JgKwOIHPP6iZAydATidlf43PlZ89UVow9r6nmnzp5Dco51sUqHlBjZVIQ+osf8p9hOosKJVK+v7z8au5WyIEcoTmH55wdz4Dst63n2Fx/vHVi5qh1tloFiyguonDKrngTL8iiTuY0Jj0gQ5f3PyEBcMH3RJcSuFm9laQ01TLg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97de7b8f-f3b7-47ad-1192-08d7dc09ea7f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 22:12:24.4893 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM11HT021 Content-Type: text/plain From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1969 ReportDispatcher() may be invoked with a NULL Data argument. When TPL is less than TPL_HIGH_LEVEL and Data is NULL, the EFI_STATUS_CODE_DATA structure inside RscData should be cleared so listeners will not receive data from a previous operation. Cc: Dandan Bi Cc: Hao A Wu Cc: Jian J Wang Cc: Kun Qin Cc: Liming Gao Signed-off-by: Michael Kubacki --- MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c index 6ca7e180ebb3..5df83027c62d 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c @@ -3,6 +3,7 @@ and Status Code Runtime Protocol. Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -307,6 +308,9 @@ ReportDispatcher ( } if (Data != NULL) { CopyMem (&RscData->Data, Data, Data->HeaderSize + Data->Size); + } else { + ZeroMem (&RscData->Data, sizeof (RscData->Data)); + RscData->Data.HeaderSize = sizeof (RscData->Data); } Status = gBS->SignalEvent (CallbackEntry->Event); -- 2.16.3.windows.1