Skip to content
Heist/ feed
Unrated

memcg: avoid charging the root memcg from obj_cgroup_charge_pages()

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: memcg: avoid charging the root memcg from obj_cgroup_charge_pages() obj_cgroup_charge_pages() resolves the objcg to its memcg and calls try_charge_memcg(), which does not short circuit the root memcg. That memcg can be the root memcg: obj_cgroup_is_root() reflects the memcg the objcg was created for and is never updated, while memcg_reparent_objcgs() does redirect objcg->memcg to the parent on rmdir. An objcg of a dying child of root therefore passes every obj_cgroup_is_root() filter but resolves to the root memcg. Folios keep the objcg they were charged with, so this is easy to reach through zswap: allocate anon memory in a cgroup, move the task out, remove the cgroup, then write to the root cgroup's memory.reclaim. The reclaimed folios are charged through the reparented objcg and end up in refill_stock() with the root memcg: WARNING: mm/memcontrol.c:2198 at refill_stock+0x644/0x940 refill_stock+0x644/0x940 try_charge_memcg+0x12d6/0x1570 __obj_cgroup_charge+0x35/0xf0 obj_cgroup_charge+0x1de/0x210 obj_cgroup_charge_zswap+0x83/0x270 zswap_store+0x1620/0x2000 swap_writeout+0x94c/0x14c0 shrink_folio_list+0x3388/0x52b0 [...] try_to_free_mem_cgroup_pages+0x30d/0x830 user_proactive_reclaim+0x504/0x840 memory_reclaim+0x1f/0x30 Beyond the warning, the charge is asymmetric: obj_cgroup_uncharge_pages() skips refill_stock() for the root memcg, so the root's page counter grows and is never uncharged. It is not user visib

Announced Source revision 1
Original source ↗

CVE-2026-98414

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-98414

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "20d6c17252282c3af261d1cde8e34def1b2458c8",
        "lessThan": "d5cdff14c385bf42d03c0dd4c3e88ddf4c28b8a9",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "20d6c17252282c3af261d1cde8e34def1b2458c8",
        "lessThan": "ecc03877b1b05cb1e3a72175ccb868383eccc518",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "20d6c17252282c3af261d1cde8e34def1b2458c8",
        "lessThan": "6e673d0879ef78c395cfe0d3ba316690a60055d8",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "mm/memcontrol.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "6.15"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "6.15",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.18.54",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "7.2.8",
        "versionType": "semver",
        "lessThanOrEqual": "7.2.*"
      },
      {
        "status": "unaffected",
        "version": "7.3",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "mm/memcontrol.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-98414

Source reference: /cveMetadata/cveId

Publisher severity

No explicit severity was provided.

Event
#38479 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement