CVE-2025-38732
JSON

5.5medium

netfilter: nf_reject: don't leak dst refcount for loopback packets

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.27% (higher than 12% of CVEs)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_reject: don't leak dst refcount for loopback packets recent patches to add a WARN() when replacing skb dst entry found an old bug: WARNING: include/linux/skbuff.h:1165 skb_dst_check_unset include/linux/skbuff.h:1164 [inline] WARNING: include/linux/skbuff.h:1165 skb_dst_set include/linux/skbuff.h:1210 [inline] WARNING: include/linux/skbuff.h:1165 nf_reject_fill_skb_dst+0x2a4/0x330 net/ipv4/netfilter/nf_reject_ipv4.c:234 [..] Call Trace: nf_send_unreach+0x17b/0x6e0 net/ipv4/netfilter/nf_reject_ipv4.c:325 nft_reject_inet_eval+0x4bc/0x690 net/netfilter/nft_reject_inet.c:27 expr_call_ops_eval net/netfilter/nf_tables_core.c:237 [inline] .. This is because blamed commit forgot about loopback packets. Such packets already have a dst_entry attached, even at PRE_ROUTING stage. Instead of checking hook just check if the skb already has a route attached to it.

Affected

Product or packageVersionsReported by
Linux Linuxfrom f53b9b0bdc59c0823679f2e3214e0d538f5951b9 before 7b8b503c06274ef3c6c1a107743f1ec0d0a53ef8, from f53b9b0bdc59c0823679f2e3214e0d538f5951b9 before 82ef97abf22790182f7d433c74960dfd61b99c33, from f53b9b0bdc59c0823679f2e3214e0d538f5951b9 before b7a885ba25960c91db237c3f83b4285156789bce, from f53b9b0bdc59c0823679f2e3214e0d538f5951b9 before a0a3ace2a57887dac1e7c9a724846040c3e31868, from f53b9b0bdc59c0823679f2e3214e0d538f5951b9 before 51e8531371f90bee742c63775c9a568e5d6bf3c5, from f53b9b0bdc59c0823679f2e3214e0d538f5951b9 before b32e1590a8d22cf7d7f965e46d5576051acf8e42, from f53b9b0bdc59c0823679f2e3214e0d538f5951b9 before 91a79b792204313153e1bdbbe5acbfc28903b3a5, 5.9
Not affected: before 5.9, from 5.10.241 up to 5.10.*, from 5.15.190 up to 5.15.*, from 6.1.149 up to 6.1.*, from 6.6.103 up to 6.6.*, from 6.12.44 up to 6.12.*
CVE List
linux linux_kernelfrom 5.9 before 5.10.241, from 5.11 before 5.15.190, from 5.16 before 6.1.149, from 6.2 before 6.6.103, from 6.7 before 6.12.44, from 6.13 before 6.16.4, 6.17NVD
debian debian_linux11.0NVD

Classification

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_reject: don't leak dst refcount for loopback packets recent patches to add a WARN() when replacing skb dst entry found an old bug: WARNING: include/linux/skbuff.h:1165 skb_dst_check_unset include/linux/skbuff.h:1164 [inline] WARNING: include/linux/skbuff.h:1165 skb_dst_set include/linux/skbuff.h:1210 [inline] WARNING: include/linux/skbuff.h:1165 nf_reject_fill_skb_dst+0x2a4/0x330 net/ipv4/netfilter/nf_reject_ipv4.c:234 [..] Call Trace: nf_send_unreach+0x17b/0x6e0 net/ipv4/netfilter/nf_reject_ipv4.c:325 nft_reject_inet_eval+0x4bc/0x690 net/netfilter/nft_reject_inet.c:27 expr_call_ops_eval net/netfilter/nf_tables_core.c:237 [inline] .. This is because blamed commit forgot about loopback packets. Such packets already have a dst_entry attached, even at PRE_ROUTING stage. Instead of checking hook just check if the skb already has a route attached to it.

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: netfilter: nf_reject: no filtrar el contador de referencias dst para paquetes de loopback parches recientes para añadir un WARN() al reemplazar la entrada dst de skb encontraron un error antiguo: ADVERTENCIA: include/linux/skbuff.h:1165 skb_dst_check_unset include/linux/skbuff.h:1164 [en línea] ADVERTENCIA: include/linux/skbuff.h:1165 skb_dst_set include/linux/skbuff.h:1210 [en línea] ADVERTENCIA: include/linux/skbuff.h:1165 nf_reject_fill_skb_dst+0x2a4/0x330 net/ipv4/netfilter/nf_reject_ipv4.c:234 [..] Rastro de Llamada: nf_send_unreach+0x17b/0x6e0 net/ipv4/netfilter/nf_reject_ipv4.c:325 nft_reject_inet_eval+0x4bc/0x690 net/netfilter/nft_reject_inet.c:27 expr_call_ops_eval net/netfilter/nf_tables_core.c:237 [en línea] .. Esto se debe a que el commit en cuestión olvidó los paquetes de loopback. Dichos paquetes ya tienen una entrada dst adjunta, incluso en la etapa PRE_ROUTING. En lugar de verificar el hook, simplemente verifica si el skb ya tiene una ruta adjunta a él.

References

https://git.kernel.org/stable/c/7b8b503c06274ef3c6c1a107743f1ec0d0a53ef8patch
https://git.kernel.org/stable/c/82ef97abf22790182f7d433c74960dfd61b99c33patch
https://git.kernel.org/stable/c/b7a885ba25960c91db237c3f83b4285156789bcepatch
https://git.kernel.org/stable/c/a0a3ace2a57887dac1e7c9a724846040c3e31868patch
https://git.kernel.org/stable/c/51e8531371f90bee742c63775c9a568e5d6bf3c5patch
https://git.kernel.org/stable/c/b32e1590a8d22cf7d7f965e46d5576051acf8e42patch
https://git.kernel.org/stable/c/91a79b792204313153e1bdbbe5acbfc28903b3a5patch
https://lists.debian.org/debian-lts-announce/2025/10/msg00008.htmlmailing-list, third-party-advisory
https://lists.debian.org/debian-lts-announce/2025/10/msg00007.htmlmailing-list, third-party-advisory
https://cert-portal.siemens.com/productcert/html/ssa-032379.html
https://cert-portal.siemens.com/productcert/html/ssa-019113.html
https://cert-portal.siemens.com/productcert/html/ssa-457936.html

Sources

SourceRecordLicence
CVE ListCVE-2025-38732 changed 2026-11-10CVE Terms of Use
NVDCVE-2025-38732 changed 2026-11-10Public domain