From: "Zeng, Star" <star.zeng@intel.com>
To: Marcin Wojtas <mw@semihalf.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Tian, Feng" <feng.tian@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
"Gao, Liming" <liming.gao@intel.com>,
"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
"nadavh@marvell.com" <nadavh@marvell.com>,
"jsd@semihalf.com" <jsd@semihalf.com>,
"jaz@semihalf.com" <jaz@semihalf.com>,
"Ni, Ruiyu" <ruiyu.ni@intel.com>,
"Wang, Fei1" <fei1.wang@intel.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
Date: Wed, 26 Sep 2018 00:30:11 +0000 [thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BBEF22F@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1537912671-20013-1-git-send-email-mw@semihalf.com>
Good observation.
Reviewed-by: Star Zeng <star.zeng@intel.com>
Thanks,
Star
-----Original Message-----
From: Marcin Wojtas [mailto:mw@semihalf.com]
Sent: Wednesday, September 26, 2018 5:58 AM
To: edk2-devel@lists.01.org
Cc: Tian, Feng <feng.tian@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; leif.lindholm@linaro.org; ard.biesheuvel@linaro.org; nadavh@marvell.com; mw@semihalf.com; jsd@semihalf.com; jaz@semihalf.com; Ni, Ruiyu <ruiyu.ni@intel.com>; Wang, Fei1 <fei1.wang@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1206
Newly added XhcSetHsee() routine reads 4 bytes into a UINT16 variable causing issues on PCIE and NonDiscoverable Xhci controllers. Fix that.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Fei1 Wang <fei1.wang@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
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
next prev parent reply other threads:[~2018-09-26 0:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 21:57 [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee Marcin Wojtas
2018-09-26 0:30 ` Zeng, Star [this message]
2018-09-26 0:35 ` Zeng, Star
2018-09-26 8:01 ` Ard Biesheuvel
2018-09-26 9:59 ` Zeng, Star
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0C09AFA07DD0434D9E2A0C6AEB0483103BBEF22F@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox