{"id":"CVE-2026-138843","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:17:39.663","lastModified":"2026-11-30T14:17:39.663","vulnStatus":"Received","cveTags":[],"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":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/usb/typec/ucsi/ucsi_ccg.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"24376aa9ad111077bd018796ba22848db52db920","versionType":"git","status":"affected"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"9b73d02a9d5d56efa4528622370db1e364628b24","versionType":"git","status":"affected"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"b46052b769919a02b1be360a93ff9379b1a5fd49","versionType":"git","status":"affected"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"906bd29c833c0c21835da69044b85b9dce723f80","versionType":"git","status":"affected"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60","versionType":"git","status":"affected"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"5d254d1e59da5b4bb05025924220faabb255b48f","versionType":"git","status":"affected"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"8e3cb6de2c5108cad19541055b60fc4400f97dde","versionType":"git","status":"affected"},{"version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","lessThan":"02ee864e8d2142c5648998944c3306ea6a763c26","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/usb/typec/ucsi/ucsi_ccg.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"5.6","status":"affected"},{"version":"0","lessThan":"5.6","versionType":"semver","status":"unaffected"},{"version":"5.10.275","lessThanOrEqual":"5.10.*","versionType":"semver","status":"unaffected"},{"version":"5.15.226","lessThanOrEqual":"5.15.*","versionType":"semver","status":"unaffected"},{"version":"6.1.193","lessThanOrEqual":"6.1.*","versionType":"semver","status":"unaffected"},{"version":"6.6.163","lessThanOrEqual":"6.6.*","versionType":"semver","status":"unaffected"},{"version":"6.12.118","lessThanOrEqual":"6.12.*","versionType":"semver","status":"unaffected"},{"version":"6.18.63","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/02ee864e8d2142c5648998944c3306ea6a763c26","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/24376aa9ad111077bd018796ba22848db52db920","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/5d254d1e59da5b4bb05025924220faabb255b48f","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/8e3cb6de2c5108cad19541055b60fc4400f97dde","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/906bd29c833c0c21835da69044b85b9dce723f80","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/9b73d02a9d5d56efa4528622370db1e364628b24","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/b46052b769919a02b1be360a93ff9379b1a5fd49","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}