CVE-2024-39503·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: netfilter: ipset: Fix race between namespace cleanup and gc in the list:set type Lion Ackermann reported that there is a race condition between namespace cleanup in ipset and the garbage collection of the list:set type. The namespace cleanup can destroy the list:set type of sets while the gc of the set type is waiting to run in rcu cleanup. The latter uses data from the destroyed set which thus leads use after free. The patch contains the following parts: - When destroying all sets, first remove the garbage collectors, then wait if needed and then destroy the sets. - Fix the badly ordered "wait then remove gc" for the destroy a single set case. - Fix the missing rcu locking in the list:set type in the userspace test case. - Use proper RCU list handlings in the list:set type. The patch depends on c1193d9bbbd3 (netfilter: ipset: Add list flush to cancel_gc).
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.9.6
- Published
- 2024-07-12
Affected versions
From: 6.8.1
Until: 6.9.6
Fixed in: 6.9.6
How to fix this CVE
Update your Linux kernel to version 6.9.6 or later to resolve a critical race condition in netfilter's ipset list:set type that can lead to use-after-free memory corruption. This vulnerability occurs when namespace cleanup runs concurrently with garbage collection, destroying set data while it is still being accessed. Apply the kernel update immediately to all affected systems and reboot to ensure the patched version is active.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your installed kernel version: uname -r — ensure it is 6.9.6 or later; if between 6.8.1 and 6.9.5, your system is vulnerable
- Verify ipset is loaded and in use: lsmod | grep ip_set — this confirms the vulnerable netfilter module is active
- Check for ipset rules or sets in use: ipset list — if output is non-empty, the vulnerable code path can be triggered during namespace operations
- After patching, confirm the new kernel is booted: uname -r should show 6.9.6 or later, and compare with dpkg -l | grep linux-image (Ubuntu/Debian) or rpm -qa | grep kernel (RHEL/CentOS)
FAQ
What is CVE-2024-39503?
CVE-2024-39503 is a race condition in the Linux kernel's netfilter ipset subsystem where garbage collection of list:set types can access memory after it has been freed during namespace cleanup, potentially causing kernel crashes or memory corruption.
Is CVE-2024-39503 being actively exploited?
No, this vulnerability is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog and no public exploits are known. However, it requires local access and elevated privileges to trigger, making opportunistic exploitation less likely.
What versions of Kernel are affected by CVE-2024-39503?
Linux kernel versions 6.8.1 through 6.9.5 are affected. The vulnerability is resolved in kernel 6.9.6 and later.
How do I check if my server is vulnerable to CVE-2024-39503?
Run uname -r to check your kernel version; if it reports a version between 6.8.1 and 6.9.5 inclusive, your system is vulnerable. Additionally, verify ipset is in use with lsmod | grep ip_set.
Does Defensia detect CVE-2024-39503?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-39503 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/0f1bb77c6d837c9513943bc7c08f04c5cc5c6568
- https://git.kernel.org/stable/c/2ba35b37f780c6410bb4bba9c3072596d8576702
- https://git.kernel.org/stable/c/390b353d1a1da3e9c6c0fd14fe650d69063c95d6
- https://git.kernel.org/stable/c/4e7aaa6b82d63e8ddcbfb56b4fd3d014ca586f10
- https://git.kernel.org/stable/c/90ae20d47de602198eb69e6cd7a3db3420abfc08
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-39503. Free for 1 server.
Get started free