{"api_version":"1","generated_at":"2026-11-30T18:38:10+00:00","cve":"CVE-2026-138843","urls":{"html":"https://cve.report/CVE-2026-138843","api":"https://cve.report/api/cve/CVE-2026-138843.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138843","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138843"},"summary":{"title":"usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM response","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:39","updated_at":"2026-11-30 14:17:39"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/b46052b769919a02b1be360a93ff9379b1a5fd49","name":"https://git.kernel.org/stable/c/b46052b769919a02b1be360a93ff9379b1a5fd49","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/906bd29c833c0c21835da69044b85b9dce723f80","name":"https://git.kernel.org/stable/c/906bd29c833c0c21835da69044b85b9dce723f80","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5d254d1e59da5b4bb05025924220faabb255b48f","name":"https://git.kernel.org/stable/c/5d254d1e59da5b4bb05025924220faabb255b48f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60","name":"https://git.kernel.org/stable/c/7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/02ee864e8d2142c5648998944c3306ea6a763c26","name":"https://git.kernel.org/stable/c/02ee864e8d2142c5648998944c3306ea6a763c26","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/24376aa9ad111077bd018796ba22848db52db920","name":"https://git.kernel.org/stable/c/24376aa9ad111077bd018796ba22848db52db920","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9b73d02a9d5d56efa4528622370db1e364628b24","name":"https://git.kernel.org/stable/c/9b73d02a9d5d56efa4528622370db1e364628b24","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/8e3cb6de2c5108cad19541055b60fc4400f97dde","name":"https://git.kernel.org/stable/c/8e3cb6de2c5108cad19541055b60fc4400f97dde","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138843","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138843","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 24376aa9ad111077bd018796ba22848db52db920 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 9b73d02a9d5d56efa4528622370db1e364628b24 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e b46052b769919a02b1be360a93ff9379b1a5fd49 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 906bd29c833c0c21835da69044b85b9dce723f80 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 5d254d1e59da5b4bb05025924220faabb255b48f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 8e3cb6de2c5108cad19541055b60fc4400f97dde git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 170a6726d0e266f2c8f306e3d61715c32f4ee41e 02ee864e8d2142c5648998944c3306ea6a763c26 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.6","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.6 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.118 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/usb/typec/ucsi/ucsi_ccg.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"24376aa9ad111077bd018796ba22848db52db920","status":"affected","version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","versionType":"git"},{"lessThan":"9b73d02a9d5d56efa4528622370db1e364628b24","status":"affected","version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","versionType":"git"},{"lessThan":"b46052b769919a02b1be360a93ff9379b1a5fd49","status":"affected","version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","versionType":"git"},{"lessThan":"906bd29c833c0c21835da69044b85b9dce723f80","status":"affected","version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","versionType":"git"},{"lessThan":"7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60","status":"affected","version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","versionType":"git"},{"lessThan":"5d254d1e59da5b4bb05025924220faabb255b48f","status":"affected","version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","versionType":"git"},{"lessThan":"8e3cb6de2c5108cad19541055b60fc4400f97dde","status":"affected","version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","versionType":"git"},{"lessThan":"02ee864e8d2142c5648998944c3306ea6a763c26","status":"affected","version":"170a6726d0e266f2c8f306e3d61715c32f4ee41e","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/usb/typec/ucsi/ucsi_ccg.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.6"},{"lessThan":"5.6","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.118","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"5.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"5.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"5.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"5.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.118","versionStartIncluding":"5.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"5.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"5.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"5.6","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:25:30.059Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138843","datePublished":"2026-11-30T13:25:30.059Z","dateReserved":"2026-11-30T13:22:15.898Z","dateUpdated":"2026-11-30T13:25:30.059Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:39","lastModifiedDate":"2026-11-30 14:17:39","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138843","Ordinal":"1","Title":"usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM","CVE":"CVE-2026-138843","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138843","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM"}]}}}