FKIE_CVE-2026-99917

Vulnerability from fkie_nvd - Published: 2026-11-30 14:20 - Updated: 2026-11-30 14:20
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved: mm/swap: fix swap_cache_get_folio() returning a folio that left the swap cache swap_cache_get_folio() reads the folio from the swap table and takes a reference with folio_try_get(), without any lock. If the folio is removed from the swap cache and freed in between, and its memory gets reused, folio_try_get() still succeeds and we return a page that has nothing to do with the swap entry: CPU 0 CPU 1 do_swap_page() swap_cache_get_folio() swp_tb = swap_table_get() folio = swp_tb_to_folio(swp_tb) madvise(MADV_DONTNEED) zap_nonpresent_ptes() swap_put_entries_direct() swap_put_entries_cluster() __try_to_reclaim_swap() swap_cache_del_folio() folio_put() <- freed page reused, e.g. as an anon folio of another task folio_try_get(folio) <- succeeds return folio swap_update_readahead() <- may clear PG_readahead on it folio_lock_or_retry() <- locks it folio_matches_swap_entry() fails, unlock and put filemap_get_entry() does the same lockless lookup for the page cache, and after folio_try_get() it rechecks the xarray, because the folio may have been freed and reused in between. swap_cache_get_folio() lost that recheck when the swap cache moved to the swap table. So CPU 0 writes to a folio it doesn't own: it may clear PG_readahead and takes the folio lock of someone else's page, before folio_matches_swap_entry() finds out the folio is not ours. When the race occurs, a swap fault can acquire a reference to a physical page that has been freed and reused for an unrelated purpose, potentially by another process. The fault handler may then clear that page's PG_readahead/PG_reclaim flag, wait on or acquire its folio lock, and potentially attempt to remove it from an unrelated swap cache. These operations can interfere with unrelated workloads and may cause unexpected stalls and impaired reclaim. The subsequent swap-entry validation normally prevents the wrong folio from being mapped into the faulting process. It's documented that caller always double checks the folio so this part is harmless from the aspect of data corruption or crash. Recheck the slot after folio_try_get() and retry if it no longer holds this folio. [akpm@linux-foundation.org: add LLM-generated description of userspace impact]
Impacted products
Vendor Product Version

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "mm/swap_state.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "98e52d6946a95a28cc59605d97de364bdcd7691f",
              "status": "affected",
              "version": "8578e0c00dcf0c58fbc32d4904ecaf8e802a6590",
              "versionType": "git"
            },
            {
              "lessThan": "5368a82b7c4d0c9ea9486ae7706917589909dd0c",
              "status": "affected",
              "version": "8578e0c00dcf0c58fbc32d4904ecaf8e802a6590",
              "versionType": "git"
            },
            {
              "lessThan": "60f34fedf3a4c91ed631ed2f80713ab993cde5ee",
              "status": "affected",
              "version": "8578e0c00dcf0c58fbc32d4904ecaf8e802a6590",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "mm/swap_state.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.18"
            },
            {
              "lessThan": "6.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.63",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.4",
              "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/swap: fix swap_cache_get_folio() returning a folio that left the swap cache\n\nswap_cache_get_folio() reads the folio from the swap table and takes a\nreference with folio_try_get(), without any lock.  If the folio is removed\nfrom the swap cache and freed in between, and its memory gets reused,\nfolio_try_get() still succeeds and we return a page that has nothing to do\nwith the swap entry:\n\n  CPU 0                                  CPU 1\n  do_swap_page()\n    swap_cache_get_folio()\n      swp_tb = swap_table_get()\n      folio = swp_tb_to_folio(swp_tb)\n                                         madvise(MADV_DONTNEED)\n                                           zap_nonpresent_ptes()\n                                             swap_put_entries_direct()\n                                               swap_put_entries_cluster()\n                                                 __try_to_reclaim_swap()\n                                                   swap_cache_del_folio()\n                                                   folio_put()   \u003c- freed\n                                         page reused, e.g. as an anon\n                                         folio of another task\n      folio_try_get(folio)               \u003c- succeeds\n      return folio\n    swap_update_readahead()              \u003c- may clear PG_readahead on it\n    folio_lock_or_retry()                \u003c- locks it\n    folio_matches_swap_entry() fails, unlock and put\n\nfilemap_get_entry() does the same lockless lookup for the page cache, and\nafter folio_try_get() it rechecks the xarray, because the folio may have\nbeen freed and reused in between.  swap_cache_get_folio() lost that\nrecheck when the swap cache moved to the swap table.\n\nSo CPU 0 writes to a folio it doesn\u0027t own: it may clear PG_readahead and\ntakes the folio lock of someone else\u0027s page, before\nfolio_matches_swap_entry() finds out the folio is not ours.\n\nWhen the race occurs, a swap fault can acquire a reference to a\nphysical page that has been freed and reused for an unrelated purpose,\npotentially by another process.  The fault handler may then clear that\npage\u0027s PG_readahead/PG_reclaim flag, wait on or acquire its folio lock,\nand potentially attempt to remove it from an unrelated swap cache.\n\nThese operations can interfere with unrelated workloads and may cause\nunexpected stalls and impaired reclaim.  The subsequent swap-entry\nvalidation normally prevents the wrong folio from being mapped into the\nfaulting process.\n\nIt\u0027s documented that caller always double checks the folio so this part\nis harmless from the aspect of data corruption or crash.\n\nRecheck the slot after folio_try_get() and retry if it no longer holds\nthis folio.\n\n[akpm@linux-foundation.org: add LLM-generated description of userspace impact]"
    }
  ],
  "id": "CVE-2026-99917",
  "lastModified": "2026-11-30T14:20:27.737",
  "metrics": {},
  "published": "2026-11-30T14:20:27.737",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/5368a82b7c4d0c9ea9486ae7706917589909dd0c"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/60f34fedf3a4c91ed631ed2f80713ab993cde5ee"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/98e52d6946a95a28cc59605d97de364bdcd7691f"
    }
  ],
  "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.