CVE-2024-43892: memcg: protect concurrent access to mem_cgroup_idr

Published Aug 26, 2024
·
Updated

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

memcg: protect concurrent access to memcgroupidr

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 memcgroupidr, the idralloc() and idrreplace() happen within css callback and thus are protected through cgroupmutex from concurrent modifications. However idrremove() for memcgroupidr 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 listlru based kernel crashes at a low frequency in our fleet for a long time. These crashes were in different part of listlru code including listlruadd(), listlrudel() and reparenting code. Upon further inspection, it looked like for a given object (dentry and inode), the superblock's listlru didn't have listlruone for the memcg of that object. The initial suspicions were either the object is not allocated through kmemcachealloclru() or somehow memcglistlrualloc() failed to allocate listlruone() 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 memcgroupidr and in some cases multiple valid memcgs have same id and memcgroupidr is pointing to one of them. So, the most reasonable explanation is that these situations can happen due to race between multiple idrremove() calls or race between idralloc()/idrreplace() and idrremove(). These races are causing multiple memcgs to acquire the same ID and then offlining of one of them would cleanup listlrus on the system for all of them. Later access from other memcgs to the listlru cause crashes due to missing listlruone.

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

8 affected componentsFixes available
Linux Linux kernel>=4.7<6.6.46
Linux Linux kernel>=6.7<6.10.5
Linux Linux kernel=6.11-rc1
Linux Linux kernel=6.11-rc2
debian/linux<=5.10.223-1
5.10.234-16.1.129-16.1.135-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance - Identity Manager virtual appliance component<=ISVG 10.0.2

Event History

Aug 26, 2024
CVE Published
via MITRE·10:10 AM
Data Sourced
via MITRE·10:10 AM
Description
Data Sourced
via NVD·11:15 AM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Red Hat·11:20 AM
DescriptionSeverityAffected Software
Dec 17, 2024
Data Sourced
via Launchpad·03:53 PM
Description
May 7, 2025
Data Sourced
via Ubuntu·06:25 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-43892?

CVE-2024-43892 is considered a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-43892?

To fix CVE-2024-43892, upgrade to the patched versions specified in the advisory.

3

What versions of the Linux kernel are affected by CVE-2024-43892?

CVE-2024-43892 affects various versions of the Linux kernel up to 6.10.5.

4

What specific packages are vulnerable to CVE-2024-43892?

The vulnerable packages include linux versions up to 5.10.223-1 and specific versions of linux-6.1.

5

Is there a public reference for CVE-2024-43892?

Yes, detailed information about CVE-2024-43892 can be found in the Linux kernel commit logs.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203