CVE-2026-53162

memcg: use round-robin victim selection in refill_stock

HIGH
7.8
CVSS Score
Published: June 25, 2026 at 08:38 AM UTC
Updated: August 5, 2026 at 01:24 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.16 ≤ v < 6.18.366.16 ≤ v < 7.0.136.16 ≤ v < 7.16.19 ≤ v < 7.0.137.1 rc17.1 rc27.1 rc37.1 rc47.1 rc57.1 rc6f735eebe55f8f61758fe014bd0b02ab50b059e4d
Vendor states this is fixed in 00731bd7e18f182a32ca54d6b176eaa470b51ed7 (fixed)
Vendor states this is fixed in 89bd8215e25aa6999cc51696da418e0d422bc5e0 (fixed)
Vendor states this is fixed in c0cafe24d3f6534294c4b2bc2d47734ff7cbd313 (fixed)
Vendor states this is fixed in 6.16 (unaffected)
Vendor states this is fixed in 6.18.36 (unaffected)
Vendor states this is fixed in 7.0.13 (unaffected)
Vendor states this is fixed in 7.1 (unaffected)

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusANALYZED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card