Commit Graph
14970 Commits
Author SHA1 Message Date
Tobias Brunner 25ec2bc43d Don't reference 5.9 in URLs to docs.strongswan.org 2025-03-11 10:26:31 +01:00
Tobias Brunner 378c75cb2e nm: Version bump to 1.6.2 2025-03-11 09:57:54 +01:00
Tobias Brunner fcaee9e123 vici: Document ICMP type/code traffic selector restrictions 2025-03-05 10:55:51 +01:00
Tobias Brunner 4e2cf58961 receiver: Properly clean up if hasher or RNG can't be created 2025-03-04 15:30:25 +01:00
Tobias Brunner 380ec66c92 winhttp: Properly destroy linked list if connection can't be opened 2025-03-04 15:27:53 +01:00
Tobias Brunner a70ba4d600 pkcs11: Free copied name of PKCS#11 module in error cases 2025-03-04 14:48:42 +01:00
Tobias Brunner 8fc09ae158 stream-service: Avoid FD leak during deinitialization 2025-03-04 14:41:03 +01:00
Tobias Brunner 3b0f260b40 gcm: Properly clean up IV generator if crypter can't be created 2025-03-04 14:37:44 +01:00
Tobias Brunner 2cf94745de daemon: Properly clean up logger entries in error cases
The copied target string was not freed.
2025-03-04 14:33:36 +01:00
Tobias Brunner e6b9f82a87 swanctl: Fix memory leak in --load-creds if --clear fails 2025-03-04 14:30:35 +01:00
Tobias Brunner 251582d0b6 vici: Update docs after changing Python build
Fixes: 3babf1f710 ("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
Tobias Brunner 8c1714ba12 Revert "kernel-netlink: Don't fallback to peer address as gateway"
This reverts commit f717bb5249.

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 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: a5e80cf5e4 ("libcharon: Enable make_before_break option by default")
2025-02-28 16:27:10 +01:00
michael-devandTobias Brunner 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 <[email protected]>
Co-authored-by: Tobias Brunner <[email protected]>
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 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
Tobias BrunnerandThomas Egerer 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 <[email protected]>
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 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 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 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 e4d6bcef48 android: Move annotation to method where startActivityAndCollapse() is called
Fixes: 5237bf3a5c ("android: Suppress deprecation warning because of startActivityAndCollapse()")
2025-02-20 11:59:55 +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
Tobias Brunner 19925fd893 unit-tests: Document additional supported env variables 2025-02-10 15:41:52 +01:00
Tobias Brunner 4e634f4511 nm: Add German translation for traffic selector fields 2025-02-07 12:01:00 +01:00
Jiří Matěják 418ef2a7a1 nm: Expose local-ts
Signed-off-by: Jiří Matěják <[email protected]>
2025-02-06 21:01:50 +01:00
Jiří Matěják d0dd7b561b nm: Expose remote-ts
Signed-off-by: Jiří Matěják <[email protected]>
2025-02-06 21:00:48 +01:00
Tobias Brunner 9aa2be8411 charon-nm: Add option to configure local traffic selectors
Closes strongswan/strongswan#2084
2025-02-06 17:20:25 +01:00
Tobias Brunner a50ed3006e dhcp: Add option to bind the receive socket to a different interface
This can be useful if the DHCP server runs on the same server. On Linux,
the response is then sent via `lo`, so packets won't be received if both
sockets are bound to e.g. a bridge interface.
2025-01-31 11:20:42 +01:00
Tobias Brunner 00d8c36d6f pf-handler: Correctly bind packet socket to an interface
Binding such sockets via SO_BINDTODEVICE does not work at all. Instead,
bind() has to be used, as described in the packet(7) man page.
2025-01-31 11:20:32 +01:00