CVE-2023-52581 netfilter: nf_tables: fix memleak when more than 255 elements expired
A memory leak in the Linux kernel netfilter subsystem allows attackers to cause denial of service by exhausting memory when many elements expire.
- 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-52581?
CVE-2023-52581 is a medium-severity memory corruption vulnerability in Linux kernel, published on 2 Mar 2024. 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:
netfilter: nf_tables: fix memleak when more than 255 elements expired
When more than 255 elements expired we're supposed to switch to a new gc container structure.
This never happens: u8 type will wrap before reaching the boundary and nft_trans_gc_space() always returns true.
This means we recycle the initial gc container structure and lose track of the elements that came before.
While at it, don't deref 'gc' after we've passed it to call_rcu.
Weakness: CWE-401
Which versions are affected by CVE-2023-52581?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2023-52581?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2023-52581 being exploited?
There is no known exploitation of CVE-2023-52581 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2023-52581, DEBIAN-CVE-2023-52581, GHSA-mfw5-pp35-j4h8, UBUNTU-CVE-2023-52581.