GHSA-287H-26XC-4M77

Vulnerability from github – Published: 2026-12-03 12:31 – Updated: 2026-12-03 12:31
VLAI
Details

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: u_serial: pin ports while TTYs are installed

A slab-use-after-free can occur when gserial_free_line() frees struct gs_port while it is still reachable through an installed TTY. The port->port.count value tracks successful opens, but it is zero before gs_open() and again after gs_close(), before TTY cleanup has finished. Teardown can therefore free gs_port while tty_init_dev() or release_tty() still accesses its tty_port.

Manage gs_port lifetime with tty_port references. Take a reference in gs_install(), drop it in gs_cleanup(), and move the final free to gs_port_destruct(). Unregister the TTY device before dropping the owner reference.

Keep each minor reserved until the old port is destroyed so an installed TTY for one generation cannot overlap a replacement at the same minor. Publish the new port before device registration so the cdev and add uevent never expose a TTY before gs_install() can pin it. Since commit 8df07fe93573 ("tty: fix saved termios reset race"), u_serial registration no longer frees saved termios. On registration failure, unpublish the port before dropping its owner reference.

Check in gs_open() that the installed port is still the published generation. Track failures after a successful install so close callbacks issued by the TTY core do not decrement port->port.count for opens that never incremented it.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-142984"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-12-03T10:17:22Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: u_serial: pin ports while TTYs are installed\n\nA slab-use-after-free can occur when gserial_free_line() frees struct\ngs_port while it is still reachable through an installed TTY. The\nport-\u003eport.count value tracks successful opens, but it is zero before\ngs_open() and again after gs_close(), before TTY cleanup has finished.\nTeardown can therefore free gs_port while tty_init_dev() or release_tty()\nstill accesses its tty_port.\n\nManage gs_port lifetime with tty_port references. Take a reference in\ngs_install(), drop it in gs_cleanup(), and move the final free to\ngs_port_destruct(). Unregister the TTY device before dropping the owner\nreference.\n\nKeep each minor reserved until the old port is destroyed so an installed\nTTY for one generation cannot overlap a replacement at the same minor.\nPublish the new port before device registration so the cdev and add uevent\nnever expose a TTY before gs_install() can pin it. Since commit\n8df07fe93573 (\"tty: fix saved termios reset race\"), u_serial registration\nno longer frees saved termios. On registration failure, unpublish the port\nbefore dropping its owner reference.\n\nCheck in gs_open() that the installed port is still the published\ngeneration. Track failures after a successful install so close callbacks\nissued by the TTY core do not decrement port-\u003eport.count for opens that\nnever incremented it.",
  "id": "GHSA-287h-26xc-4m77",
  "modified": "2026-12-03T12:31:01Z",
  "published": "2026-12-03T12:31:01Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-142984"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1981b53c2b52a00f0f4b9eb87183c9aedc8dac5d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c36bf20e3928fdd013098f61186338efc9c96a4a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e6a6b91739c1f81930457679d33d1f8be64aa81c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/f07b9d15d48ecec3a6d6a0b1d0af6f962e1cca0c"
    }
  ],
  "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.