From nobody Fri Dec 27 04:21:35 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1500617508514818.4860105103728; Thu, 20 Jul 2017 23:11:48 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E54DB21D147C1; Thu, 20 Jul 2017 23:09:48 -0700 (PDT) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-oln040092070082.outbound.protection.outlook.com [40.92.70.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1B5DE21CE749E for ; Thu, 20 Jul 2017 23:09:47 -0700 (PDT) Received: from AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com (10.152.16.55) by AM5EUR03HT208.eop-EUR03.prod.protection.outlook.com (10.152.16.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1240.9; Fri, 21 Jul 2017 06:11:37 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com (10.152.16.51) by AM5EUR03FT053.mail.protection.outlook.com (10.152.16.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.9 via Frontend Transport; Fri, 21 Jul 2017 06:11:38 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::ad7e:bc05:6bd8:2470]) by AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::ad7e:bc05:6bd8:2470%13]) with mapi id 15.01.1261.024; Fri, 21 Jul 2017 06:11:37 +0000 X-Original-To: edk2-devel@lists.01.org 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; bh=aOg9Sq9yFBpDH8IAH1sW+nH45q5IN+J+AzH0l/6XtGU=; b=FEw0eUNQ3gwfYcT2ZDkr5NIAcKcHDg5pGHJ9Np7Gkqe3TajIoFBVBZWJPS3d9WDtpnkkpIplussliL1cgFCIn0Ygfpzeey9/XZJSKJKLC11BVeSqrzn0YHUnhoEdtaOwFnO5GLI6y9si8HH7A3UDEdOIhHSIhjBcflhcuiOZKBx3hjZC7+9qrmtIvRO2unq1N4ix/xWdQJSB2DE8SgAMT7xpG4ZCpgkj7j4FX8tMkdpQjG74ZsqFsBt+euBWOfLdEhwZ1+iavDLfMJYTCcnI3x0TpcdXwb5geczXqUmNFt8X0KuIMSoKAejQbhRvphf9VZbKz5KhaqiM1ZuwVdCRAw== From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" Thread-Topic: [PATCH] QuarkSocPkg/QNCSmmDispatcher: Fix use after free issue #2 Thread-Index: AQHTAeg1Y1tBU15ZqkC99KszhPUwAA== Date: Fri, 21 Jul 2017 06:11:37 +0000 Message-ID: Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=outlook.com; x-incomingtopheadermarker: OriginalChecksum:BD7EF6E62A1C277083E44270E73CE1C7573B41FF4EDF8774E7B9EFBC78771169; UpperCasedChecksum:00E894A1E25F8E48BD7161A76EA65BAA6B0A3E70A84EE4A090D3F6471E842E8F; SizeAsReceived:7353; Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [u8PRbsdk0zi5lxH6ItOlMJvNcKH9tBnn] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM5EUR03HT208; 7:R8D6lRnYeM+78xo9eCY9OHXQHbL833j6LHwK0CE3SbRSjJ1r6ZhRQmOcRmVzIXrcXGOlEJsQzAQaGPont2qLDYZxt4eFhS0oCGn2V1BsBXyWjiHED2eobCJkRD9kHIXHgOZ5FcxWhofthGy/axLOoMM1qGoUzDXQbvOX62zFZiQgm+w34QYXrTMybh+AY2JvMS3ywF+Nq3FeIuqb43Y56wNcqf9KRedSJKmpvt2dOcWtJLan6u+nk032zrWAqHWEq1qe3Iz+l2PtmGIHoZYqv4Dtg9S/uu2SsXFFvfHz2UMbvBvAl6qDSAgnp4udPwMUfrkgug2iyfUeIn0abfu2gVlMH7TeRjlXe4gmyjM/HzYccVYrg0jGYp6bSRqk0rvzHSae9Ljx0r5/t581IM2gzWhLiDHoEM0QWZ67FFrhf3ew4V99cHQKLov2f0QwmhFpQvXaUf6EM+VAjhJlfOph6cso88UMLthHCXNxH5HRniQeJhGg5we3F1k6+J7B8+PhVPZTgaRHDE2yPE5A2qR/U+0QIAWfDG6sPjs1xJJDLIp4j8tOOvrd/hmzZbtWTnpJFlYE3cWChB1hNydYZfFCGROrl+DUbUV3y1uSmu6q3b3oY4E8wTHnxJSXX3yzVWWYWBqzE7O4qbS3Sx8Cfv52OeOuUaBk0mYdRf5pwXowq9JCiTKKXmvNzZchyQFdZZo5z62DP6taStAiHnfR9iJvckQvdvMaZoVJzSNWlmqybknUeYLvRZDT6z2iFmXxNgIAOGobCzuKuEv/+lUTjeibvQ== x-incomingheadercount: 44 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:AM5EUR03HT208; H:AM4PR06MB1491.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: 7b4505a4-a32b-49a6-09a1-08d4cfff5812 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322350)(1601125374)(1603101448)(1701031045)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:AM5EUR03HT208; x-ms-traffictypediagnostic: AM5EUR03HT208: x-exchange-antispam-report-test: UriScan:(189930954265078); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031); SRVR:AM5EUR03HT208; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5EUR03HT208; x-forefront-prvs: 0375972289 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2017 06:11:37.4770 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT208 Subject: [edk2] [PATCH] QuarkSocPkg/QNCSmmDispatcher: Fix use after free issue #2 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "michael.d.kinney@intel.com" Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" As part of commit 5f82e02, ActiveRecordInDb was introduced as a copy of RecordInDb as latter may be freed by the callback function. This commit replaces an access of RecordInDb after the callback function has been executed with an access to ActiveRecordInDb. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser Reviewed-by: Michael D Kinney --- QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCSmmCore.c | 2= +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCS= mmCore.c b/QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCSmm= Core.c index c2f75f86647a..29ad5f493466 100644 --- a/QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCSmmCore.c +++ b/QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCSmmCore.c @@ -758,7 +758,7 @@ QNCSmmCoreDispatcher ( } } =20 - if (RecordInDb->ClearSource =3D=3D NULL) { + if (ActiveRecordInDb.ClearSource =3D=3D NULL) { // // Clear the SMI associated w/ the source using the default fu= nction // --=20 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel