Commit Graph

17010 Commits

Author SHA1 Message Date
Tobias Brunner d49ad922c1 conf: Use actually configured path for strongswan.conf
References #2984.
2019-03-27 10:07:16 +01:00
Tobias Brunner 333adbc25b generator: Don't print any tainted values in DBG3 messages for U_INT_4
The bits not written to are marked tainted by valgrind, don't print
them in the debug messages.  Also use more specific printf-specifiers
for other values.
2019-03-27 10:00:09 +01:00
Sheena Mira-ato 69cbe2ca3f trap-manager: Wait for install to finish before uninstalling
There was a race condition between install() and uninstall()
where one thread was in the process of installing a trap
entry, and had destroyed the child_sa, while the other
thread was uninstalling the same trap entry and ended up
trying to destroy the already destroyed child_sa, resulting
in a segmentation fault in the destroy_entry() function.

The uninstall() function needs to wait until all the threads
are done with the installing before proceeding to uninstall
a trap entry.

Closes strongswan/strongswan#131.
2019-03-27 09:38:20 +01:00
Tobias Brunner 6ec9f68f32 sql: Handle %any better when looking up shared secrets
This can be the case for IKEv1 since 419ae9a20a ("ikev1: Default remote
identity to %any for PSK lookup if not configured").

Closes strongswan/strongswan#128.
2019-03-14 13:55:58 +01:00
Tobias Brunner 4f8c00e3ed Merge branch 'nm-ipv6'
Adds support for IPv6 to the NetworkManager backend and plugin.

Fixes #1143, #2586.
2019-03-14 13:46:33 +01:00
Tobias Brunner 398ea12cdb nm: Remove deprecated variables from autogen.sh 2019-03-14 13:42:08 +01:00
Tobias Brunner 05b7f1cbfe charon-nm: Add IPv6 support 2019-03-14 13:42:08 +01:00
Tobias Brunner 0af3a4f103 charon-nm: Handle IPv6 DNS server attributes 2019-03-14 13:42:08 +01:00
Tobias Brunner 0b117dc960 charon-nm: Set local address to %any so IPv6 may be used as outer address 2019-03-14 13:42:08 +01:00
Tobias Brunner 5538e29071 charon-nm: Request virtual IPv6 address and appropriate TS 2019-03-14 13:42:08 +01:00
Tobias Brunner 3567bf60ac nm: Enable IPv6 tab in NM connection dialog 2019-03-14 13:42:08 +01:00
Tobias Brunner 83674787d5 forecast: Only reinject packets that are marked or from the configured interface
This seems to avoid broadcast loops (i.e. processing and reinjecting the
same broadcast packet over and over again) as the packets we send via
AF_PACKET socket are neither marked nor from that interface.
2019-03-14 11:56:20 +01:00
Tobias Brunner 00a953d090 kernel-netlink: Use address labels instead of deprecation for IPv6 virtual IPs
In order to avoid that the kernel uses virtual tunnel IPs for traffic
over physical interfaces we previously deprecated the virtual IP.  While
this is working it is not ideal.  This patch adds address labels for
virtual IPs, which should force the kernel to avoid such addresses to
reach any destination unless there is an explicit route that uses it as
source address.
2019-03-14 11:33:59 +01:00
Tobias Brunner b4a23e3cea Merge branch 'android-updates'
Adds a copy function for VPN profiles and an option to set custom DNS
servers.
2019-03-14 10:56:07 +01:00
Andreas Steffen fa1f4d199e testing: Prolonged Duck end entity certificate 2019-03-13 19:02:42 +01:00
Andreas Steffen 08a7326181 Version bump to 5.8.0dr1 2019-03-13 19:02:42 +01:00
Tobias Brunner 023d47a08a child-create: Add missing space in DH retry log message 2019-03-13 10:30:49 +01:00
Tobias Brunner 7b9a8b3f75 android: New release after adding copy function and DNS server config 2019-03-08 17:08:11 +01:00
Tobias Brunner 347665420b Merge branch 'openssl-chapoly'
Adds support for ChaCha20-Poly1305 via OpenSSL.

Fixes #2946.
2019-03-08 15:56:01 +01:00
Tobias Brunner a21710d380 openssl: Add support for ChaCha20-Poly1305
It's available since OpenSSL 1.1.0.
2019-03-08 15:55:52 +01:00
Tobias Brunner 8fc6b2d0e0 openssl: Generalize the GCM implementation a bit
This will allow us to use the implementation also for other algorithms.
2019-03-08 15:55:52 +01:00
Tobias Brunner 451c2e7d58 Merge branch 'ikev1-redundant-updown'
Avoids calling updown script for redundant CHILD_SAs after IKEv1 rekey
collisions.

Fixes #2902.
2019-03-08 15:52:39 +01:00
Tobias Brunner 7f5cef5d1c ikev1: Don't trigger updown event and close action for redundant CHILD_SAs 2019-03-08 15:49:34 +01:00
Tobias Brunner bbc3d2a016 task-manager-v1: Add utility function to check if CHILD_SA is redundant 2019-03-08 15:49:34 +01:00
Tobias Brunner 090e2cf54c vici: Correctly parse inactivity timeout as uint32_t
Using parse_time() directly actually overwrites the next member in the
child_cfg_create_t struct, which is start_action, which can cause
incorrect configs if inactivity is parsed after start_action.

Fixes #2954.
2019-03-08 15:47:25 +01:00
Tobias Brunner 4ad397ef79 swanctl: Fix documentation of default value of hostaccess 2019-03-07 18:49:29 +01:00
Tobias Brunner 2ef473be15 android: Use helper to parse IP addresses where appropriate 2019-03-05 19:02:05 +01:00
Tobias Brunner 7028e9d31e android: Add helper to parse IP addresses from strings
Using InetAddress.fromName() is not ideal as it might result in a DNS
resolution, which causes an exception if we do it from the main thread.
2019-03-05 18:56:09 +01:00
Tobias Brunner 8e7ad9ace8 android: Make DNS servers configurable in the GUI 2019-03-05 18:17:56 +01:00
Tobias Brunner 1a39c3d98d android: Import DNS servers 2019-03-05 17:45:48 +01:00
Tobias Brunner dd5de792cf android: Use configured custom DNS servers 2019-03-05 17:36:09 +01:00
Tobias Brunner dda8b891dc android: Add properties for DNS servers 2019-03-05 16:51:21 +01:00
Tobias Brunner 94cb3b4ddd android: Add menu option to copy a profile
Some users requests something like that to use different server IPs.
Interestingly, it's actually also possible to configure multiple
hostnames/IPs, separated by commas, as server address in the profile, which
are then tried one after another.

It's also useful when testing stuff to quickly compare the behavior with
some setting changed between two otherwise identical profiles.
2019-03-05 16:40:20 +01:00
Tobias Brunner da4e08909e android: Remove buildToolsVersion
Finally a default is configured and we don't have to update this
constantly.
2019-03-05 15:32:33 +01:00
Tobias Brunner 20fdb2d42b android: Update Gradle plugin 2019-03-05 15:32:33 +01:00
Carl Smith 8e31d65730 child-sa: Remove temporary DROP policy using same parameters as when added
A temporary DROP policy is added to avoid traffic leak
while the SA is being updated. It is added with
manual_prio set but when the temporary policy is removed
it is removed with manual_prio parameter set to 0.
The call to del_policies_outbound does not match the original
policy and we end up with an ever increasing refcount.

If we try to manually remove the policy, it is not removed
due to the positive refcount. Then new SA requests fail with
"unable to install policy out for reqid 1618,
the same policy for reqid 1528 exists"

Fixes: 35ef1b032d ("child-sa: Install drop policies while updating IPsec SAs and policies")
Closes strongswan/strongswan#129.
2019-03-04 09:38:35 +01:00
Tobias Brunner 023cf17a90 load-tester: Update expired CA certificate
Closes strongswan/strongswan#126.
2019-02-28 17:31:43 +01:00
Tobias Brunner 8cafef2e10 travis: OpenSSL version bump 2019-02-26 16:03:28 +01:00
Tobias Brunner d091703a9e agent: Don't keep socket to ssh/gpg-agent open
Instead, create a socket when necessary.  Apparently, it can prevent
the agent from getting terminated (e.g. during system shutdown) if e.g.
charon-nm is still running with an open connection to the agent.
2019-02-20 10:43:19 +01:00
Shmulik Ladkani 71b22c250f vici: Fix wrong argument order for terminate_ike() in clear_start_action()
In 7b7290977 ("controller: Add option to force destruction of an IKE_SA")
the 'force' option was added as 3rd parameter to controller_t::terminate_ike.

However in vici's 'clear_start_action', the argument was incorrectly
placed as the 2nd parameter - constantly sending 0 (FALSE) as the
'unique_id' to terminate, rendering calls to 'handle_start_actions'
having undo=TRUE being unable to terminate the relevant conn.

For example, this is log of such a bogus 'unload-conn':

  strongswan[498]: 13[CFG] vici client 96 requests: unload-conn
  strongswan[498]: 13[CFG] closing IKE_SA #9
  strongswan[498]: 13[IKE] unable to terminate IKE_SA: ID 0 not found
  strongswan[498]: 09[CFG] vici client 96 disconnected

here, the unloaded conn's IKE id was 9, alas 'terminate_ike_execute'
reports failure to terminate "ID 0".

Fix by passing 'id, FALSE' arguments in the correct order.

Fixes: 7b7290977 ("controller: Add option to force destruction of an IKE_SA")
Signed-off-by: Shmulik Ladkani <shmulik@metanetworks.com>
Closes strongswan/strongswan#127.
2019-02-19 17:00:11 +01:00
Tobias Brunner 0f193be23d libimcv: Add Debian 9.7 to IMV database 2019-01-30 12:26:19 +01:00
Tobias Brunner c7f579fa17 kernel-netlink: Fix compilation on old kernels (< 2.6.39) 2019-01-24 10:55:24 +01:00
krinfels 7533cedb9a libtpmtss: Read RSA public key exponent instead of assuming its value
Up to now it was assumed that the RSA public key exponent is equal to 2^16+1.
Although this is probably true in most if not all cases, it is not correct
according to the TPM 2.0 specification.

This patch fixes that by reading the exponent from the structure returned
by TPM2_ReadPublic.

Closes strongswan/strongswan#121.
2019-01-21 11:52:08 +01:00
Tobias Brunner 220b0cb29c unit-tests: Verify that E and emailAddress result in the same ID 2019-01-18 11:15:16 +01:00
Tobias Brunner 6639288b1a Use Botan 2.9.0 for tests 2019-01-16 17:11:46 +01:00
Andreas Steffen eb16352232 Version bump to 5.7.2 2018-12-27 12:11:49 +01:00
Tobias Brunner e4a3ef2e4d Use https:// for URLs in documents
Also adds contribution guidelines (for Github) with links to the wiki.
2018-12-20 16:13:02 +01:00
Andreas Steffen 023b9c0edc Version bump to 5.7.2rc1 2018-12-19 13:21:48 +01:00
Tobias Brunner d1e58e11f7 NEWS: More news for 5.7.2 2018-12-18 14:48:18 +01:00
Tobias Brunner db82c0f594 Fixed some typos, courtesy of codespell 2018-12-18 11:14:19 +01:00