CVE-2025-38721: netfilter: ctnetlink: fix refcount leak on table dump

Published Sep 4, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

netfilter: ctnetlink: fix refcount leak on table dump

There is a reference count leak in ctnetlinkdumptable(): if (res < 0) { nfconntrackget(&ct->ctgeneral); // HERE cb->args[1] = (unsigned long)ct; ...

While its very unlikely, its possible that ct == last. If this happens, then the refcount of ct was already incremented. This 2nd increment is never undone.

This prevents the conntrack object from being released, which in turn keeps prevents cnet->count from dropping back to 0.

This will then block the netns dismantle (or conntrack rmmod) as nfconntrackcleanupnetlist() will wait forever.

This can be reproduced by running conntrackresize.sh selftest in a loop. It takes ~20 minutes for me on a preemptible kernel on average before I see a runaway kworker spinning in nfconntrackcleanupnetlist.

One fix would to change this to: if (res < 0) { if (ct != last) nfconntrackget(&ct->ctgeneral);

But this reference counting isn't needed in the first place. We can just store a cookie value instead.

A followup patch will do the same for ctnetlinkexpdumptable, it looks to me as if this has the same problem and like ctnetlinkdumptable, we only need a 'skip hint', not the actual object so we can apply the same cookie strategy there as well.

Affected Software

18 affected componentsFixes available
Linux Kernel
Microsoft azl3 kernel 6.6.96.2-1
Microsoft azl3 kernel 6.6.96.2-2
Linux Linux kernel>=2.6.19<5.4.297
Linux Linux kernel>=5.5<5.10.241
Linux Linux kernel>=5.11<5.15.190
Linux Linux kernel>=5.16<6.1.149
Linux Linux kernel>=6.2<6.6.103
Linux Linux kernel>=6.7<6.12.43
Linux Linux kernel>=6.13<6.15.11
Linux Linux kernel>=6.16<6.16.2
Linux Linux kernel=2.6.18
Linux Linux kernel=2.6.18-rc5
Linux Linux kernel=2.6.18-rc6
Linux Linux kernel=2.6.18-rc7
Linux Linux kernel=6.17-rc1
Debian Debian Linux=11.0
Microsoft cbl2 kernel 5.15.186.1-1

Event History

Sep 4, 2025
CVE Published
via MITRE·03:33 PM
Data Sourced
via MITRE·03:33 PM
Description
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityAffected Software
Sep 6, 2025
Data Sourced
via Microsoft·01:10 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·01:10 AM
SeverityAffected Software
Updated
via Microsoft·08:10 AM
DescriptionSeverity
Updated
via Microsoft·08:10 AM
SeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-38721?

CVE-2025-38721 is classified as a medium severity vulnerability.

2

How do I fix CVE-2025-38721?

To fix CVE-2025-38721, update the Linux kernel to the latest patched version.

3

What systems are affected by CVE-2025-38721?

CVE-2025-38721 affects various versions of the Linux kernel that use the netfilter module.

4

What are the consequences of exploiting CVE-2025-38721?

Exploitation of CVE-2025-38721 may lead to denial of service due to the reference count leak.

5

When was CVE-2025-38721 published?

CVE-2025-38721 was published in 2025 and addresses a specific vulnerability in the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203