FKIE_CVE-2026-139657

Vulnerability from fkie_nvd - Published: 2026-11-30 14:19 - Updated: 2026-12-01 06:17
Summary
In the Linux kernel, the following vulnerability has been resolved: mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked() The !CONFIG_MMU implementation of __get_user_pages_locked() takes a bare get_page() reference for each page regardless of foll_flags: if (pages[i]) get_page(pages[i]); This is reached from pin_user_pages*() with FOLL_PIN set. unpin_user_page() is shared between MMU and NOMMU configurations and unconditionally calls gup_put_folio(..., FOLL_PIN), which subtracts GUP_PIN_COUNTING_BIAS (1024) from the folio refcount. This means that pin adds 1, and then unpin will subtract 1024. If a user maps a page (refcount 1), registers it 1023 times as an io_uring fixed buffer (1023 pin_user_pages calls -> refcount 1024), then unregisters: the first unpin_user_page subtracts 1024, refcount hits 0, the page is freed and returned to the buddy allocator. The remaining 1022 unpins write into whatever was reallocated, and the user's VMA still maps the freed page (NOMMU has no MMU to invalidate it). Reallocating the page for an io_uring pbuf_ring then lets userspace corrupt the new owner's data through the stale mapping. Use try_grab_folio() which adds GUP_PIN_COUNTING_BIAS for FOLL_PIN and 1 for FOLL_GET, mirroring the CONFIG_MMU path so pin and unpin are symmetric. Keep supporting the traditional behavior where users specify a pages array but don't set FOLL_GET. While at it, don't return NULL pointers in the page array, as this is really not expected for GUP users; instead, just fail and return -EFAULT. [ david: support traditional behavior with no FOLL_GET, extend description ]
Impacted products
Vendor Product Version

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "mm/gup.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "d557cd126601a73a8756b0b18e1aadfb702df67b",
              "status": "affected",
              "version": "3faa52c03f440d1b9ddef18c4f189f4790d52d7e",
              "versionType": "git"
            },
            {
              "lessThan": "47f5b21856845382e6e0f4b74e6f93165e1f49bc",
              "status": "affected",
              "version": "3faa52c03f440d1b9ddef18c4f189f4790d52d7e",
              "versionType": "git"
            },
            {
              "lessThan": "4dc46f3c9a44bd1a6ab41d7626abb0992283afb4",
              "status": "affected",
              "version": "3faa52c03f440d1b9ddef18c4f189f4790d52d7e",
              "versionType": "git"
            },
            {
              "lessThan": "da01399b90a73cd00b502f7903fa5acbfac4a103",
              "status": "affected",
              "version": "3faa52c03f440d1b9ddef18c4f189f4790d52d7e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "mm/gup.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.7"
            },
            {
              "lessThan": "5.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.120",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.65",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked()\n\nThe !CONFIG_MMU implementation of __get_user_pages_locked() takes a bare\nget_page() reference for each page regardless of foll_flags:\n\tif (pages[i])\n\t\tget_page(pages[i]);\n\nThis is reached from pin_user_pages*() with FOLL_PIN set.\nunpin_user_page() is shared between MMU and NOMMU configurations and\nunconditionally calls gup_put_folio(..., FOLL_PIN), which subtracts\nGUP_PIN_COUNTING_BIAS (1024) from the folio refcount.\n\nThis means that pin adds 1, and then unpin will subtract 1024.\n\nIf a user maps a page (refcount 1), registers it 1023 times as an\nio_uring fixed buffer (1023 pin_user_pages calls -\u003e refcount 1024), then\nunregisters: the first unpin_user_page subtracts 1024, refcount hits 0,\nthe page is freed and returned to the buddy allocator.  The remaining\n1022 unpins write into whatever was reallocated, and the user\u0027s VMA\nstill maps the freed page (NOMMU has no MMU to invalidate it).\nReallocating the page for an io_uring pbuf_ring then lets userspace\ncorrupt the new owner\u0027s data through the stale mapping.\n\nUse try_grab_folio() which adds GUP_PIN_COUNTING_BIAS for FOLL_PIN and 1\nfor FOLL_GET, mirroring the CONFIG_MMU path so pin and unpin are\nsymmetric. Keep supporting the traditional behavior where users specify\na pages array but don\u0027t set FOLL_GET.\n\nWhile at it, don\u0027t return NULL pointers in the page array,\nas this is really not expected for GUP users; instead, just fail and return\n-EFAULT.\n\n[ david: support traditional behavior with no FOLL_GET, extend\n  description ]"
    }
  ],
  "id": "CVE-2026-139657",
  "lastModified": "2026-12-01T06:17:47.293",
  "metrics": {
    "cvssMetricV31": [
      {
        "cvssData": {
          "attackComplexity": "LOW",
          "attackVector": "LOCAL",
          "availabilityImpact": "HIGH",
          "baseScore": 7.8,
          "baseSeverity": "HIGH",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "privilegesRequired": "LOW",
          "scope": "UNCHANGED",
          "userInteraction": "NONE",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
          "version": "3.1"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 5.9,
        "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "type": "Secondary"
      }
    ]
  },
  "published": "2026-11-30T14:19:49.613",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/47f5b21856845382e6e0f4b74e6f93165e1f49bc"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/4dc46f3c9a44bd1a6ab41d7626abb0992283afb4"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/d557cd126601a73a8756b0b18e1aadfb702df67b"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/da01399b90a73cd00b502f7903fa5acbfac4a103"
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "vulnStatus": "Received"
}



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.