GHSA-X9F3-2M7G-3259

Vulnerability from github – Published: 2026-11-20 06:32 – Updated: 2026-11-20 06:32
VLAI
Details

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

mm/gup: check folio->mapping under folio lock in memfd_pin_folios()

memfd_pin_folios() pins folios from the page cache without taking the folio lock. khugepaged or MADV_COLLAPSE can therefore replace a folio after checking its refcount while memfd_pin_folios() still pins the old folio. The caller then receives a folio which is no longer part of the memfd.

For udmabuf and iommufd, this can cause data corruption: DMA accesses the detached folio rather than the live memfd contents. DMA reads can return stale data, while DMA writes update the detached copy and are lost from the live memfd. The detached folio remains pinned, so these accesses do not constitute a use-after-free or target another application's memory. For memfd live update, the stale contents can reappear in the memfd after handover.

Lock the folio and recheck folio->mapping before pinning it, like other page cache users do. If the folio was removed, retry the folio lookup from the index that was removed.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-99642"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-20T06:17:57Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/gup: check folio-\u003emapping under folio lock in memfd_pin_folios()\n\nmemfd_pin_folios() pins folios from the page cache without taking the\nfolio lock. khugepaged or MADV_COLLAPSE can therefore replace a folio\nafter checking its refcount while memfd_pin_folios() still pins the old\nfolio. The caller then receives a folio which is no longer part of the\nmemfd.\n\nFor udmabuf and iommufd, this can cause data corruption: DMA accesses\nthe detached folio rather than the live memfd contents. DMA reads can\nreturn stale data, while DMA writes update the detached copy and are\nlost from the live memfd. The detached folio remains pinned, so these\naccesses do not constitute a use-after-free or target another\napplication\u0027s memory. For memfd live update, the stale contents can\nreappear in the memfd after handover.\n\nLock the folio and recheck folio-\u003emapping before pinning it, like other\npage cache users do. If the folio was removed, retry the folio lookup\nfrom the index that was removed.",
  "id": "GHSA-x9f3-2m7g-3259",
  "modified": "2026-11-20T06:32:05Z",
  "published": "2026-11-20T06:32:05Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99642"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/240bc9b873d3522672db13ea93ec73b7f0461912"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/4480eb27975b91a28bc058a2ca16f466ebd9d7cd"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/6ac69b444b85d0e511d9bc15f586ebeed49322fa"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/71555ae8c7572fd99158013ca2e29187c5d2508d"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

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.

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.


Loading…