Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Star Zeng 72750e3bf9 MdeModulePkg UsbBusPei: Fix wrong buffer length used to read hub desc
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973

Bug 973 just mentions UsbBusDxe, but UsbBusPei has similar issue.

HUB descriptor has variable length.
But the code uses stack (HubDescriptor in PeiDoHubConfig) with fixed
length sizeof(EFI_USB_HUB_DESCRIPTOR) to hold HUB descriptor data.
It uses hard code length value (12) for SuperSpeed path.
And it uses HubDesc->Length for none SuperSpeed path, then there will
be stack overflow when HubDesc->Length is greater than
sizeof(EFI_USB_HUB_DESCRIPTOR).

The patch updates the code to use a big enough buffer to hold the
descriptor data.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Bret Barkelew <bret.barkelew@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
2018-06-27 12:38:52 +08:00
AppPkg AppPkg/WebServer: Fix build failure. 2017-09-14 08:55:09 +08:00
ArmPkg ArmPkg/ArmScmiDxe: Dynamically allocate buffer for protocol ids 2018-06-22 08:22:04 +02:00
ArmPlatformPkg ArmPlatformPkg: Include PL011UartClock Lib 2018-06-15 12:57:13 +02:00
ArmVirtPkg ArmVirtPkg: add QemuRamfbDxe 2018-06-14 11:56:46 +02:00
BaseTools BaseTools tools_def.template: Ignore link warning 4281 for VS2017 2018-06-25 11:16:10 +08:00
BeagleBoardPkg BeagleBoardPkg: drop unused PcdCacheEnabled dependency 2018-02-09 09:40:11 +00:00
Conf
CorebootModulePkg CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting 2018-06-11 16:16:30 +08:00
CorebootPayloadPkg CorebootPayloadPkg: Conditionally add DebugAgentLib for DXE drivers 2018-03-30 07:28:18 +08:00
CryptoPkg CryptoPkg PeiCryptLib: Enable SHA384/512 support 2018-06-08 10:55:53 +08:00
DuetPkg DuetPkg: Add SafeIntLib and BmpSupportLib to DSC files 2018-02-11 16:06:31 -08:00
EdkCompatibilityPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
EdkShellBinPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
EdkShellPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
EmbeddedPkg EmbeddedPkg/GdbSerialLib: avoid left shift of negative quantity 2018-06-19 00:05:26 +02:00
EmulatorPkg EmulatorPkg/SmbiosLib: Declare the correct library class. 2018-05-24 13:33:56 -07:00
FatBinPkg FatBinPkg: New EnhancedFatDxe binaries for IA32, X64, EBC and IPF 2017-12-22 09:40:18 +08:00
FatPkg FatPkg/FatPei: Add the recognition of recovery capsule on NVME device 2018-06-25 09:13:12 +08:00
IntelFrameworkModulePkg IntelFrameworkModulePkg: Remove X86 ASM and S files 2018-06-07 15:27:31 +08:00
IntelFrameworkPkg IntelFrameworkPkg UefiLib: Use comparison logic to check UINTN parameter 2018-06-12 09:23:12 +08:00
IntelFsp2Pkg IntelFsp2Pkg: SplitFspBin.py to support x64 drivers 2018-06-25 08:11:30 +08:00
IntelFsp2WrapperPkg IntelFsp2WrapperPkg: Update BaseFspWrapperApiLib to pass XCODE5 build 2018-01-18 15:39:54 +08:00
IntelFspPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelFspWrapperPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelSiliconPkg IntelSiliconPkg IntelVTdDxe: Fix incorrect code to clear VTd error 2018-06-06 12:46:43 +08:00
MdeModulePkg MdeModulePkg UsbBusPei: Fix wrong buffer length used to read hub desc 2018-06-27 12:38:52 +08:00
MdePkg MdePkg: TpmPtp: Add CapCRBIdleBypass definition 2018-06-27 09:31:01 +08:00
NetworkPkg MdeModulePkg/NetworkPkg: Checking for NULL pointer before use. 2018-06-21 08:49:47 +08:00
Nt32Pkg Nt32Pkg/WinNtBusDriverDxe: Fix memory allocation size 2018-06-27 08:58:56 +08:00
Omap35xxPkg Omap35xxPkg/InterruptDxe: replace CPU Arch Protocol depex with notify 2018-04-12 21:24:12 +02:00
OptionRomPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
OvmfPkg OvmfPkg: add QemuRamfb to platform console 2018-06-14 11:56:45 +02:00
PcAtChipsetPkg PcAtChipsetPkg/PcRtc: Add two new PCD for RTC Index/Target registers 2018-05-28 14:49:29 +08:00
QuarkPlatformPkg QuarkPlatformPkg/PlatformFlashAccessLib: Add progress API 2018-05-28 12:23:23 -07:00
QuarkSocPkg QuarkSocPkg/QNCSmmDispatcher: Fix use after free issue #2 2017-08-16 19:42:17 -07:00
SecurityPkg SecurityPkg: Tpm2DeviceLib: Enable CapCRBIdleBypass support 2018-06-27 09:31:01 +08:00
ShellBinPkg ShellBinPkg: Update ReadMe.txt 2018-03-19 14:39:02 +08:00
ShellPkg ShellPkg/dp: Update dp tool to parse new Perf record 2018-06-26 15:36:55 +08:00
SignedCapsulePkg SignedCapsulePkg/SystemFirmwareUpdateDxe: Fix ECC issues 2018-06-21 09:45:27 +08:00
SourceLevelDebugPkg SourceLevelDebugPkg/DebugCommunicationLibUsb: Add endpoint config. 2018-06-19 09:23:49 +08:00
StdLib StdLib/BsdSocketLib: Remove unused variables 2017-11-13 07:39:06 -08:00
StdLibPrivateInternalFiles edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
UefiCpuPkg UefiCpuPkg: Use new added Perf macros 2018-06-26 15:37:06 +08:00
UnixPkg
Vlv2DeviceRefCodePkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
Vlv2TbltDevicePkg Vlv2TbltDevicePkg: Set SMM Stack size to 16 KB 2018-06-24 16:18:36 -07:00
.gitignore edk2: Add .DS_Store to .gitignore for macOS 2017-05-19 15:14:34 -07:00
.gitmodules CryptoPkg: Adding OpenSSL as one submodule of EDKII repo 2018-01-18 14:06:15 +08:00
BuildNotes2.txt
Contributions.txt edk2: Fix typo in Contributions.txt 2017-08-16 17:50:44 +08:00
License.txt edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
Maintainers.txt Maintainers.txt: add Laszlo Ersek to stewards 2018-04-24 09:56:59 +01:00
Readme.md edk2: Add Readme.md to root of edk2 repository 2017-08-03 11:02:25 -07:00
StandaloneMmPkg Maintainers.txt: Add StandaloneMmPkg and maintainers 2018-03-21 01:13:40 +00:00
edksetup.bat BaseTools: suppress usage instructions with rebuild options 2017-07-04 10:16:13 +08:00
edksetup.sh BaseTools/edksetup.sh: fix invalid test for current working directory 2017-08-10 12:54:58 +08:00

Readme.md

EDK II Project

A modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org.

Contributions to the EDK II open source project are covered by the TianoCore Contribution Agreement 1.1

The majority of the content in the EDK II open source project uses a BSD 2-Clause License. The EDK II open source project contains the following components that are covered by additional licenses:

The EDK II Project is composed of packages. The maintainers for each package are listed in Maintainers.txt.

Resources