{"id":"CVE-2026-64419","summary":"mm/shrinker: do not hold RCU lock in shrinker_debugfs_count_show()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/shrinker: do not hold RCU lock in shrinker_debugfs_count_show()\n\nReading the debugfs \"count\" file of a memcg-aware shrinker can sleep\ninside an RCU read-side critical section:\n\n  BUG: sleeping function called from invalid context at kernel/cgroup/rstat.c:421\n  RCU nest depth: 1, expected: 0\n   css_rstat_flush\n   mem_cgroup_flush_stats\n   zswap_shrinker_count\n   shrinker_debugfs_count_show\n\nshrinker_debugfs_count_show() invokes the -\u003ecount_objects() callback under\nrcu_read_lock().  The zswap callback flushes memcg stats via\ncss_rstat_flush(), which may sleep, so it must not run under RCU.\n\nThe RCU lock is not needed here.  mem_cgroup_iter() takes RCU internally\nand returns a memcg holding a css reference (dropped on the next iteration\nor by mem_cgroup_iter_break()), so the memcg stays alive without it.  The\nshrinker is kept alive by the open debugfs file: shrinker_free() removes\nthe debugfs entries via debugfs_remove_recursive(), which waits for\nin-flight readers to drain, before call_rcu(..., shrinker_free_rcu_cb). \nThe sibling \"scan\" handler already invokes the sleeping -\u003escan_objects()\ncallback with no RCU section.\n\nDrop the rcu_read_lock()/rcu_read_unlock().","modified":"2026-07-27T04:03:19.462883738Z","published":"2026-07-25T08:50:58.342Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64419.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2fed79f0fe8c8d28a972c290dbfd693c3546c8c4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/560e21e8ccff813e84d05f6500907c549a3d6985"},{"type":"WEB","url":"https://git.kernel.org/stable/c/86237e56091e70f09c0fbf217f9d9c0e08f556c4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b902890c62d200b3509cb5e09cf1e0a66553c128"},{"type":"WEB","url":"https://git.kernel.org/stable/c/de5f69b8dae8698ac5e48dfcd30017887cdf4e5a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e441cbfbd0eaa6404278e985033c33caba4db767"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64419.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64419"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5035ebc644aec92d55d1bbfe042f35341e4bffb5"},{"fixed":"de5f69b8dae8698ac5e48dfcd30017887cdf4e5a"},{"fixed":"e441cbfbd0eaa6404278e985033c33caba4db767"},{"fixed":"2fed79f0fe8c8d28a972c290dbfd693c3546c8c4"},{"fixed":"560e21e8ccff813e84d05f6500907c549a3d6985"},{"fixed":"86237e56091e70f09c0fbf217f9d9c0e08f556c4"},{"fixed":"b902890c62d200b3509cb5e09cf1e0a66553c128"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64419.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"6.1.178"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.145"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.96"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.39"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.1.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64419.json"}}],"schema_version":"1.7.5"}