19321 Commits

Author SHA1 Message Date
Tobias Brunner
251582d0b6 vici: Update docs after changing Python build
Fixes: 3babf1f7108d ("vici: Update Python build")
2025-03-04 13:52:24 +01:00
Tobias Brunner
511add2111 Fixed some typos, courtesy of codespell 2025-03-04 13:43:31 +01:00
Andreas Steffen
61c0006002 Version bump to 6.0.1rc1 6.0.1rc1 2025-03-03 10:10:03 +01:00
Tobias Brunner
8c1714ba12 Revert "kernel-netlink: Don't fallback to peer address as gateway"
This reverts commit f717bb5249caea550bc6e2baeb09ca309ad83b39.

Causes issues in our testing environment. Default route via host is
preferred if no gateway is set in the installed routes.  Needs some
investigation.

References strongswan/strongswan#2548
2025-03-03 09:46:14 +01:00
Tobias Brunner
de30b6b385 charon-nm: Lower default retransmission settings to restore SAs more quickly
These are the same values we use for the Android app.

References strongswan/strongswan#2696
2025-02-28 16:47:05 +01:00
Tobias Brunner
8e97e20642 charon-nm: Use a DPD to check the current path
If the client's network goes down for a while but the same IP address
is assigned later, it won't be aware if the server killed the IKE_SA
while it wasn't reachable.  This way, a DPD is triggered and the client
can reestablish the SA if necessary.  When roaming to a different IP,
a MOBIKE update is triggered with the same effect.

References strongswan/strongswan#2696
2025-02-28 16:46:50 +01:00
Tobias Brunner
af0535894c conf: Document some global options for charon-nm
These have specific values for charon-nm's use case but might have to be
changed for special setups or because of conflicts.

References strongswan/strongswan#2683
2025-02-28 16:46:43 +01:00
Tobias Brunner
7205d02360 conf: Add missing modules to install config snippets
In particular the one for charon-nm was missing.

References strongswan/strongswan#2683
2025-02-28 16:45:33 +01:00
Tobias Brunner
069a81e69a ikev2: Trigger ike_reestablish_pre|post events for make-before-break reauth
Listeners can't track those IKE_SAs otherwise.  For break-before-make
reauthentications, these events are already triggered because that is
implemented by calling reestablish() on the old IKE_SA.
2025-02-28 16:27:10 +01:00
Tobias Brunner
660e06b048 ike-sa: Fix check for make-before-break when handling DELETE failure
Fixes: a5e80cf5e451 ("libcharon: Enable make_before_break option by default")
2025-02-28 16:27:10 +01:00
michael-dev
bff500dfd0 ike-natd: Float to the NAT-T port early when not connecting to port 500
When using port 4500 for IKE_SA_INIT, Windows Server 2016, 2025 and
possibly others send back all packets to the port initially used by the
client, not the one floated to before sending IKE_AUTH. So if UDP
encapsulation is used, no traffic can be received as the initial socket
can't have UDP decapsulation enabled.

tcpdump output:
```
IP <client-ip>.47547 > <server-ip>.4500: UDP-encap: ESP(spi=0xfd4e5fc2,seq=...)
IP <server-ip>.4500 > <client-ip>.57962: UDP-encap: ESP(spi=0xccc5e213,seq=...)
```

Avoid this by floating early if a non-default destination port is used.
This also ensures we don't send packets from port 500 (without non-ESP
marker) if ephemeral source ports are not used.

Closes strongswan/strongswan#2664

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
Co-authored-by: Tobias Brunner <tobias@strongswan.org>
2025-02-28 16:25:32 +01:00
Tobias Brunner
882b19c1df ike-sa: Only query last use time of CHILD_SAs if UDP-encap is used
Without UDP-encapsulation, the IKE and ESP traffic is not directly related
(other than via IPs), so firewalls might no keep the state for IKE traffic
alive if there is no IKE traffic for a while and constant ESP traffic
prevents DPDs from being exchanged because inbound ESP traffic is
considered.

Closes strongswan/strongswan#1759
2025-02-28 16:19:02 +01:00
Tobias Brunner
57703fa089 eap-radius: Add support to specify and bind a specific source address
Using a specific address can be useful in scenarios where dynamic routing
could change the path to the RADIUS server and a changing source address
is a problem for the server.

