platform/chrome: cros_ec_typec: Validate SVID and mode counts in discovery data
- CVE-2026-139548
- GHSA-r39m-j3x7-j6qx
- EUVD-2026-139254
Description
In the Linux kernel, the following vulnerability has been resolved: platform/chrome: cros_ec_typec: Validate SVID and mode counts in discovery data cros_typec_register_altmodes() iterates over sop_disc->svid_count and sop_disc->svids[i].mode_count from the EC_CMD_TYPEC_DISCOVERY response without validating their bounds. port->disc_data is allocated as a buffer of EC_PROTO2_MAX_RESPONSE_SIZE bytes, and each SVID entry contains a fixed mode_vdo[6] array. If the EC returns an out-of-bounds svid_count or mode_count, the loops read past the end of the mode_vdo array or the disc_data buffer. Validate that the discovery response with svid_count entries fits within EC_PROTO2_MAX_RESPONSE_SIZE using struct_size(), and ensure each SVID's mode_count does not exceed ARRAY_SIZE(sop_disc->svids[i].mode_vdo) before registering altmodes.
Text from the CVE.org record.
Recommendation
No source states a fixed version. Check the vendor advisory.
Affected
Linux
Affected versions Fixed in 5.11 none stated before 5.11: not affected none stated from 6.1.193 up to 6.1.*: not affected none stated from 6.6.163 up to 6.6.*: not affected none stated from 6.12.119 up to 6.12.*: not affected none stated from 6.18.65 up to 6.18.*: not affected none stated from 7.3.6 up to 7.3.*: not affected none stated from 7.4-rc1 onwards: not affected none stated
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.