netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IPSEC: tunnel breakage with out-of-order IPv4 fragments
@ 2014-07-10 14:57 Karl Heiss
  2014-07-10 15:11 ` Karl Heiss
  2014-07-11 11:00 ` Steffen Klassert
  0 siblings, 2 replies; 11+ messages in thread
From: Karl Heiss @ 2014-07-10 14:57 UTC (permalink / raw)
  To: netdev

I believe I have found an issue whereby IPv4 fragments arriving
out-of-order will cause an IPSEC tunnel to stop passing any traffic
which arrived fragmented, citing 'SA-icv-failure'.  Packets which were
not fragmented will validate and pass successfully, even once the
condition has been triggered.  I have decrypted the traffic and have
verified that the traffic is arriving correctly.  It appears as if the
condition persists until all connections are closed.

The issue was originally discovered in RHEL 6.5 (2.6.32-431.11.2.el6)
kernel and verified with Fedora 20 running 3.15.0-rc8-nn on x86_64.

The easiest way I have found to reproduce the issue is to use a kernel
without commit c08751c851b78514f6ec5 (Fix data chunk fragmentation for
MTU values which are not multiple of 4) to generate fragmented SCTP
traffic using multiple single-homed connections.  This can be easily
done by running the following command a few times (in parallel) on the
traffic generator:

    dd if=/dev/zero bs=4096 count=100000 | ncat -d 0.02 --sctp -s
<local_ip> <remote_ip> 60000

On the remote end, setup a listener:

    ncat --sctp -l -k -p 60000 > /dev/null

At this point, you should be able to see audit.log errors to the effect of:

type=MAC_IPSEC_EVENT msg=audit(1404931490.964:872): op=SA-icv-failure
src=10.240.34.75 dst=10.240.34.85 spi=101378814(0x60aeafe) seqno=38605
type=MAC_IPSEC_EVENT msg=audit(1404931490.964:873): op=SA-icv-failure
src=10.240.34.75 dst=10.240.34.85 spi=101378814(0x60aeafe) seqno=38607
type=MAC_IPSEC_EVENT msg=audit(1404931490.964:874): op=SA-icv-failure
src=10.240.34.75 dst=10.240.34.85 spi=101378814(0x60aeafe) seqno=38606

I have packet captures and matching audit logs for those interested.
Any help would be greatly appreciated.

Regards,
Karl

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

end of thread, other threads:[~2014-07-16 12:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-10 14:57 IPSEC: tunnel breakage with out-of-order IPv4 fragments Karl Heiss
2014-07-10 15:11 ` Karl Heiss
2014-07-11 11:00 ` Steffen Klassert
2014-07-11 12:51   ` Karl Heiss
2014-07-14  9:33     ` Steffen Klassert
2014-07-14 11:52       ` Karl Heiss
2014-07-15  9:16         ` Steffen Klassert
2014-07-15 12:13           ` Karl Heiss
2014-07-16 10:59             ` Steffen Klassert
2014-07-16 11:49               ` Karl Heiss
2014-07-16 12:26                 ` Karl Heiss

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