netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Simon Arlott <simon@fire.lp0.eu>
Cc: William Allen Simpson <william.allen.simpson@gmail.com>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Netfilter Development Mailinglist
	<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH] xt_TCPMSS: SYN packets are allowed to contain data
Date: Tue, 19 Jan 2010 13:53:13 +0100	[thread overview]
Message-ID: <4B55AB39.5020505@trash.net> (raw)
In-Reply-To: <a1c09459b273a62b96a5f3937a36a3f337d36bab@8b5064a13e22126c1b9329f0dc35b8915774b7c3.invalid>

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.

  reply	other threads:[~2010-01-19 12:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4B54CDE5.3070100@simon.arlott.org.uk>
     [not found] ` <4B5578A5.50705@gmail.com>
2010-01-19  9:30   ` [PATCH] xt_TCPMSS: SYN packets are allowed to contain data Patrick McHardy
2010-01-19 12:43     ` Simon Arlott
2010-01-19 12:53       ` Patrick McHardy [this message]
     [not found]   ` <dad314e12c5750b1b5d70c3ea3c6f6134b8fa0f3@8b5064a13e22126c1b9329f0dc35b8915774b7c3.invalid>
     [not found]     ` <4B55D372.4020807@gmail.com>
2010-01-20 12:59       ` Simon Arlott
2010-01-20 21:21         ` Simon Arlott
2010-01-20 21:39           ` Jan Engelhardt
2010-01-20 21:41             ` Jan Engelhardt
2010-01-20 21:51               ` Simon Arlott
2010-01-20 22:22                 ` Amos Jeffries
2010-01-20 23:14               ` Patrick McHardy
2010-01-21 12:47                 ` Simon Arlott
2010-01-21 12:58                   ` Jan Engelhardt
2010-01-21 13:02                   ` Patrick McHardy
2010-01-21 20:13                     ` Simon Arlott
2010-02-02 14:34                       ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B55AB39.5020505@trash.net \
    --to=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=simon@fire.lp0.eu \
    --cc=william.allen.simpson@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).