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

mm/shrinker: do not hold RCU lock in shrinker_debugfs_count_show()

Reading the debugfs "count" file of a memcg-aware shrinker can sleep
inside an RCU read-side critical section:

BUG: sleeping function called from invalid context at kernel/cgroup/rstat.c:421
RCU nest depth: 1, expected: 0
css_rstat_flush
mem_cgroup_flush_stats
zswap_shrinker_count
shrinker_debugfs_count_show

shrinker_debugfs_count_show() invokes the ->count_objects() callback under
rcu_read_lock(). The zswap callback flushes memcg stats via
css_rstat_flush(), which may sleep, so it must not run under RCU.

The RCU lock is not needed here. mem_cgroup_iter() takes RCU internally
and returns a memcg holding a css reference (dropped on the next iteration
or by mem_cgroup_iter_break()), so the memcg stays alive without it. The
shrinker is kept alive by the open debugfs file: shrinker_free() removes
the debugfs entries via debugfs_remove_recursive(), which waits for
in-flight readers to drain, before call_rcu(..., shrinker_free_rcu_cb).
The sibling "scan" handler already invokes the sleeping ->scan_objects()
callback with no RCU section.

Drop the rcu_read_lock()/rcu_read_unlock().
Published: 2026-07-25
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Linux kernel’s mm/shrinker module inadvertently acquires an RCU read lock around a callback that may sleep. This violates RCU’s lock‑free contract and triggers a BUG when the "count" debugfs file is read, potentially causing a kernel panic and taking the system offline. The issue is an improper synchronization flaw (CWE-663) that can lead to a local denial of service, as any process with access to the debugfs entry can trigger it.

Affected Systems

All Linux kernel instances that include an unpatched mm/shrinker implementation, notably those with memcg‑aware shrinkers such as zswap, are susceptible. The issue applies to any distribution that ships the generic Linux kernel without the commit that removes the RCU lock in shrinker_debugfs_count_show(). Any user or process able to read the debugfs "count" file can trigger the flaw.

Risk and Exploitability

The CVSS score of 5.5 indicates moderate severity, while an EPSS value of less than 1% and absence from CISA’s KEV catalog suggest a low likelihood of exploitation. Nevertheless, the flaw requires local access with privileges sufficient to read debugfs; a root or privileged user can exercise the bug and cause a system crash. Since the attack vector is local and the kernel exposes the file only to privileged users, the risk to public-facing services is limited, but an administrator could use this vector to perform a denial‑of‑service attack.

Generated by OpenCVE AI on August 2, 2026 at 12:49 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the kernel to a version that includes the commit removing the RCU lock in shrinker_debugfs_count_show()
  • Configure the system to restrict access to debugfs so that only privileged users can read the "count" file, for example by setting the appropriate permissions or applying SELinux/AppArmor policies
  • Monitor kernel logs for BUG or OOPS messages triggered by invalid RCU contexts and configure alerts to detect and respond to such kernel panics promptly

Generated by OpenCVE AI on August 2, 2026 at 12:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4720-1 linux security update
Debian DLA Debian DLA DLA-4723-1 linux-6.1 security update
Debian DLA Debian DLA DLA-4724-1 linux-6.12 new package
History

Sat, 01 Aug 2026 02:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Thu, 30 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-663
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Low


Sun, 26 Jul 2026 01:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Sat, 25 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mm/shrinker: do not hold RCU lock in shrinker_debugfs_count_show() Reading the debugfs "count" file of a memcg-aware shrinker can sleep inside an RCU read-side critical section: BUG: sleeping function called from invalid context at kernel/cgroup/rstat.c:421 RCU nest depth: 1, expected: 0 css_rstat_flush mem_cgroup_flush_stats zswap_shrinker_count shrinker_debugfs_count_show shrinker_debugfs_count_show() invokes the ->count_objects() callback under rcu_read_lock(). The zswap callback flushes memcg stats via css_rstat_flush(), which may sleep, so it must not run under RCU. The RCU lock is not needed here. mem_cgroup_iter() takes RCU internally and returns a memcg holding a css reference (dropped on the next iteration or by mem_cgroup_iter_break()), so the memcg stays alive without it. The shrinker is kept alive by the open debugfs file: shrinker_free() removes the debugfs entries via debugfs_remove_recursive(), which waits for in-flight readers to drain, before call_rcu(..., shrinker_free_rcu_cb). The sibling "scan" handler already invokes the sleeping ->scan_objects() callback with no RCU section. Drop the rcu_read_lock()/rcu_read_unlock().
Title mm/shrinker: do not hold RCU lock in shrinker_debugfs_count_show()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-07-25T08:50:58.342Z

Reserved: 2026-07-19T15:36:31.786Z

Link: CVE-2026-64419

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-25T10:17:25.847

Modified: 2026-08-11T15:01:50.637

Link: CVE-2026-64419

cve-icon Redhat

Severity : Low

Publid Date: 2026-07-25T00:00:00Z

Links: CVE-2026-64419 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-02T13:00:05Z

Weaknesses
  • CWE-663

    Use of a Non-reentrant Function in a Concurrent Context