summaryrefslogtreecommitdiff
path: root/BaseTools/Scripts
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-06-25 16:50:01 +0800
committerStar Zeng <star.zeng@intel.com>2018-06-27 12:38:52 +0800
commit72750e3bf9174f15c17e78f0f117b5e7311bb49f (patch)
tree5cb4e6a73859559453bd57ca9e4ece58103156f5 /BaseTools/Scripts
parentacebdf14c985c5c9f50b37ece0b15ada87767359 (diff)
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>
Diffstat (limited to 'BaseTools/Scripts')
0 files changed, 0 insertions, 0 deletions