Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754208Ab0ASMxU (ORCPT ); Tue, 19 Jan 2010 07:53:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754121Ab0ASMxS (ORCPT ); Tue, 19 Jan 2010 07:53:18 -0500 Received: from stinky.trash.net ([213.144.137.162]:45564 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754089Ab0ASMxQ (ORCPT ); Tue, 19 Jan 2010 07:53:16 -0500 Message-ID: <4B55AB39.5020505@trash.net> Date: Tue, 19 Jan 2010 13:53:13 +0100 From: Patrick McHardy User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: Simon Arlott CC: William Allen Simpson , netdev , Linux Kernel Mailing List , Netfilter Development Mailinglist Subject: Re: [PATCH] xt_TCPMSS: SYN packets are allowed to contain data References: <4B54CDE5.3070100@simon.arlott.org.uk> <4B5578A5.50705@gmail.com> <4B557BA2.7080407@trash.net> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1434 Lines: 31 Simon Arlott wrote: > On Tue, January 19, 2010 09:30, Patrick McHardy wrote: >> William Allen Simpson wrote: >>> Simon Arlott wrote: >>>> This moves the check for (header size != packet size) to after >>>> attempting to modify an existing MSS option. Another check is >>>> needed before looking through the header to ensure it doesn't >>>> claim to be larger than the packet size. >>>> >>> What's the path from tcp_v[4,6]_rcv() to these tests? >>> >>> 1) Header larger than the packet is already tested in about 5 places, >>> and my patch "tcp: harmonize tcp_vx_rcv header length assumptions" >>> tries to get them all down to just *one* test. >> We're talking about a netfilter module here, which has to deal >> with forwarded traffic and can only rely on the IP header checks >> done in ip_rcv(). > > My gateway (where these error messages occur) is running 2.6.29, > and skb->len (from the prink) is 40 bytes. > > If this is 20 (IPv4 Header) + 20 (TCP Header) = 40 bytes, then there > is no data and the header offset is wrong so it hasn't been checked. That's odd. If the packet is really only 40 bytes large, then there are no TCP options, so your patch shouldn't have any effect. -- 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/