From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Westphal Subject: Re: BUG: unable to handle kernel paging request at 0000000000609920 in networking code on 3.2.23. Date: Fri, 25 Jan 2013 09:28:39 +0100 Message-ID: <20130125082839.GJ8541@breakpoint.cc> References: <20130124230850.GI8541@breakpoint.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florian Westphal , Rafal Kupka , netdev@vger.kernel.org, netfilter-devel To: Jan Engelhardt Return-path: Received: from Chamillionaire.breakpoint.cc ([80.244.247.6]:40140 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753793Ab3AYI2m (ORCPT ); Fri, 25 Jan 2013 03:28:42 -0500 Content-Disposition: inline In-Reply-To: Sender: netfilter-devel-owner@vger.kernel.org List-ID: Jan Engelhardt wrote: > On Friday 2013-01-25 00:08, Florian Westphal wrote: > >@@ -35,10 +35,18 @@ tcpoptstrip_mangle_packet(struct sk_buff *skb, > > { > > unsigned int optl, i, j; > > struct tcphdr *tcph; > >+ struct tcphdr _tcph; > > u_int16_t n, o; > > u_int8_t *opt; > > > >- if (!skb_make_writable(skb, skb->len)) > >+ if (skb->len < minlen) > >+ return XT_CONTINUE; > >+ > >+ tcph = skb_header_pointer(skb, tcphoff, sizeof(_tcph), &_tcph); > >+ if (!tcph) > >+ return XT_CONTINUE; /* no options -> nothing to do */ > > To the best of my analysis, the "no options" comment is incorrect here, > because you are not even looking at the options so far, but only tcph. Yup. > The prose should probably be something like: > if (iph->frag_off & htons(IP_OFFSET)) != 0) > /* not the first fragment - lost case */ > return XT_CONTINUE; [..] Can to submit a patch?