CVE-2026-53162 (GCVE-0-2026-53162)
Vulnerability from cvelistv5
Published
2026-06-25 08:38
Modified
2026-08-05 12:33
Summary
In the Linux kernel, the following vulnerability has been resolved: memcg: use round-robin victim selection in refill_stock Harry Yoo reported that get_random_u32_below() is not safe to call in the nmi context and memcg charge draining can happen in nmi context. More specifically get_random_u32_below() is neither reentrant- nor NMI-safe: it acquires a per-cpu local_lock via local_lock_irqsave() on the batched_entropy_u32 state. An NMI that lands on a CPU mid-update of the ChaCha batch state and recurses into the random subsystem would corrupt that state. The memcg_stock local_trylock prevents re-entry on the percpu stock itself, but cannot protect an unrelated subsystem's per-cpu lock. Replace the random pick with a per-cpu round-robin counter stored in memcg_stock_pcp and serialized by the same local_trylock that already guards cached[] and nr_pages[]. No atomics, no random calls, no extra locks needed.
Impacted products
Vendor Product Version
Linux Linux Version: f735eebe55f8f61758fe014bd0b02ab50b059e4d
Version: f735eebe55f8f61758fe014bd0b02ab50b059e4d
Version: f735eebe55f8f61758fe014bd0b02ab50b059e4d
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "mm/memcontrol.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "89bd8215e25aa6999cc51696da418e0d422bc5e0",
              "status": "affected",
              "version": "f735eebe55f8f61758fe014bd0b02ab50b059e4d",
              "versionType": "git"
            },
            {
              "lessThan": "00731bd7e18f182a32ca54d6b176eaa470b51ed7",
              "status": "affected",
              "version": "f735eebe55f8f61758fe014bd0b02ab50b059e4d",
              "versionType": "git"
            },
            {
              "lessThan": "c0cafe24d3f6534294c4b2bc2d47734ff7cbd313",
              "status": "affected",
              "version": "f735eebe55f8f61758fe014bd0b02ab50b059e4d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "mm/memcontrol.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.16"
            },
            {
              "lessThan": "6.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.36",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.0.*",
              "status": "unaffected",
              "version": "7.0.13",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.36",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.0.13",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmemcg: use round-robin victim selection in refill_stock\n\nHarry Yoo reported that get_random_u32_below() is not safe to call in the\nnmi context and memcg charge draining can happen in nmi context.\n\nMore specifically get_random_u32_below() is neither reentrant- nor\nNMI-safe: it acquires a per-cpu local_lock via local_lock_irqsave() on the\nbatched_entropy_u32 state.  An NMI that lands on a CPU mid-update of the\nChaCha batch state and recurses into the random subsystem would corrupt\nthat state.  The memcg_stock local_trylock prevents re-entry on the percpu\nstock itself, but cannot protect an unrelated subsystem\u0027s per-cpu lock.\n\nReplace the random pick with a per-cpu round-robin counter stored in\nmemcg_stock_pcp and serialized by the same local_trylock that already\nguards cached[] and nr_pages[].  No atomics, no random calls, no extra\nlocks needed."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable `refill_stock()` path is reached through local kernel activity such as memcg-accounted allocation/free paths and NMI-capable perf/BPF-style execution, not by unauthenticated network packets alone.\nAC:L - An attacker can repeatedly drive memcg stock eviction and high-rate NMI/RNG activity; the race is timing-sensitive but both sides are influenceable from local execution.\nPR:L - Reachability requires a local user context able to create or use memcg-accounted workloads and NMI-capable facilities such as perf/BPF or delegated equivalents, so low privileges are sufficient in a plausible deployment.\nUI:N - No separate victim action is required once the attacker can run the local workload and trigger the accounting/NMI activity.\nS:U - The corrupted state is inside the same kernel security authority; this is not a VM, IOMMU, or sandbox boundary escape by itself.\nC:H - The bug corrupts per-CPU random subsystem batch state used for security-sensitive randomness, so confidentiality impact is high under the required higher-severity assumption.\nI:H - Corruption of kernel RNG state can undermine integrity of random-dependent kernel protections and identifiers, and the vulnerable interleaving includes state writes outside the intended entropy slot.\nA:H - Kernel per-CPU state corruption in NMI context can lead to unpredictable kernel malfunction or hard failure, so availability impact is high."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:33:37.176Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/89bd8215e25aa6999cc51696da418e0d422bc5e0"
        },
        {
          "url": "https://git.kernel.org/stable/c/00731bd7e18f182a32ca54d6b176eaa470b51ed7"
        },
        {
          "url": "https://git.kernel.org/stable/c/c0cafe24d3f6534294c4b2bc2d47734ff7cbd313"
        }
      ],
      "title": "memcg: use round-robin victim selection in refill_stock",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-53162",
    "datePublished": "2026-06-25T08:38:43.453Z",
    "dateReserved": "2026-06-09T07:44:35.388Z",
    "dateUpdated": "2026-08-05T12:33:37.176Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…