diff options
| author | Alexis Savery <asavery@google.com> | 2026-07-30 13:42:40 -0700 |
|---|---|---|
| committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2026-07-31 02:21:31 +0000 |
| commit | ed1d1f519c56c6c2ffa13f3d52cd77beb023db13 (patch) | |
| tree | e6074138b5f6db67917c9ffcf5ab47b7caaf440e /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | e5954d3031fb55dd31aa59bae477d63c68e941c0 (diff) | |
platform/chrome: lightbar: Limit payload to max packet size
The LIGHTBAR_CMD_SET_PROGRAM command uses an 8-bit size field for its
payload length, but the protocol-negotiated `max_request` may exceed
the maximum value an 8-bit integer can represent.
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.
Clamp `max_size` to the maximum value the structural size field can
support.
Fixes: 9600b8bdbfe4 ("platform/chrome: lightbar: Add support for large sequence")
Signed-off-by: Alexis Savery <asavery@google.com>
Link: https://lore.kernel.org/r/20260730204240.2227178-1-asavery@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
