From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: Florian Westphal <fw@strlen.de>,
netfilter-devel@vger.kernel.org, dborkman@redhat.com
Subject: Re: [PATCH nf v2] netfilter: conntrack: disable generic tracking for known protocols
Date: Mon, 29 Sep 2014 12:31:58 +0200 [thread overview]
Message-ID: <20140929103158.GA15475@salvia> (raw)
In-Reply-To: <alpine.DEB.2.10.1409261212510.18634@blackhole.kfki.hu>
On Fri, Sep 26, 2014 at 12:13:44PM +0200, Jozsef Kadlecsik wrote:
> On Fri, 26 Sep 2014, Florian Westphal wrote:
>
> > Given following iptables ruleset:
> >
> > -P FORWARD DROP
> > -A FORWARD -m sctp --dport 9 -j ACCEPT
> > -A FORWARD -p tcp --dport 80 -j ACCEPT
> > -A FORWARD -p tcp -m conntrack -m state ESTABLISHED,RELATED -j ACCEPT
> >
> > One would assume that this allows SCTP on port 9 and TCP on port 80.
> > Unfortunately, if the SCTP conntrack module is not loaded, this allows
> > *all* SCTP communication, to pass though, i.e. -p sctp -j ACCEPT,
> > which we think is a security issue.
> >
> > This is because on the first SCTP packet on port 9, we create a dummy
> > "generic l4" conntrack entry without any port information (since
> > conntrack doesn't know how to extract this information).
> >
> > All subsequent packets that are unknown will then be in established
> > state since they will fallback to proto_generic and will match the
> > 'generic' entry.
> >
> > Our originally proposed version [1] completely disabled generic protocol
> > tracking, but Jozsef suggests to not track protocols for which a more
> > suitable helper is available, hence we now mitigate the issue for in
> > tree known ct protocol helpers only, so that at least NAT and direction
> > information will still be preserved for others.
> >
> > [1] http://www.spinics.net/lists/netfilter-devel/msg33430.html
> >
> > Joint work with Daniel Borkmann.
> >
> > Signed-off-by: Florian Westphal <fw@strlen.de>
> > Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
>
> Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Applied, thanks.
next prev parent reply other threads:[~2014-09-29 10:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 9:35 [PATCH nf v2] netfilter: conntrack: disable generic tracking for known protocols Florian Westphal
2014-09-26 10:13 ` Jozsef Kadlecsik
2014-09-29 10:31 ` Pablo Neira Ayuso [this message]
2014-10-22 12:08 ` Pablo Neira Ayuso
2014-10-22 12:25 ` Pablo Neira Ayuso
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=20140929103158.GA15475@salvia \
--to=pablo@netfilter.org \
--cc=dborkman@redhat.com \
--cc=fw@strlen.de \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.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.