* [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
@ 2018-09-25 21:57 Marcin Wojtas
2018-09-26 0:30 ` Zeng, Star
0 siblings, 1 reply; 5+ messages in thread
From: Marcin Wojtas @ 2018-09-25 21:57 UTC (permalink / raw)
To: edk2-devel
Cc: feng.tian, michael.d.kinney, liming.gao, leif.lindholm,
ard.biesheuvel, nadavh, mw, jsd, jaz, Ruiyu Ni, Fei1 Wang,
Star Zeng
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
2018-09-25 21:57 [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee Marcin Wojtas
@ 2018-09-26 0:30 ` Zeng, Star
2018-09-26 0:35 ` Zeng, Star
0 siblings, 1 reply; 5+ messages in thread
From: Zeng, Star @ 2018-09-26 0:30 UTC (permalink / raw)
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
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
2018-09-26 0:30 ` Zeng, Star
@ 2018-09-26 0:35 ` Zeng, Star
2018-09-26 8:01 ` Ard Biesheuvel
0 siblings, 1 reply; 5+ messages in thread
From: Zeng, Star @ 2018-09-26 0:35 UTC (permalink / raw)
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
Just pushed it at e5cd809087e5710e019d2766fab13c59a2e2ac28.
Really thanks.
Star
-----Original Message-----
From: Zeng, Star
Sent: Wednesday, September 26, 2018 8:30 AM
To: Marcin Wojtas <mw@semihalf.com>; 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; 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: RE: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
2018-09-26 0:35 ` Zeng, Star
@ 2018-09-26 8:01 ` Ard Biesheuvel
2018-09-26 9:59 ` Zeng, Star
0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2018-09-26 8:01 UTC (permalink / raw)
To: Zeng, Star
Cc: Marcin Wojtas, edk2-devel@lists.01.org, Tian, Feng,
Kinney, Michael D, Gao, Liming, Leif Lindholm, Nadav Haklai,
Jan Dąbroś, Grzegorz Jaszczyk, Ruiyu Ni, fei1.wang
On Wed, 26 Sep 2018 at 02:36, Zeng, Star <star.zeng@intel.com> wrote:
>
> Just pushed it at e5cd809087e5710e019d2766fab13c59a2e2ac28.
> Really thanks.
>
FYI this patch fixes the issue with my PCIe Renesas uPD70201 XHCI
controller as well.
> -----Original Message-----
> From: Zeng, Star
> Sent: Wednesday, September 26, 2018 8:30 AM
> To: Marcin Wojtas <mw@semihalf.com>; 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; 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: RE: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
>
> 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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
2018-09-26 8:01 ` Ard Biesheuvel
@ 2018-09-26 9:59 ` Zeng, Star
0 siblings, 0 replies; 5+ messages in thread
From: Zeng, Star @ 2018-09-26 9:59 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Ni, Ruiyu, Tian, Feng, Wang, Fei1, Grzegorz Jaszczyk,
edk2-devel@lists.01.org, Nadav Haklai, Gao, Liming,
Kinney, Michael D, Zeng, Star
Good news.
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard Biesheuvel
Sent: Wednesday, September 26, 2018 4:01 PM
To: Zeng, Star <star.zeng@intel.com>
Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Tian, Feng <feng.tian@intel.com>; Wang, Fei1 <fei1.wang@intel.com>; Grzegorz Jaszczyk <jaz@semihalf.com>; edk2-devel@lists.01.org; Nadav Haklai <nadavh@marvell.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: Re: [edk2] [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee
On Wed, 26 Sep 2018 at 02:36, Zeng, Star <star.zeng@intel.com> wrote:
>
> Just pushed it at e5cd809087e5710e019d2766fab13c59a2e2ac28.
> Really thanks.
>
FYI this patch fixes the issue with my PCIe Renesas uPD70201 XHCI controller as well.
> -----Original Message-----
> From: Zeng, Star
> Sent: Wednesday, September 26, 2018 8:30 AM
> To: Marcin Wojtas <mw@semihalf.com>; 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; 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: RE: [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory
> access in XhcSetHsee
>
> 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
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-09-26 10:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-25 21:57 [PATCH v2] MdeModulePkg: XhciDxe: Prevent illegal memory access in XhcSetHsee Marcin Wojtas
2018-09-26 0:30 ` Zeng, Star
2018-09-26 0:35 ` Zeng, Star
2018-09-26 8:01 ` Ard Biesheuvel
2018-09-26 9:59 ` Zeng, Star
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox