diff options
| author | 2026-06-29 22:57:29 +0000 | |
|---|---|---|
| committer | 2026-07-08 14:10:41 +0200 | |
| commit | 227db98088756740645491fe29f8701c164badf6 (patch) | |
| tree | 8ec52e3caf41b2972434d444804c5c0694cca620 /scripts/Makefile.thinlto | |
| parent | usb: rust: Use pin_init::zeroed for usb_device_id initialization (diff) | |
usb: typec: tcpm: Defensively bound altmode array accesses
While svdm_consume_modes() already prevents mode_data.altmodes from
exceeding ALTMODE_DISCOVERY_MAX during SVDM discovery, defensively
bounding array iteration indices against ALTMODE_DISCOVERY_MAX in altmode
registration and unregistration helpers guarantees protection against
out-of-bounds accesses in the event of memory corruption.
Ensure that tcpm_register_plug_altmodes() is also bounded alongside
tcpm_register_partner_altmodes() and tcpm_unregister_altmodes.
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: RD Babiera <rdbabiera@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260629225729.2749896-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
