GHSA-GGFJ-R73J-JVQJ

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32
VLAI
Details

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.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-138843"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:17:39Z",
    "severity": null
  },
  "details": "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-\u003eupdated[] and sets uc-\u003ehas_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-\u003eorig[], and\nthen uses the linked_idx read from that entry as the translated index\ninto uc-\u003eupdated[]. 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-\u003eorig[cam].linked_idx reads over the end of\nuc-\u003eorig[]. The byte read from there is then used as the index for\nwriting cam into uc-\u003eupdated[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-\u003eupdated[] 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.",
  "id": "GHSA-ggfj-r73j-jvqj",
  "modified": "2026-11-30T15:32:06Z",
  "published": "2026-11-30T15:32:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138843"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/02ee864e8d2142c5648998944c3306ea6a763c26"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/24376aa9ad111077bd018796ba22848db52db920"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/5d254d1e59da5b4bb05025924220faabb255b48f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/7eae4d201b568ee3a6dc5f143b5f5ee9563c3d60"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/8e3cb6de2c5108cad19541055b60fc4400f97dde"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/906bd29c833c0c21835da69044b85b9dce723f80"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9b73d02a9d5d56efa4528622370db1e364628b24"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b46052b769919a02b1be360a93ff9379b1a5fd49"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.