Tobias Brunner [Fri, 21 Jun 2013 15:03:35 +0000 (17:03 +0200)]
Merge branch 'kernel-libipsec'
Adds a new kernel interface plugin that uses TUN devices and libipsec to
provide IPsec process in userland.
It works on Linux, FreeBSD and Mac OS X. In particular the latter two
platforms may gain from this approach as their respective kernels don't
provide support for AES-GCM.
kernel-pfroute has been improved (source address lookup) and a second
plugin (osx-attr) installs configuration attributes (currently DNS
servers only) via SystemConfiguration on Mac OS X.
Tobias Brunner [Tue, 18 Jun 2013 14:55:03 +0000 (16:55 +0200)]
kernel-pfroute: struct sockaddr arguments are 4 byte aligned
This was noticed on Mac OS X where, if the default route is returned,
RTA_NETMASK has sa_len set to 0, but skipping zero bytes to read the
next address makes no sense, of course. Using 0 for sa_len seems
a bit strange, in particular, because struct sockaddr has by definition
a minimum length of 16 bytes. But it seems FreeBSD actually does the
same.
Tobias Brunner [Wed, 12 Jun 2013 14:13:32 +0000 (16:13 +0200)]
printf-hook: Avoid double-free when freeing Vstr config
Thread-specific objects get freed when the thread value object is
destroyed (wasn't the case earlier, i.e. before 2b19dd35), which
may cause the second call to vstr_free_conf() to fail in an assert
in Vstr (depending on how it was built).
Tobias Brunner [Fri, 21 Jun 2013 12:46:17 +0000 (14:46 +0200)]
plugin-loader: Move logging of failed features to status()
Still log an error message if critical features fail, as loaded
plugins/features are not logged in that case.
This way loaded plugins are printed before failed features and
the relation is easier to make for users. It also allows programs
to log this message on a different level.
Martin Willi [Fri, 21 Jun 2013 08:39:16 +0000 (10:39 +0200)]
Merge branch 'unit-tests-ecdsa'
Adds support for testing plugin functionality to test-runner. Introduces some
good/bad tests for ECDSA/RSA which would have caught those RSA/ECDSA signature
vulnerabilities.
Martin Willi [Thu, 20 Jun 2013 08:06:07 +0000 (10:06 +0200)]
leak-detective: (re-)whitelist some OpenSSL functions
Some static allocations in plugins won't get freed, because in the test case
process the plugins are not destroyed. If a plugin would clean up allocations
done while just using the plugin, these show up as leak in the child process,
letting tests fail.
Martin Willi [Wed, 19 Jun 2013 14:36:27 +0000 (16:36 +0200)]
Merge branch 'nat-transport'
Enable transport mode in NAT situations when using IKEv2. Additionally brings
an extended leftsubnet format, where each subnet can take a separate protocol
and port.
Martin Willi [Wed, 5 Jun 2013 09:43:19 +0000 (11:43 +0200)]
stroke: support %dynamic in left/rightsubnet for dynamic selectors
This has the same meaning as omitting left/rightsubnet, i.e. replace it
by the IKE address. Supporting %dynamic allows configurations with multiple
dynamic selectors in a left/rightsubnet, each with potentially different
proto/port selectors.
Martin Willi [Wed, 5 Jun 2013 09:39:35 +0000 (11:39 +0200)]
kernel-netlink: install selectors on SA for transport/BEET mode without proto/port
If a transport/BEET SA has different selectors for different proto/ports,
installing just the proto/port of the first SA would break any additional
selector.
Martin Willi [Wed, 19 Jun 2013 14:31:06 +0000 (16:31 +0200)]
Merge branch 'consistent-reqid'
Checks if a trap policy exists when installing a CHILD_SA as responder,
reuse that reqid and keeping the trap untouched. This makes auto=route on
both sides more reliable.
In addition, we no prevent to refcount an existing policy if the reqid differs;
this should not happen anymore. We now can properly reject new CHILD_SAs in
such conflicts, instead of silently breaking an existing policy.
Martin Willi [Tue, 11 Jun 2013 14:11:14 +0000 (16:11 +0200)]
ike: reuse the reqid of an installed trap having the same config
When we have a trap installed, but a CHILD_SA gets established for the same
config from the peer, we should reuse the same reqid. Otherwise we would have
two identical policies using different reqids, what we can't handle in our
kernel backend.
Martin Willi [Mon, 3 Jun 2013 16:13:27 +0000 (18:13 +0200)]
kernel-netlink: reject policy refcount if the reqid differs
Previously we silently replaced an existing policy with a new one if the
reqid changed for the same selectors. This will break an old policy in the
favour of the new one (for example if two clients behind the same NAT use
transport mode).
With this change any new policy gets rejected if the reqid differs. This will
make sure we break no existing policy. For rekeying and acquires we still can
have overlapping policies (as we use the same reqid), but for unrelated
connections this is not true anymore (it wasn't actually before, we just
silently broke the existing policy).