usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM response

Summary

CVECVE-2026-138843
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-30 14:17:39 UTC
Updated2026-11-30 14:17:39 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM response When the PPM reports more than one DisplayPort alternate mode for a connector, ucsi_ccg_update_altmodes() merges them into a single entry in uc->updated[] and sets uc->has_multiple_dp. In that case, ucsi_ccg_update_get_current_cam_cmd() rewrites the response of the GET_CURRENT_CAM command. The response is a single byte holding the index of the currently active alternate mode, and it is provided by the PPM firmware. The function uses this byte directly as an index into uc->orig[], and then uses the linked_idx read from that entry as the translated index into uc->updated[]. Both arrays have UCSI_MAX_ALTMODES entries, but neither index is checked against that size. If a malicious or buggy PPM reports a value of UCSI_MAX_ALTMODES or larger, e.g. 0xFF, uc->orig[cam].linked_idx reads over the end of uc->orig[]. The byte read from there is then used as the index for writing cam into uc->updated[new_cam].active_idx, so the out-of-bounds read is followed by an out-of-bounds write. This happens without any userspace action, since the UCSI core issues GET_CURRENT_CAM on its own when handling connector changes. Fix this by rejecting responses whose index is out of range, printing an error and returning -EPROTO, so that the caller cannot accept this. Also check linked_idx before using it as an index, so that the write into uc->updated[] is always within bounds. The response is now only processed when the command completed without an error. ucsi_sync_control_common() only reads the response when the CCI reports command completion, so otherwise the buffer is not filled and must not be mistaken for an invalid index. This bug was found with a Python script that traces where firmware input is used.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 24376aa9ad111077bd018796ba22848db52db920 git Not specified
CNA Linux Linux affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 9b73d02a9d5d56efa4528622370db1e364628b24 git Not specified
CNA Linux Linux affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e b46052b769919a02b1be360a93ff9379b1a5fd49 git Not specified
CNA Linux Linux affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 906bd29c833c0c21835da69044b85b9dce723f80 git Not specified
CNA Linux Linux affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60 git Not specified
CNA Linux Linux affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 5d254d1e59da5b4bb05025924220faabb255b48f git Not specified
CNA Linux Linux affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 8e3cb6de2c5108cad19541055b60fc4400f97dde git Not specified
CNA Linux Linux affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 02ee864e8d2142c5648998944c3306ea6a763c26 git Not specified
CNA Linux Linux affected 5.6 Not specified
CNA Linux Linux unaffected 5.6 semver Not specified
CNA Linux Linux unaffected 5.10.275 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.226 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.193 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.163 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.118 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.63 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.4 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc1 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/b46052b769919a02b1be360a93ff9379b1a5fd49 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/906bd29c833c0c21835da69044b85b9dce723f80 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/5d254d1e59da5b4bb05025924220faabb255b48f 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/02ee864e8d2142c5648998944c3306ea6a763c26 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/24376aa9ad111077bd018796ba22848db52db920 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/9b73d02a9d5d56efa4528622370db1e364628b24 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/8e3cb6de2c5108cad19541055b60fc4400f97dde 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report