Skip to contentSkip to conversation

Check for ICMP_ID in icmp_nfattr_to_tuple

PATCH Applied Pablo Neira 2 participants 2 messages Nov 8, 2005

Subsystems (2)
lore
Share & tools
lore

Pablo Neira

author maintainer
#0 lore raw

PATCH 5/8 Check for ICMP_ID in icmp_nfattr_to_tuple

This patch fixes an userspace triggered oops. If there is no ICMP_ID info the reference to attr will be NULL.

Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

This patch fixes an userspace triggered oops. If there is no ICMP_ID info the reference to attr will be NULL.

net/ipv4/netfilter/ip_conntrack_proto_icmp.c +2 -1
@@ -296,7 +296,8 @@
 				struct ip_conntrack_tuple *tuple)
 {
 	if (!tb[CTA_PROTO_ICMP_TYPE-1]
-	    || !tb[CTA_PROTO_ICMP_CODE-1])
+	    || !tb[CTA_PROTO_ICMP_CODE-1]
+	    || !tb[CTA_PROTO_ICMP_ID-1])
 		return -1;
 
 	tuple->dst.u.icmp.type = 
Applied
#1 lore raw
Quoted 2 lines · Pablo Neira

This patch fixes an userspace triggered oops. If there is no ICMP_ID info the reference to attr will be NULL.

thanks, applied.

Signature · 5 lines
- Harald Welte <[email protected]>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie