From: Corey Hickey <bugfood-ml@fatooh.org>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [PATCH 1/1] netfilter: Ignore bogus SACK option values in TCP conntrack
Date: Mon, 02 Sep 2013 13:39:09 -0700 [thread overview]
Message-ID: <5224F76D.3010506@fatooh.org> (raw)
In-Reply-To: <1378148280-1153-2-git-send-email-kadlec@blackhole.kfki.hu>
On 2013-09-02 11:58, Jozsef Kadlecsik wrote:
> The netfilter TCP conntrack used to mark packets with bogus SACK option
> values as INVALID. However, it seems broken SEQ anonymizers, which are
> responsible for such traffic, are not going to die out soon and conntrack
> effectively blocks traffic coming through such devices.
>
> Better be liberal at conntrack level: when SACK is bogus, ignore it.
>
> Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> Reported-by: Corey Hickey <bugfood-ml@fatooh.org>
> Tested-by: Corey Hickey <bugfood-ml@fatooh.org>
> ---
> net/netfilter/nf_conntrack_proto_tcp.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
> index 44d1ea3..cd67de8 100644
> --- a/net/netfilter/nf_conntrack_proto_tcp.c
> +++ b/net/netfilter/nf_conntrack_proto_tcp.c
> @@ -640,6 +640,11 @@ static bool tcp_in_window(const struct nf_conn *ct,
> in_recv_win = !receiver->td_maxwin ||
> after(end, sender->td_end - receiver->td_maxwin - 1);
>
> + /* Fall back to ACK when SACK is bogus */
> + if (!(before(sack, receiver->td_end + 1) &&
> + after(sack, receiver->td_end - MAXACKWINDOW(sender) - 1)))
> + sack = ack;
> +
> pr_debug("tcp_in_window: I=%i II=%i III=%i IV=%i\n",
> before(seq, sender->td_maxend + 1),
> (in_recv_win ? 1 : 0),
>
I've been running Jozsef's patch on linux-next compiled on 2013-08-19. I
can confirm that it fixes the problem I'm having with broken SEQ
randomization on FWSM, and I haven't seen any problems caused by it.
http://www.spinics.net/lists/netdev/msg246898.html
I'm still planning to work with my boss to disable SEQ randomization,
hopefully this week.
Thanks,
Corey
next prev parent reply other threads:[~2013-09-02 20:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-02 18:57 [PATCH 0/1] netfilter: Ignore bogus SACK option values in TCP conntrack Jozsef Kadlecsik
2013-09-02 18:58 ` [PATCH 1/1] " Jozsef Kadlecsik
2013-09-02 20:39 ` Corey Hickey [this message]
2013-09-02 21:57 ` Phil Oester
2013-09-03 7:31 ` Jozsef Kadlecsik
2013-09-04 16:54 ` Phil Oester
2013-09-13 20:16 ` Jozsef Kadlecsik
2013-09-15 16:22 ` Phil Oester
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=5224F76D.3010506@fatooh.org \
--to=bugfood-ml@fatooh.org \
--cc=kadlec@blackhole.kfki.hu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.