Re: platform/chrome: cros_ec_typec: unbounded PD cap count in cros_typec_register_partner_pdos()
Tzung-Bi Shih <[email protected]>
| Newsgroups | dev.linux.lists.chrome-platform,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jun 24, 2026 at 03:00:48PM +0800, Maoyi Xie wrote: > > How did you reproduce the overflow? Was this by modifying the EC firmware > > to send larger counts, or can this be triggered by a non-compliant USB-C > > partner device? > > I did not modify the EC firmware and I did not have a real partner. I do > not have cros_ec hardware. I ran the same copy in a small standalone test, > a u32 pdo[7] on the stack with a count above 7, and it tripped the stack > protector. So this is a source review plus that test, not a hardware repro. > > I also cannot confirm that a non-compliant partner can push the count past > 7. That depends on whether the EC already caps it, which I cannot see. It > may well need buggy or compromised EC firmware. I assumed the partner path > in my mail and I should not have stated it so firmly. FWIW: the ChromeOS EC firmware caps the counts[1]. [1] https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/common/usb_pd_host_cmd_common.c#301