CVE-2025-38721

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 ctnetlink_dump_table(): if (res < 0) { nf_conntrack_get(&ct->ct_general); // 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 nf_conntrack_cleanup_net_list() will wait forever. This can be reproduced by running conntrack_resize.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 nf_conntrack_cleanup_net_list. One fix would to change this to: if (res < 0) { if (ct != last) nf_conntrack_get(&ct->ct_general); 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 ctnetlink_exp_dump_table, it looks to me as if this has the same problem and like ctnetlink_dump_table, we only need a 'skip hint', not the actual object so we can apply the same cookie strategy there as well.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.18:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.18:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.18:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.18:rc7:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*

Configuration 2 (hide)

cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

History

19 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: netfilter: ctnetlink: corrección de fuga de contador de referencias en el volcado de tabla Hay una fuga de contador de referencias en ctnetlink_dump_table(): if (res < 0) { nf_conntrack_get(&ct->ct_general); // AQUÍ cb->args[1] = (unsigned long)ct; ... Aunque es muy improbable, es posible que ct == last. Si esto ocurre, entonces el contador de referencias de ct ya se había incrementado. Este segundo incremento nunca se deshace. Esto evita que el objeto conntrack sea liberado, lo que a su vez impide que cnet->count vuelva a 0. Esto entonces bloqueará el desmantelamiento de netns (o rmmod de conntrack) ya que nf_conntrack_cleanup_net_list() esperará indefinidamente. Esto puede reproducirse ejecutando la autoprueba conntrack_resize.sh en un bucle. Me lleva ~20 minutos en un kernel preemptivo en promedio antes de que vea un kworker descontrolado girando en nf_conntrack_cleanup_net_list. Una solución sería cambiar esto a: if (res < 0) { if (ct != last) nf_conntrack_get(&ct->ct_general); Pero este conteo de referencias no es necesario en primer lugar. Podemos simplemente almacenar un valor de cookie en su lugar. Un parche de seguimiento hará lo mismo para ctnetlink_exp_dump_table, me parece que esto tiene el mismo problema y al igual que ctnetlink_dump_table, solo necesitamos una 'pista de salto', no el objeto real, así que podemos aplicar la misma estrategia de cookie allí también.

15 Oct 2026, 02:17

Type Values Removed Values Added
References
  • () https://cert-portal.siemens.com/productcert/html/ssa-457936.html -

Information

Published : 2025-09-04 16:15

Updated : 2026-10-19 21:10


NVD link : CVE-2025-38721

Mitre link : CVE-2025-38721

CVE.ORG link : CVE-2025-38721


JSON object : View

Products Affected

debian

  • debian_linux

linux

  • linux_kernel