GHSA-7FHM-W9PP-H3HQ

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-12-01 06:31
VLAI
Details

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

misc: fastrpc: fix double-free in fastrpc_map_attach() error path

map->table is assigned right after dma_buf_map_attachment_unlocked() succeeds. The two failure checks that follow, the len > map->size test and, where subsystem VMIDs are configured, a failed qcom_scm_assign_mem(), jump to map_err with map->table already set.

map_err manually calls dma_buf_detach() and dma_buf_put() and then falls through to fastrpc_map_put(). Since that change the error path tail is fastrpc_map_put() -> fastrpc_free_map(), and fastrpc_free_map() already unmaps, detaches and puts the dma-buf whenever map->table is set. The two operations therefore run twice: the second dma_buf_put() drops an extra reference on map->buf, and dma_buf_unmap_attachment_unlocked() dereferences the map->attach already freed by the manual dma_buf_detach(). kref_init() sets the refcount to 1 with no intervening get, so the final fastrpc_map_put() frees the map synchronously and the redundant cleanup is deterministic.

The len > map->size branch is reachable by an unprivileged process via FASTRPC_IOCTL_MEM_MAP with an fd whose dma-buf is smaller than the requested length, before any DSP invocation.

Route both map->table-is-set failure branches to get_err instead of map_err, so fastrpc_free_map() is the single owner of the unmap/detach/put sequence. map_err is retained for the dma_buf_map_attachment_unlocked() failure, which is reached with map->table still NULL and an attachment that fastrpc_free_map() will not clean up, so its dma_buf_detach()/dma_buf_put() must still run manually.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-138850"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:17:40Z",
    "severity": "HIGH"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmisc: fastrpc: fix double-free in fastrpc_map_attach() error path\n\nmap-\u003etable is assigned right after dma_buf_map_attachment_unlocked()\nsucceeds. The two failure checks that follow, the len \u003e map-\u003esize test\nand, where subsystem VMIDs are configured, a failed qcom_scm_assign_mem(),\njump to map_err with map-\u003etable already set.\n\nmap_err manually calls dma_buf_detach() and dma_buf_put() and then falls\nthrough to fastrpc_map_put(). Since that change the error path tail is\nfastrpc_map_put() -\u003e fastrpc_free_map(), and fastrpc_free_map() already\nunmaps, detaches and puts the dma-buf whenever map-\u003etable is set.\nThe two operations therefore run twice: the second dma_buf_put() drops an\nextra reference on map-\u003ebuf, and dma_buf_unmap_attachment_unlocked()\ndereferences the map-\u003eattach already freed by the manual dma_buf_detach().\nkref_init() sets the refcount to 1 with no intervening get, so the final\nfastrpc_map_put() frees the map synchronously and the redundant cleanup is\ndeterministic.\n\nThe len \u003e map-\u003esize branch is reachable by an unprivileged process via\nFASTRPC_IOCTL_MEM_MAP with an fd whose dma-buf is smaller than the\nrequested length, before any DSP invocation.\n\nRoute both map-\u003etable-is-set failure branches to get_err instead of\nmap_err, so fastrpc_free_map() is the single owner of the\nunmap/detach/put sequence. map_err is retained for the\ndma_buf_map_attachment_unlocked() failure, which is reached with\nmap-\u003etable still NULL and an attachment that fastrpc_free_map() will not\nclean up, so its dma_buf_detach()/dma_buf_put() must still run manually.",
  "id": "GHSA-7fhm-w9pp-h3hq",
  "modified": "2026-12-01T06:31:13Z",
  "published": "2026-11-30T15:32:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138850"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/09fa66ec1b4896ab841da085ca58b6433f28f07f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0bde6e438035a3bb80ba4f735b8c61a68001f8aa"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/3a05f8579fc0a3d04e1e9de766630a722d7ca6b6"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/51731e49fe9a7359d4dd17e77189a21b29115233"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/5ba8a7ebd96d2e271905348e8aed19fe726e3648"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}



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.