From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Subject: [PATCH 5/8] Check for ICMP_ID in icmp_nfattr_to_tuple Date: Tue, 08 Nov 2005 02:44:39 +0100 Message-ID: <43700307.6090001@netfilter.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070405080405030008010809" Cc: Harald Welte Return-path: To: Netfilter Development Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org This is a multi-part message in MIME format. --------------070405080405030008010809 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This patch fixes an userspace triggered oops. If there is no ICMP_ID info the reference to attr will be NULL. Signed-off-by: Krzysztof Piotr Oledzki Signed-off-by: Pablo Neira Ayuso -- 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 --------------070405080405030008010809 Content-Type: text/plain; name="04-icmp-id.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="04-icmp-id.patch" This patch fixes an userspace triggered oops. If there is no ICMP_ID info the reference to attr will be NULL. Signed-off-by: Krzysztof Piotr Oledzki Signed-off-by: Pablo Neira Ayuso --- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c 2005-11-06 02:17:29.000000000 +0100 +++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c 2005-11-06 02:18:45.000000000 +0100 @@ -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 = --------------070405080405030008010809--