From: John Heffner <johnwheffner@gmail.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org,
David Miller <davem@davemloft.net>,
Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH 3/5] netfilter: xt_TCPMSS: Fix violation of RFC879 in absence of MSS option
Date: Tue, 11 Jun 2013 14:36:30 -0400 [thread overview]
Message-ID: <CABrhC0nmF=KqmrhbTNonV6bcC4PEXkfZUmiHofRxA30p0VmrVg@mail.gmail.com> (raw)
In-Reply-To: <1370880461-4265-4-git-send-email-pablo@netfilter.org>
While it's not likely to harm anything, this isn't quite right for
IPv6, with a lower bound MTU of 1280.
Thanks,
-John
(Sorry, re-sending as gmail silently turned on HTML formatting.)
On Mon, Jun 10, 2013 at 12:07 PM, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
>
> From: Phil Oester <kernel@linuxace.com>
>
> The clamp-mss-to-pmtu option of the xt_TCPMSS target can cause issues
> connecting to websites if there was no MSS option present in the
> original SYN packet from the client. In these cases, it may add a
> MSS higher than the default specified in RFC879. Fix this by never
> setting a value > 536 if no MSS option was specified by the client.
>
> This closes netfilter's bugzilla #662.
>
> Signed-off-by: Phil Oester <kernel@linuxace.com>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> ---
> net/netfilter/xt_TCPMSS.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
> index a75240f..afaebc7 100644
> --- a/net/netfilter/xt_TCPMSS.c
> +++ b/net/netfilter/xt_TCPMSS.c
> @@ -125,6 +125,12 @@ tcpmss_mangle_packet(struct sk_buff *skb,
>
> skb_put(skb, TCPOLEN_MSS);
>
> + /* RFC 879 states that the default MSS is 536 without specific
> + * knowledge that the destination host is prepared to accept larger.
> + * Since no MSS was provided, we MUST NOT set a value > 536.
> + */
> + newmss = min(newmss, (u16)536);
> +
> opt = (u_int8_t *)tcph + sizeof(struct tcphdr);
> memmove(opt + TCPOLEN_MSS, opt, tcplen - sizeof(struct tcphdr));
>
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-06-11 18:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 16:07 [PATCH 0/5] netfilter fixes for 3.10-rc5 Pablo Neira Ayuso
2013-06-10 16:07 ` [PATCH 1/5] netfilter: nfnetlink_acct: fix incomplete dumping of objects Pablo Neira Ayuso
2013-06-10 16:07 ` [PATCH 2/5] netfilter: nfnetlink_cttimeout: " Pablo Neira Ayuso
2013-06-10 16:07 ` [PATCH 3/5] netfilter: xt_TCPMSS: Fix violation of RFC879 in absence of MSS option Pablo Neira Ayuso
2013-06-11 8:43 ` David Laight
2013-06-10 7:19 ` Phil Oester
2013-06-11 15:00 ` David Laight
2013-06-10 8:27 ` Phil Oester
2013-06-11 16:09 ` David Laight
2013-06-11 16:25 ` Pablo Neira Ayuso
2013-06-11 18:00 ` Jeff Haran
2013-06-11 18:14 ` Rick Jones
2013-06-11 18:31 ` Jeff Haran
2013-06-21 8:27 ` Jan Engelhardt
2013-06-11 18:36 ` John Heffner [this message]
2013-06-10 16:07 ` [PATCH 4/5] netfilter: nfnetlink_queue: fix missing HW protocol Pablo Neira Ayuso
2013-06-10 16:07 ` [PATCH 5/5] ipvs: info leak in __ip_vs_get_dest_entries() Pablo Neira Ayuso
2013-06-10 20:32 ` [PATCH 0/5] netfilter fixes for 3.10-rc5 David Miller
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='CABrhC0nmF=KqmrhbTNonV6bcC4PEXkfZUmiHofRxA30p0VmrVg@mail.gmail.com' \
--to=johnwheffner@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/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).