CVE-2023-52581·Kernel vulnerability
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.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.5.6
- Published
- 2024-03-02
Affected versions
From: 6.5
Until: 6.5.6
Fixed in: 6.5.6
How to fix this CVE
Update your Linux kernel to version 6.5.6 or later to resolve a memory leak in the netfilter nf_tables garbage collection subsystem. This vulnerability affects systems running kernel versions 6.5 through 6.5.5, where improper element expiration handling causes memory to be lost when processing large batches of firewall rules. Apply the kernel update through your distribution's package manager and reboot to activate the patched kernel.
sudo dnf upgrade kernel kernel-core kernel-modulesDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r — verify it is 6.5.6 or later
- Confirm netfilter nf_tables module is loaded: lsmod | grep nf_tables — if empty, component is not exposed
- Review syslog for memory allocation failures: grep -i 'memory\|alloc\|gc' /var/log/syslog | tail -100 — look for patterns during peak firewall rule activity
- Verify patch installation: grep -i CONFIG_NF_TABLES /boot/config-$(uname -r) — should show CONFIG_NF_TABLES=y or =m, and kernel version should be 6.5.6+
FAQ
What is CVE-2023-52581?
This vulnerability is a memory leak in the Linux kernel's netfilter nf_tables subsystem where the garbage collection mechanism fails to properly track expired firewall rule elements when more than 255 expire simultaneously, causing allocated memory to be orphaned and unreclaimable.
Is CVE-2023-52581 being actively exploited?
No, there is no evidence of active exploitation in the wild. This is a reliability/denial-of-service risk rather than a remote code execution vector.
What versions of Kernel are affected by CVE-2023-52581?
Linux kernel versions 6.5 through 6.5.5 are affected. Version 6.5.6 and later contain the fix.
How do I check if my server is vulnerable to CVE-2023-52581?
Run 'uname -r' to get your kernel version. If it shows 6.5.0 through 6.5.5, your system is vulnerable. Additionally, check if nf_tables is in use with 'lsmod | grep nf_tables'.
Does Defensia detect CVE-2023-52581?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2023-52581 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/09c85f2d21ab6b5acba31a037985b13e8e6565b8
- https://git.kernel.org/stable/c/4aea243b6853d06c1d160a9955b759189aa02b14
- https://git.kernel.org/stable/c/7cf055b43756b10aa2b851c927c940f5ed652125
- https://git.kernel.org/stable/c/7e5d732e6902eb6a37b35480796838a145ae5f07
- https://git.kernel.org/stable/c/a995a68e8a3b48533e47c856865d109a1f1a9d01
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52581. Free for 1 server.
Get started free