Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946251AbXBCCga (ORCPT ); Fri, 2 Feb 2007 21:36:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1946245AbXBCCga (ORCPT ); Fri, 2 Feb 2007 21:36:30 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:52674 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946240AbXBCCfs (ORCPT ); Fri, 2 Feb 2007 21:35:48 -0500 Message-Id: <20070203023835.125598000@sous-sol.org> References: <20070203023504.435051000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Fri, 02 Feb 2007 18:35:11 -0800 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Patrick McHardy , netfilter-devel@lists.netfilter.org, davem@davemloft.net Subject: [patch 07/59] NETFILTER: nf_conntrack_ipv6: fix crash when handling fragments Content-Disposition: inline; filename=netfilter-nf_conntrack_ipv6-fix-crash-when-handling-fragments.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1264 Lines: 36 -stable review patch. If anyone has any objections, please let us know. ------------------ From: Patrick McHardy When IPv6 connection tracking splits up a defragmented packet into its original fragments, the packets are taken from a list and are passed to the network stack with skb->next still set. This causes dev_hard_start_xmit to treat them as GSO fragments, resulting in a use after free when connection tracking handles the next fragment. Signed-off-by: Patrick McHardy Signed-off-by: Chris Wright --- net/ipv6/netfilter/nf_conntrack_reasm.c | 2 ++ 1 file changed, 2 insertions(+) --- linux-2.6.19.2.orig/net/ipv6/netfilter/nf_conntrack_reasm.c +++ linux-2.6.19.2/net/ipv6/netfilter/nf_conntrack_reasm.c @@ -835,6 +835,8 @@ void nf_ct_frag6_output(unsigned int hoo s->nfct_reasm = skb; s2 = s->next; + s->next = NULL; + NF_HOOK_THRESH(PF_INET6, hooknum, s, in, out, okfn, NF_IP6_PRI_CONNTRACK_DEFRAG + 1); s = s2; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/