Re: [PATCH v4] platform/chrome: lightbar: Limit payload to max packet size
Tzung-Bi Shih <[email protected]> Fri, 31 Jul 2026 02:24:35 +0000
| Newsgroups | dev.linux.lists.chrome-platform |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jul 30, 2026 at 01:42:40PM -0700, Alexis Savery wrote:
> The LIGHTBAR_CMD_SET_PROGRAM_EX command encapsulates its payload data
> with an 8-bit size field `uint8_t size` and is natively capped by the V3
> packet bounds limit array `EC_LPC_HOST_PACKET_SIZE`. However, the driver
> currently allows the payload chunk to bypass this protocol limit if the
> SPI transmission layer negotiates a larger physical `max_request`.
>
> When this occurs, large payloads (e.g., >255 bytes) integer wrap the
> 8-bit size variable when assigning `param->set_program_ex.size`, causing
> truncation and parse failures downstream in the EC firmware stack.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
[1/1] platform/chrome: lightbar: Limit payload to max packet size
commit: ed1d1f519c56c6c2ffa13f3d52cd77beb023db13
Thanks!