CVE-2023-52940 mm: multi-gen LRU: fix crash during cgroup migration
A race condition in the Linux kernel's multi-gen LRU during cgroup migration causes linked list corruption and kernel crashes.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-52940?
CVE-2023-52940 is a medium-severity vulnerability in Linux kernel, published on 27 Mar 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
mm: multi-gen LRU: fix crash during cgroup migration
lru_gen_migrate_mm() assumes lru_gen_add_mm() runs prior to itself. This isn't true for the following scenario:
CPU 1 CPU 2
clone() cgroup_can_fork() cgroup_procs_write() cgroup_post_fork() task_lock() lru_gen_migrate_mm() task_unlock() task_lock() lru_gen_add_mm() task_unlock()
And when the above happens, kernel crashes because of linked list corruption (mm_struct->lru_gen.list).
Which versions are affected by CVE-2023-52940?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2023-52940?
Apply the vendor's patch.
Is CVE-2023-52940 being exploited?
There is no known exploitation of CVE-2023-52940 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2023-52940, DEBIAN-CVE-2023-52940, GHSA-c2p3-c9fp-43mx, UBUNTU-CVE-2023-52940.