CVE-2026-64418

Source
https://cve.org/CVERecord?id=CVE-2026-64418
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64418.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-64418
Downstream
Published
2026-07-25T08:50:57.594Z
Modified
2026-07-28T04:03:05.429494652Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
mm: shrinker: fix shrinker_info teardown race with expansion
Details

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

mm: shrinker: fix shrinker_info teardown race with expansion

expandshrinkerinfo() iterates all visible memcgs under shrinkermutex, including memcgs that have not finished ->cssonline() yet.

Once pn->shrinkerinfo has been published, teardown must stay serialized with expandshrinkerinfo() until that memcg is either fully online or no longer visible to iteration. Today allocshrinkerinfo() breaks that rule by dropping shrinkermutex before freeing a partially initialized shrinker_info array, which may cause the following race:

CPU0 CPU1 ==== ====

csscreate --> listaddtailrcu(&css->sibling, &parentcss->children); onlinecss --> memcgroupcssonline --> allocshrinkerinfo --> alloc node0 info rcuassignpointer(C->node0->shrinkerinfo, old0) alloc node1 info -> FAIL -> goto err mutexunlock(shrinkermutex)

                   shrinker_alloc()
                   --> shrinker_memcg_alloc
                       --> mutex_lock(shrinker_mutex)
                           expand_shrinker_info
                           --> mem_cgroup_iter see the memcg
                               expand_one_shrinker_info
                               --> old0 = C->node0->shrinker_info
                                   memcpy(new->unit, old0->unit, ...);

            free_shrinker_info
            --> kvfree(old0);

                                   /* double free !! */
                                   kvfree_rcu(old0, rcu);

The same problem exists later in memcgroupcssonline(). If allocshrinkerinfo() succeeds but a subsequent objcg allocation fails, the freeobjcg -> freeshrinkerinfo() unwind path tears down the already published pn->shrinkerinfo arrays without shrinkermutex. The expandoneshrinkerinfo() can race with that teardown in the same way, leading to use-after-free or double-free of the old shrinkerinfo.

Fix this by serializing shrinkerinfo teardown with shrinkermutex, and by keeping allocshrinkerinfo() error cleanup inside the locked section.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64418.json"
}
References

Affected packages

Git / 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
307bececcd1205bcb67a3c0d53a69db237ccc9d4
Fixed
b9a280a9a454ed514636351d53fe2a233dc5054b
Fixed
6465ff3ce65131c774a312d450abe10f4b9f3875
Fixed
284c267f013e45d8c89d9fb9373105dc8e6c0947
Fixed
65476d31d8056e859c48580f82295ce159196ffe

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64418.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

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-64418.json"