GHSA-XP23-237Q-8V2C

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

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

mm/list_lru: don't copy stale shrinker id from non-memcg-aware shrinkers

With cgroup.memory=nokmem, shrinker_memcg_alloc() fails with -ENOSYS for shrinkers without SHRINKER_NONSLAB, and shrinker_alloc() falls back to a non-memcg-aware shrinker. On this fallback path, shrinker->id is never assigned and keeps 0 from kzalloc(), which is a valid id belonging to whichever memcg-aware shrinker registers first.

__list_lru_init() copies shrinker->id unconditionally, so every list_lru backed by such a fallback shrinker (thp-deferred_split, zswap-shrinker, workingset shadow nodes, superblock lrus, ...) ends up with lru->shrinker_id == 0 instead of -1.

Under nokmem the list_lru collapses to the shared per-node lists, but __list_lru_add() still calls set_shrinker_bit() against the memcg of the added object. Most list_lru users are unaffected because their objects resolve to a NULL memcg without kmem accounting, but the THP deferred split queue holds user folios, which are charged regardless of nokmem. On a system where no SHRINKER_NONSLAB shrinker registers, shrinker_nr_max stays 0 and every memcg's shrinker_info has map_nr_max == 0, so the first folio added by khugepaged triggers on every boot:

WARNING: mm/shrinker.c:212 at set_shrinker_bit+0x99/0xa0

On systems where a SHRINKER_NONSLAB shrinker (btrfs, xfs) did register and expand the maps, there is no warning; instead bit 0 is set spuriously for an unrelated shrinker.

shrinker->id is only meaningful while SHRINKER_MEMCG_AWARE is set, and all readers inside mm/shrinker.c already check the flag before using the id. Make __list_lru_init() do the same and fall back to -1, so set_shrinker_bit() is never reached with a bogus id. The stale shrinker->id itself is left as is; cleaning that up is a separate topic.

Verified on a machine booting with cgroup.memory=nokmem and CONFIG_TRANSPARENT_HUGEPAGE=y: the warning fires once per boot from khugepaged, disappears when nokmem is removed from the command line, and no longer triggers with this fix applied and nokmem set.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-142845"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-12-03T04:18:21Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/list_lru: don\u0027t copy stale shrinker id from non-memcg-aware shrinkers\n\nWith cgroup.memory=nokmem, shrinker_memcg_alloc() fails with -ENOSYS for\nshrinkers without SHRINKER_NONSLAB, and shrinker_alloc() falls back to a\nnon-memcg-aware shrinker.  On this fallback path, shrinker-\u003eid is never\nassigned and keeps 0 from kzalloc(), which is a valid id belonging to\nwhichever memcg-aware shrinker registers first.\n\n__list_lru_init() copies shrinker-\u003eid unconditionally, so every list_lru\nbacked by such a fallback shrinker (thp-deferred_split, zswap-shrinker,\nworkingset shadow nodes, superblock lrus, ...) ends up with\nlru-\u003eshrinker_id == 0 instead of -1.\n\nUnder nokmem the list_lru collapses to the shared per-node lists, but\n__list_lru_add() still calls set_shrinker_bit() against the memcg of\nthe added object.  Most list_lru users are unaffected because their\nobjects resolve to a NULL memcg without kmem accounting, but the THP\ndeferred split queue holds user folios, which are charged regardless of\nnokmem.  On a system where no SHRINKER_NONSLAB shrinker registers,\nshrinker_nr_max stays 0 and every memcg\u0027s shrinker_info has map_nr_max\n== 0, so the first folio added by khugepaged triggers on every boot:\n\n  WARNING: mm/shrinker.c:212 at set_shrinker_bit+0x99/0xa0\n\nOn systems where a SHRINKER_NONSLAB shrinker (btrfs, xfs) did register and\nexpand the maps, there is no warning; instead bit 0 is set spuriously for\nan unrelated shrinker.\n\nshrinker-\u003eid is only meaningful while SHRINKER_MEMCG_AWARE is set, and all\nreaders inside mm/shrinker.c already check the flag before using the id. \nMake __list_lru_init() do the same and fall back to -1, so\nset_shrinker_bit() is never reached with a bogus id.  The stale\nshrinker-\u003eid itself is left as is; cleaning that up is a separate topic.\n\nVerified on a machine booting with cgroup.memory=nokmem and\nCONFIG_TRANSPARENT_HUGEPAGE=y: the warning fires once per boot from\nkhugepaged, disappears when nokmem is removed from the command line, and\nno longer triggers with this fix applied and nokmem set.",
  "id": "GHSA-xp23-237q-8v2c",
  "modified": "2026-12-03T06:30:35Z",
  "published": "2026-12-03T06:30:35Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-142845"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/6a100811c7c5fa39d452ff2e380bd14efbc0208e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/83584cc1f14d9102b612529fd26182f050f2cfad"
    }
  ],
  "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.