From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 49030211575D8 for ; Tue, 25 Sep 2018 17:36:54 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 17:36:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,304,1534834800"; d="scan'208";a="260244080" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 25 Sep 2018 17:35:26 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Sep 2018 17:35:22 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Sep 2018 17:35:22 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.140]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.245]) with mapi id 14.03.0319.002; Wed, 26 Sep 2018 08:35:20 +0800 From: "Zeng, Star" To: Marcin Wojtas , "edk2-devel@lists.01.org" CC: "Tian, Feng" , "Kinney, Michael D" , "Gao, Liming" , "leif.lindholm@linaro.org" , "ard.biesheuvel@linaro.org" , "nadavh@marvell.com" , "jsd@semihalf.com" , "jaz@semihalf.com" , "Ni, Ruiyu" , "Wang, Fei1" , "Zeng, Star" Thread-Topic: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee Thread-Index: AQHUVRrj3JZY/U1VX0q9DLGxaCLsk6UBtbhAgAABiEA= Date: Wed, 26 Sep 2018 00:35:20 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BBEF254@shsmsx102.ccr.corp.intel.com> References: <1537912671-20013-1-git-send-email-mw@semihalf.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BBEF22F@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BBEF22F@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2018 00:36:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Just pushed it at e5cd809087e5710e019d2766fab13c59a2e2ac28. Really thanks. Star -----Original Message----- From: Zeng, Star=20 Sent: Wednesday, September 26, 2018 8:30 AM To: Marcin Wojtas ; edk2-devel@lists.01.org Cc: Tian, Feng ; Kinney, Michael D ; Gao, Liming ; leif.lindholm@linaro.org; ar= d.biesheuvel@linaro.org; nadavh@marvell.com; jsd@semihalf.com; jaz@semihalf= .com; Ni, Ruiyu ; Wang, Fei1 ; Zen= g, Star Subject: RE: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory acces= s in XhcSetHsee Good observation. Reviewed-by: Star Zeng Thanks, Star -----Original Message----- From: Marcin Wojtas [mailto:mw@semihalf.com]=20 Sent: Wednesday, September 26, 2018 5:58 AM To: edk2-devel@lists.01.org Cc: Tian, Feng ; Kinney, Michael D ; Gao, Liming ; leif.lindholm@linaro.org; ar= d.biesheuvel@linaro.org; nadavh@marvell.com; mw@semihalf.com; jsd@semihalf.= com; jaz@semihalf.com; Ni, Ruiyu ; Wang, Fei1 ; Zeng, Star Subject: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in= XhcSetHsee REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1206 Newly added XhcSetHsee() routine reads 4 bytes into a UINT16 variable causi= ng issues on PCIE and NonDiscoverable Xhci controllers. Fix that. Cc: Ruiyu Ni Cc: Fei1 Wang Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c b/MdeModulePkg/Bus/Pci/= XhciDxe/XhciReg.c index 89f073e..3ed1a55 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciReg.c @@ -609,7 +609,7 @@ XhcSetHsee ( PciIo, EfiPciIoWidthUint16, PCI_COMMAND_OFFSET, - sizeof (XhciCmd), + sizeof (XhciCmd) / sizeof (UINT16), &XhciCmd ); if (!EFI_ERROR (Status)) { -- 2.7.4