]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/UsbBus: Fix out-of-bound read access to descriptors
authorRuiyu Ni <ruiyu.ni@intel.com>
Thu, 27 Sep 2018 08:34:36 +0000 (16:34 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 17 Oct 2018 03:03:56 +0000 (11:03 +0800)
commit4c034bf62cbc1f3c5f4b5df25de97f0f528132b2
treeff253b3bfc33a6c4b340c38f3380853694e19a28
parent4f8b2f9d727d0035a2ca8d7371629418684bf80f
MdeModulePkg/UsbBus: Fix out-of-bound read access to descriptors

Today's implementation reads the Type/Length field in the USB
descriptors data without checking whether the offset to read is
beyond the data boundary.

The patch fixes this issue.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c