android_kernel_oneplus_msm8998/drivers/usb/pd
Jack Pham bc4f3590a7 usb: pd: avoid out-of-bounds access when reading PDOs
Most often a source will send fewer than the maximum number
of PDOs (7). Since the rx_msg buffer is now allocated up to
the size of the actual data, honor the rx_msg->data_len when
copying to pd->received_pdos rather than always 28 bytes.
This fixes out-of-bounds read access as reported by KASAN.

Change-Id: I5f98f7ccba027c1ab436ccf6fc822e2a319bafa1
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2018-01-17 18:04:52 -08:00
..
Kconfig usb: pd: Support Android dual_role_usb sysfs class 2016-11-23 10:42:06 -08:00
Makefile
policy_engine.c usb: pd: avoid out-of-bounds access when reading PDOs 2018-01-17 18:04:52 -08:00
qpnp-pdphy.c usb: pd: ensure source hard reset is handled timely 2018-01-17 17:56:22 -08:00
usbpd.h usb: pd: simplify pd_phy_write() and pd_phy_signal() usage 2017-08-07 16:18:48 -07:00