CVE-2024-43892

memcg: protect concurrent access to mem_cgroup_idr

7.8 high EPSS 0.25%

Published 26 Aug 2024 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2024-43892

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-43892 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

memcg: protect concurrent access to mem_cgroup_idr

Commit 73f576c04b94 ("mm: memcontrol: fix cgroup creation failure after many small jobs") decoupled the memcg IDs from the CSS ID space to fix the cgroup creation failures. It introduced IDR to maintain the memcg ID space. The IDR depends on external synchronization mechanisms for modifications. For the mem_cgroup_idr, the idr_alloc() and idr_replace() happen within css callback and thus are protected through cgroup_mutex from concurrent modifications. However idr_remove() for mem_cgroup_idr was not protected against concurrency and can be run concurrently for different memcgs when they hit their refcnt to zero. Fix that.

We have been seeing list_lru based kernel crashes at a low frequency in our fleet for a long time. These crashes were in different part of list_lru code including list_lru_add(), list_lru_del() and reparenting code. Upon further inspection, it looked like for a given object (dentry and inode), the super_block's list_lru didn't have list_lru_one for the memcg of that object. The initial suspicions were either the object is not allocated through kmem_cache_alloc_lru() or somehow memcg_list_lru_alloc() failed to allocate list_lru_one() for a memcg but returned success. No evidence were found for these cases.

Looking more deeply, we started seeing situations where valid memcg's id is not present in mem_cgroup_idr and in some cases multiple valid memcgs have same id and mem_cgroup_idr is pointing to one of them. So, the most reasonable explanation is that these situations can happen due to race between multiple idr_remove() calls or race between idr_alloc()/idr_replace() and idr_remove(). These races are causing multiple memcgs to acquire the same ID and then offlining of one of them would cleanup list_lrus on the system for all of them. Later access from other memcgs to the list_lru cause crashes due to missing list_lru_one.

Severity (CVSS)

7.8 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 17.1% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 10 Sep 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 73f576c04b9410ed19660f74f97521bee6e1c546, before 912736a0435ef40e6a4ae78197ccb5553cb80b05
affected from 73f576c04b9410ed19660f74f97521bee6e1c546, before e6cc9ff2ac0b5df9f25eb790934c3104f6710278
affected from 73f576c04b9410ed19660f74f97521bee6e1c546, before 56fd70f4aa8b82199dbe7e99366b1fd7a04d86fb
affected from 73f576c04b9410ed19660f74f97521bee6e1c546, before 37a060b64ae83b76600d187d76591ce488ab836b
affected from 73f576c04b9410ed19660f74f97521bee6e1c546, before 51c0b1bb7541f8893ec1accba59eb04361a70946
affected from 73f576c04b9410ed19660f74f97521bee6e1c546, before 9972605a238339b85bd16b084eed5f18414d22db
affected 8627c7750a66a46d56d3564e1e881aa53764497c
affected db70cd18d3da727a3a59694de428a9e41c620de7
affected from 4.4.18, before 4.5
affected from 4.6.6, before 4.7
Other versions: unaffected
Linux
affected 4.7
unaffected before 4.7
unaffected from 5.10.226 up to and including 5.10.*
unaffected from 5.15.167 up to and including 5.15.*
unaffected from 6.1.110 up to and including 6.1.*
unaffected from 6.6.46 up to and including 6.6.*
unaffected from 6.10.5 up to and including 6.10.*
unaffected 6.11 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-43892 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-43892

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-43892
trivy image --scanners vuln IMAGE | grep CVE-2024-43892

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-43892 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.