Closes strongswan/strongswan#2598
2025-02-28 16:16:48 +01:00
Tobias Brunner
c3ae859b9b Merge branch 'ha-multi-ke'
Adds support for multiple key exchanges to the ha plugin.  Also,
because of the delayed key derivation and the not synced IntAuth
values, incomplete IKE_SAs are now destroyed during a failover.

Closes strongswan/strongswan#2550
2025-02-28 16:11:59 +01:00
Tobias Brunner
97bd0e2297 ha: Destroy incomplete IKE_SAs after de-/activating a segment
The node that gets activated usually won't be able to complete the
IKE_SA mainly because the IKE keys are now derived delayed, so the key
material required to process a message often won't be available (only
later IKE_AUTH messages and retransmits of earlier messages that the
active node already received and synced the keys for may be decrypted).

A second issue affects IKE_SAs with multiple key exchanges.  Because the
IntAuth value(s) are currently not synced, which are necessary to
verify/create the AUTH payloads, the IKE_AUTH exchange couldn't be
completed.
2025-02-28 16:02:41 +01:00
Jean-François Hren
fd6ac87fc3 testing: Add ha/active-passive-multi-ke scenario 2025-02-28 16:02:41 +01:00
Tobias Brunner
e7848e36fa ha: Add support to sync IKE and Child SAs with multiple key exchanges
Synchronization for the additional transforms in the IKE and Child SA
proposals is added.  Details of the IKE_SA synchronization are changed
to support IKE_INTERMEDIATE exchanges that cause multiple HA_IKE_ADD
messages and key derivations.  The cache has been extended to handle
multiple such messages.

Co-authored-by: Thomas Egerer <thomas.egerer@secunet.com>
2025-02-28 16:02:41 +01:00
Tobias Brunner
f717bb5249 kernel-netlink: Don't fallback to peer address as gateway
This doesn't really seem useful (perhaps it was before we started to
configure the outbound interface on our routes). And it can actually
cause the route installation to fail e.g. for routes over point-to-point
interfaces where we'd get "Error: Nexthop has invalid gateway" errors.

Closes strongswan/strongswan#2548
2025-02-28 16:01:49 +01:00
Tobias Brunner
9c97ecbb31 scripts: Add support for out-of-tree builds to test script
Can be useful when using the script locally.
2025-02-28 14:21:49 +01:00
Tobias Brunner
e385a83f5e vici: Fix out-of-tree builds with Perl module enabled
Not really building it out-of-tree for now, though.
2025-02-28 14:21:49 +01:00
Tobias Brunner
fad99c7a88 github: Explicitly install required packages for Linux builds
The runner images have some software pre-installed, which isn't the
case on regular Ubuntu images.
2025-02-28 14:21:41 +01:00
Tobias Brunner
8e4ea2cbbd github: Use all available CPU cores when building 2025-02-28 12:55:12 +01:00
Tobias Brunner
8c4e9f8c7b github: Call Botan configure script directly
This should find the required Python binary automatically (`python` might
not be available if not explicitly installed).
2025-02-28 12:55:12 +01:00
Tobias Brunner
f740faccac github: Don't use pip3 to install Python packages anymore
Currently, the runner images enable break-system-packages globally.
However, this workaround will be removed by the end of March.  So
we switch to installing these packages as intended via distro (the
alternative would be to use pipx, at least for tox).
2025-02-28 12:55:12 +01:00
Tobias Brunner
0bce9839c9 Merge branch 'android-reauth-fix'
Fixes issues with reauthentication, in particular, to reestablish the
SA if MOBIKE is disabled.  The app currently can't handle
make-before-break reauthentication.  In part because necessary events are
currently not triggered.  So for now, we switch back to the classic
reauthentication approach.
android-2.5.4
2025-02-27 11:23:52 +01:00
Tobias Brunner
a299a4d3ce android: New release after fixing reauthentication regression 2025-02-25 15:21:56 +01:00
Tobias Brunner
40a37b6ffc android: Disable make-before-break reauthentication
The service implementation with its handling of reauth callbacks and
no-DNS TUN device etc. can't handle make-before-break reauthentication
at the moment.
2025-02-25 14:57:00 +01:00
Tobias Brunner
9d4decbde8 github: Remove runs on Ubuntu 20.04
They will start to fail on certain days in March before the images are
removed on April 1st.
2025-02-21 14:46:08 +01:00
Tobias Brunner
5468759c71 github: Check test vectors with output in crypto plugin tests
This way we see what was actually tested. Increasing the verbosity for
the general test run produces too much output.
2025-02-21 14:13:26 +01:00
Tobias Brunner
31c44a758f test-vectors: Add a soft dependency on DRBG used for KEM tests
Depending on the loaded plugins, it's not necessary. So it's not a hard
dependency.
2025-02-21 11:06:17 +01:00
Tobias Brunner
e12540025d gmp: Declare dependency on DRBG to generate private keys 2025-02-21 11:06:02 +01:00
Tobias Brunner
ff50db8758 cirrus: Use FreeBSD 13.4 and 14.2 2025-02-20 16:30:11 +01:00
Tobias Brunner
1f0dd8d585 github: Use OpenSSL 3.4.1 for tests
There was an issue with OPENSSL_armcap_P in Android's static build for
OpenSSL 3.1.1+. This was finally fixed with this release (and was also
backported to older versions).
2025-02-20 16:30:11 +01:00
Tobias Brunner
827c572efd github: Use AWS-LC 1.46.1 for tests 2025-02-20 11:59:55 +01:00
Tobias Brunner
e4d6bcef48 android: Move annotation to method where startActivityAndCollapse() is called
Fixes: 5237bf3a5c6f ("android: Suppress deprecation warning because of startActivityAndCollapse()")
2025-02-20 11:59:55 +01:00
Tobias Brunner
b93141985b Merge branch 'android-passwords'
Adds support to import passwords via managed configuration and profile
files. Also fixes several deprecation warnings.

