# CVE-2023-52581: netfilter: nf\_tables: fix memleak when more than 255 elements expired

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.3
- **CVSS:** 6.3 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-28)
- **CWE:** CWE-401
- **Published:** 2024-03-02T21:59:47.856Z
- **Modified:** 2026-06-17T06:43:04.583Z

## Who should check

- Anyone running Linux \>= 8da1b048f9a501d3d7d38c188ba09d7d0d5b8c27, \< 7cf055b43756b10aa2b851c927c940f5ed652125; \>= bbdb3b65aa91aa0a32b212f27780b28987f2d94f, \< a995a68e8a3b48533e47c856865d109a1f1a9d01; \>= 448be0774882f95a74fa5eb7519761152add601b, \< 09c85f2d21ab6b5acba31a037985b13e8e6565b8; \>= d19e8bf3ea4114dd21fc35da21f398203d7f7df1, \< ef99506eaf1dc31feff1adfcfd68bc5535a22171; \>= ea3eb9f2192e4fc33b795673e56c97a21987f868, \< 7e5d732e6902eb6a37b35480796838a145ae5f07; \>= 5f68718b34a531a556f2f50300ead2862278da26, \< 4aea243b6853d06c1d160a9955b759189aa02b14; \>= 5f68718b34a531a556f2f50300ead2862278da26, \< cf5000a7787cbc10341091d37245a42c119d26c5; 0624f190b5742a1527cd938295caa8dc5281d4cd; \>= 6.4.11, \< 6.5
- Anyone running Linux 6.5

## 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.

## Affected and fixed versions

- Linux: \>= 8da1b048f9a501d3d7d38c188ba09d7d0d5b8c27, \< 7cf055b43756b10aa2b851c927c940f5ed652125; \>= bbdb3b65aa91aa0a32b212f27780b28987f2d94f, \< a995a68e8a3b48533e47c856865d109a1f1a9d01; \>= 448be0774882f95a74fa5eb7519761152add601b, \< 09c85f2d21ab6b5acba31a037985b13e8e6565b8; \>= d19e8bf3ea4114dd21fc35da21f398203d7f7df1, \< ef99506eaf1dc31feff1adfcfd68bc5535a22171; \>= ea3eb9f2192e4fc33b795673e56c97a21987f868, \< 7e5d732e6902eb6a37b35480796838a145ae5f07; \>= 5f68718b34a531a556f2f50300ead2862278da26, \< 4aea243b6853d06c1d160a9955b759189aa02b14; \>= 5f68718b34a531a556f2f50300ead2862278da26, \< cf5000a7787cbc10341091d37245a42c119d26c5; 0624f190b5742a1527cd938295caa8dc5281d4cd; \>= 6.4.11, \< 6.5 (cvelist)
- Linux: 6.5 (cvelist)

## Mitigation

- Upgrade Linux to 6.5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-52581. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52581.md
Affected: Linux >= 8da1b048f9a501d3d7d38c188ba09d7d0d5b8c27, < 7cf055b43756b10aa2b851c927c940f5ed652125; >= bbdb3b65aa91aa0a32b212f27780b28987f2d94f, < a995a68e8a3b48533e47c856865d109a1f1a9d01; >= 448be0774882f95a74fa5eb7519761152add601b, < 09c85f2d21ab6b5acba31a037985b13e8e6565b8; >= d19e8bf3ea4114dd21fc35d…
Fixed in: Linux 7cf055b43756b10aa2b851c927c940f5ed652125, Linux 09c85f2d21ab6b5acba31a037985b13e8e6565b8, Linux 7e5d732e6902eb6a37b35480796838a145ae5f07, Linux 4aea243b6853d06c1d160a9955b759189aa02b14, Linux 6.5

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-52581 being exploited?

There is no confirmed exploitation: CVE-2023-52581 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2023-52581?

Medium: CVSS 6.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2023-52581?

Linux \>= 8da1b048f9a501d3d7d38c188ba09d7d0d5b8c27, \< 7cf055b43756b10aa2b851c927c940f5ed652125; \>= bbdb3b65aa91aa0a32b212f27780b28987f2d94f, \< a995a68e8a3b48533e47c856865d109a1f1a9d01; \>= 448be0774882f95a74fa5eb7519761152add601b, \< 09c85f2d21ab6b5acba31a037985b13e8e6565b8; \>= d19e8bf3ea4114dd21fc35da21f398203d7f7df1, \< ef99506eaf1dc31feff1adfcfd68bc5535a22171; \>= ea3eb9f2192e4fc33b795673e56c97a21987f868, \< 7e5d732e6902eb6a37b35480796838a145ae5f07; \>= 5f68718b34a531a556f2f50300ead2862278da26, \< 4aea243b6853d06c1d160a9955b759189aa02b14; \>= 5f68718b34a531a556f2f50300ead2862278da26, \< cf5000a7787cbc10341091d37245a42c119d26c5; 0624f190b5742a1527cd938295caa8dc5281d4cd; \>= 6.4.11, \< 6.5; Linux 6.5.

### Is there a fix for CVE-2023-52581?

Yes. Fixed in Linux 7cf055b43756b10aa2b851c927c940f5ed652125, Linux 09c85f2d21ab6b5acba31a037985b13e8e6565b8, Linux 7e5d732e6902eb6a37b35480796838a145ae5f07, Linux 4aea243b6853d06c1d160a9955b759189aa02b14, Linux 6.5. Upgrade Linux to 6.5 or later.

### How do I check if I'm affected by CVE-2023-52581?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/7cf055b43756b10aa2b851c927c940f5ed652125>
- patch: <https://git.kernel.org/stable/c/a995a68e8a3b48533e47c856865d109a1f1a9d01>
- patch: <https://git.kernel.org/stable/c/09c85f2d21ab6b5acba31a037985b13e8e6565b8>
- patch: <https://git.kernel.org/stable/c/ef99506eaf1dc31feff1adfcfd68bc5535a22171>
- patch: <https://git.kernel.org/stable/c/7e5d732e6902eb6a37b35480796838a145ae5f07>
- patch: <https://git.kernel.org/stable/c/4aea243b6853d06c1d160a9955b759189aa02b14>
- patch: <https://git.kernel.org/stable/c/cf5000a7787cbc10341091d37245a42c119d26c5>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-52581>

HTML: <https://flawdb.com/CVE-2023-52581> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-52581>
