Re: [PATCH v2] platform/chrome: cros_ec_typec: reject out-of-bounds PD cap count

From: Tzung-Bi Shih

Date: Sun Jun 28 2026 - 23:14:43 EST


On Thu, Jun 25, 2026 at 09:00:56PM +0800, Maoyi Xie wrote:
> cros_typec_register_partner_pdos() copies the partner PDOs from the EC
> TYPEC_STATUS response into the fixed caps_desc.pdo[PDO_MAX_OBJECTS] array.
>
> memcpy(caps_desc.pdo, resp->source_cap_pdos,
> sizeof(u32) * resp->source_cap_count);
> ...
> memcpy(caps_desc.pdo, resp->sink_cap_pdos,
> sizeof(u32) * resp->sink_cap_count);
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next

[1/1] platform/chrome: cros_ec_typec: reject out-of-bounds PD cap count
commit: a0a8cd9fc9c48b95095bcec4b146f7a99486f58e

Thanks!