CVE-2026-138843
publishedusb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM response
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 24376aa9ad111077bd018796ba22848db52db920 · 170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 9b73d02a9d5d56efa4528622370db1e364628b24 · 170a6726d0e266f2c8f306e3d61715c32f4ee41e to < b46052b769919a02b1be360a93ff9379b1a5fd49 · 170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 906bd29c833c0c21835da69044b85b9dce723f80 · 170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60 · 170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 5d254d1e59da5b4bb05025924220faabb255b48f · 170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 8e3cb6de2c5108cad19541055b60fc4400f97dde · 170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 02ee864e8d2142c5648998944c3306ea6a763c26 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.6 (affected) · 0 to < 5.6 (unaffected · semver) · 5.10.275 through 5.10.* (unaffected · semver) · 5.15.226 through 5.15.* (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.118 through 6.12.* (unaffected · semver) · 6.18.63 through 6.18.* (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
Description
In 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 24376aa9ad111077bd018796ba22848db52db920 (affected · git)170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 9b73d02a9d5d56efa4528622370db1e364628b24 (affected · git)170a6726d0e266f2c8f306e3d61715c32f4ee41e to < b46052b769919a02b1be360a93ff9379b1a5fd49 (affected · git)170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 906bd29c833c0c21835da69044b85b9dce723f80 (affected · git)170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60 (affected · git)170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 5d254d1e59da5b4bb05025924220faabb255b48f (affected · git)170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 8e3cb6de2c5108cad19541055b60fc4400f97dde (affected · git)170a6726d0e266f2c8f306e3d61715c32f4ee41e to < 02ee864e8d2142c5648998944c3306ea6a763c26 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.6 (affected)0 to < 5.6 (unaffected · semver)5.10.275 through 5.10.* (unaffected · semver)5.15.226 through 5.15.* (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.118 through 6.12.* (unaffected · semver)6.18.63 through 6.18.* (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
8- https://git.kernel.org/stable/c/02ee864e8d2142c5648998944c3306ea6a763c26
- https://git.kernel.org/stable/c/24376aa9ad111077bd018796ba22848db52db920
- https://git.kernel.org/stable/c/5d254d1e59da5b4bb05025924220faabb255b48f
- https://git.kernel.org/stable/c/7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60
- https://git.kernel.org/stable/c/8e3cb6de2c5108cad19541055b60fc4400f97dde
- https://git.kernel.org/stable/c/906bd29c833c0c21835da69044b85b9dce723f80
- https://git.kernel.org/stable/c/9b73d02a9d5d56efa4528622370db1e364628b24
- https://git.kernel.org/stable/c/b46052b769919a02b1be360a93ff9379b1a5fd49
Provider assertions
1Linux · cna
usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM response
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 13ca74e53e11337832e94f09685ae5a1982dd443ad06d519d5bdd1d4e235d442
- Ingested
- 30 Nov 2026, 13:30:06 UTC
- Source record
- Official CVE record