Closes strongswan/strongswan#2589
Closes strongswan/strongswan#2642
Closes strongswan/strongswan#2643
android-2.5.3
2025-02-20 11:08:29 +01:00
Tobias Brunner
f0f986c55d android: New release after adding support for passwords in managed configs and profile files
Also fixes some bugs and deprecation warnings.
2025-02-18 14:19:40 +01:00
Tobias Brunner
a47e282d09 android: Imported VPN profile files may contain passwords
A warning is displayed to the users, reminding them that there is a
cleartext password in the file.
2025-02-18 14:12:43 +01:00
Tobias Brunner
0b6d42661d android: Consistently use *Start/End in layouts and remove redundant old settings 2025-02-18 14:12:43 +01:00
Tobias Brunner
b021406f6b android: Suppress deprecation warning because of stopForeground() 2025-02-18 14:12:43 +01:00
Tobias Brunner
5237bf3a5c android: Suppress deprecation warning because of startActivityAndCollapse() 2025-02-18 14:12:43 +01:00
Tobias Brunner
4e2c88f7ed android: Handle deprecated getParcelable* and getSerializable methods 2025-02-18 14:12:43 +01:00
Tobias Brunner
288bd41aca android: Suppress warning in implementation only used for Android < 33 2025-02-18 14:12:43 +01:00
Tobias Brunner
26eef1f095 android: Replace deprecated onBackPressed() and enable predictive back gestures
Doesn't really make a difference it seems.
2025-02-18 14:12:43 +01:00
Tobias Brunner
9a92088bb4 android: Replace deprecated fragment menu APIs 2025-02-18 14:12:43 +01:00
Tobias Brunner
10d8b66f05 android: Ignore empty strings for settings in managed profiles
Unspecified settings should be set to null, while some MDMs might send
them as empty strings, which could cause issues (like an empty password
or trying to parse an empty DNS server address).
2025-02-18 14:12:43 +01:00
Tobias Brunner
4f808cb2b0 android: Allow setting the password in managed profiles
To avoid complicated changes in the UI, users can still update it.  But
the default, if they clear the field, will be the managed password.
2025-02-18 14:12:43 +01:00
Tobias Brunner
87610799f2 android: Properly deinit library if parsing an IP fails
This can happen with empty strings, which might be set for managed
profiles, which caused the refcounting to be askew and the resolver not
to work after connecting once because it was flushed and disabled.
2025-02-18 14:12:43 +01:00
Tobias Brunner
ff2010c8da android: Update NDK version and enable support for 16KiB page tables 2025-02-18 14:12:43 +01:00
Tobias Brunner
e6b040265d android: Fix updating password for managed profiles
Without data source set on the profile, this caused the app to crash
with a null pointer dereference when it is updated.
2025-02-18 14:12:43 +01:00