audk/MdeModulePkg/Bus/Usb
Ruiyu Ni 0dd6065520 MdeModulePkg/AbsPointer: Don't access key codes when length is wrong
Per USB HID spec, the buffer holding key codes should at least 3-byte
long.
Today's code assumes that the key codes buffer length is longer than
3-byte and unconditionally accesses the key codes buffer.
It's incorrect.
The patch fixes the issue by returning Device Error when the
length is less than 3-byte.

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>
Cc: Steven Shi <steven.shi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-10-17 11:04:02 +08:00
..
UsbBotPei MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
UsbBusDxe MdeModulePkg/UsbBus: Reject descriptor whose length is bad 2018-10-17 11:03:57 +08:00
UsbBusPei MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
UsbKbDxe MdeModulePkg/UsbKb: Don't access key codes when length is wrong 2018-10-17 11:04:01 +08:00
UsbMassStorageDxe MdeModulePkg/UsbMass: Fix integer overflow when BlockSize is 1 2018-10-17 11:03:55 +08:00
UsbMouseAbsolutePointerDxe MdeModulePkg/AbsPointer: Don't access key codes when length is wrong 2018-10-17 11:04:02 +08:00
UsbMouseDxe MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00