{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-138843","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.898Z","datePublished":"2026-11-30T13:25:30.059Z","dateUpdated":"2026-11-30T13:25:30.059Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-11-30T13:25:30.059Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nusb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM response\n\nWhen the PPM reports more than one DisplayPort alternate mode for a\nconnector, ucsi_ccg_update_altmodes() merges them into a single entry\nin uc->updated[] and sets uc->has_multiple_dp. In that case,\nucsi_ccg_update_get_current_cam_cmd() rewrites the response of the\nGET_CURRENT_CAM command. The response is a single byte holding the\nindex of the currently active alternate mode, and it is provided by\nthe PPM firmware.\n\nThe function uses this byte directly as an index into uc->orig[], and\nthen uses the linked_idx read from that entry as the translated index\ninto uc->updated[]. Both arrays have UCSI_MAX_ALTMODES entries, but\nneither index is checked against that size.\n\nIf a malicious or buggy PPM reports a value of UCSI_MAX_ALTMODES or\nlarger, e.g. 0xFF, uc->orig[cam].linked_idx reads over the end of\nuc->orig[]. The byte read from there is then used as the index for\nwriting cam into uc->updated[new_cam].active_idx, so the out-of-bounds\nread is followed by an out-of-bounds write. This happens without any\nuserspace action, since the UCSI core issues GET_CURRENT_CAM on its own\nwhen handling connector changes.\n\nFix this by rejecting responses whose index is out of range, printing an\nerror and returning -EPROTO, so that the caller cannot accept this.\nAlso check linked_idx before using it as an index, so that the write into\nuc->updated[] is always within bounds.\n\nThe response is now only processed when the command completed without\nan error. ucsi_sync_control_common() only reads the response when the\nCCI reports command completion, so otherwise the buffer is not filled\nand must not be mistaken for an invalid index.\n\nThis bug was found with a Python script that traces where firmware input\nis used."}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/usb/typec/ucsi/ucsi_ccg.c"],"versions":[{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"24376aa9ad111077bd018796ba22848db52db920","status":"affected","versionType":"git"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"9b73d02a9d5d56efa4528622370db1e364628b24","status":"affected","versionType":"git"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"b46052b769919a02b1be360a93ff9379b1a5fd49","status":"affected","versionType":"git"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"906bd29c833c0c21835da69044b85b9dce723f80","status":"affected","versionType":"git"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60","status":"affected","versionType":"git"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"5d254d1e59da5b4bb05025924220faabb255b48f","status":"affected","versionType":"git"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"8e3cb6de2c5108cad19541055b60fc4400f97dde","status":"affected","versionType":"git"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"02ee864e8d2142c5648998944c3306ea6a763c26","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/usb/typec/ucsi/ucsi_ccg.c"],"versions":[{"version":"5.6","status":"affected"},{"version":"0","lessThan":"5.6","status":"unaffected","versionType":"semver"},{"version":"5.10.275","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.226","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.118","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.63","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"5.10.275"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.12.118"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.18.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/24376aa9ad111077bd018796ba22848db52db920"},{"url":"https://git.kernel.org/stable/c/9b73d02a9d5d56efa4528622370db1e364628b24"},{"url":"https://git.kernel.org/stable/c/b46052b769919a02b1be360a93ff9379b1a5fd49"},{"url":"https://git.kernel.org/stable/c/906bd29c833c0c21835da69044b85b9dce723f80"},{"url":"https://git.kernel.org/stable/c/7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60"},{"url":"https://git.kernel.org/stable/c/5d254d1e59da5b4bb05025924220faabb255b48f"},{"url":"https://git.kernel.org/stable/c/8e3cb6de2c5108cad19541055b60fc4400f97dde"},{"url":"https://git.kernel.org/stable/c/02ee864e8d2142c5648998944c3306ea6a763c26"}],"title":"usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM response","x_generator":{"engine":"bippy-1.2.0"}}}}