netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next 0/2] nf_conntrack: validate crc32c on SCTP packets hitting PREROUTING hook
@ 2017-01-02 12:29 Davide Caratti
  2017-01-02 12:29 ` [PATCH nf-next 1/2] netfilter: select LIBCRC32C together with SCTP conntrack Davide Caratti
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Davide Caratti @ 2017-01-02 12:29 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik,
	David S . Miller
  Cc: netfilter-devel, coreteam

unlike what happens with other protcols, conntrack entries are matched by
SCTP packets even when crc32c is incorrect. Moreover, netfilter 'REJECT'
target does not generate any ICMP on reception of SCTP packets, because it
computes RFC 1624 checksum ad compares it with crc32c in the transport
header, resulting in a systematic mismatch.

The above issues can be resolved by implementing .error() callback in SCTP
conntrack helper. Patch 1 of this series lets LIBCRC32C be selected with
NF_CT_PROTO_SCTP, to allow crc32c validation within nf_conntrack. Patch 2
implements .error() callback in nf_conntrack_l4proto_sctp{4,6}: like other
protocols do with the Internet Checksum, sctp_error() validates crc32c in
PREROUTING hook, updates the value of skb->ip_summed and returns the result
of checksum validation to let conntrack core skip corrupted packets.

Davide Caratti (2):
  netfilter: select LIBCRC32C together with SCTP conntrack
  netfilter: conntrack: validate SCTP crc32c in PREROUTING

 net/netfilter/Kconfig                   |  2 +-
 net/netfilter/nf_conntrack_proto_sctp.c | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-05 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-02 12:29 [PATCH nf-next 0/2] nf_conntrack: validate crc32c on SCTP packets hitting PREROUTING hook Davide Caratti
2017-01-02 12:29 ` [PATCH nf-next 1/2] netfilter: select LIBCRC32C together with SCTP conntrack Davide Caratti
2017-01-02 19:10   ` Marcelo Ricardo Leitner
2017-01-02 12:29 ` [PATCH nf-next 2/2] netfilter: conntrack: validate SCTP crc32c in PREROUTING Davide Caratti
2017-01-05 12:25 ` [PATCH nf-next 0/2] nf_conntrack: validate crc32c on SCTP packets hitting PREROUTING hook Pablo Neira Ayuso

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).