]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
11 months agokeymat_v2: Support key derivation with multiple key exchanges
Tobias Brunner [Thu, 9 Apr 2020 09:37:52 +0000 (11:37 +0200)] 
keymat_v2: Support key derivation with multiple key exchanges

11 months agokey-exchange: Add helper to concatenate shared secrets of several key exchanges
Tobias Brunner [Thu, 9 Apr 2020 09:36:30 +0000 (11:36 +0200)] 
key-exchange: Add helper to concatenate shared secrets of several key exchanges

11 months agokeymat_v2: Proper cleanup if derive_ike_keys() is called multiple times
Tobias Brunner [Thu, 28 Jun 2018 13:33:35 +0000 (15:33 +0200)] 
keymat_v2: Proper cleanup if derive_ike_keys() is called multiple times

11 months agoike-auth: Calculate and collect IntAuth for IKE_INTERMEDIATE exchanges
Tobias Brunner [Tue, 20 Aug 2019 15:07:55 +0000 (17:07 +0200)] 
ike-auth: Calculate and collect IntAuth for IKE_INTERMEDIATE exchanges

The message ID of the first IKE_AUTH exchange is a safe-guard against
potential truncation attacks if IKE_INTERMEDIATE exchanges are not used
for multiple key exchanges but some other future use where the number of
exchanges might not depend on the selected proposal.

11 months agopubkey-authenticator: Handle IntAuth data
Tobias Brunner [Tue, 20 Aug 2019 14:38:01 +0000 (16:38 +0200)] 
pubkey-authenticator: Handle IntAuth data

11 months agopsk-authenticator: Handle IntAuth data
Tobias Brunner [Tue, 20 Aug 2019 14:36:13 +0000 (16:36 +0200)] 
psk-authenticator: Handle IntAuth data

11 months agoeap-authenticator: Handle IntAuth data
Tobias Brunner [Tue, 20 Aug 2019 14:32:17 +0000 (16:32 +0200)] 
eap-authenticator: Handle IntAuth data

11 months agokeymat_v2: Include optional IntAuth in signed octets
Tobias Brunner [Tue, 20 Aug 2019 14:18:05 +0000 (16:18 +0200)] 
keymat_v2: Include optional IntAuth in signed octets

11 months agoauthenticator: Add optional method to set IntAuth data
Tobias Brunner [Tue, 20 Aug 2019 14:13:11 +0000 (16:13 +0200)] 
authenticator: Add optional method to set IntAuth data

11 months agomessage: Store original encrypted payload when generating fragments
Tobias Brunner [Mon, 19 Jul 2021 15:12:09 +0000 (17:12 +0200)] 
message: Store original encrypted payload when generating fragments

If we don't do this, get_plain() will fail after generating the message
fragmented unless it was generated non-fragmented previously.

11 months agomessage: Add method to generate data to authenticate IKE_INTERMEDIATE exchanges
Tobias Brunner [Tue, 20 Aug 2019 12:57:30 +0000 (14:57 +0200)] 
message: Add method to generate data to authenticate IKE_INTERMEDIATE exchanges

11 months agogenerator: Make pointer to length field optional
Tobias Brunner [Tue, 20 Aug 2019 12:53:16 +0000 (14:53 +0200)] 
generator: Make pointer to length field optional

Only useful if we generate an IKE header.

11 months agokeymat_v2: Add method to calculate IntAuth for IKE_INTERMEDIATE exchanges
Tobias Brunner [Tue, 2 Jul 2019 13:01:26 +0000 (15:01 +0200)] 
keymat_v2: Add method to calculate IntAuth for IKE_INTERMEDIATE exchanges

11 months agomessage: Add rules for IKE_FOLLOWUP_KE exchanges
Tobias Brunner [Fri, 3 Apr 2020 13:10:40 +0000 (15:10 +0200)] 
message: Add rules for IKE_FOLLOWUP_KE exchanges

11 months agoike-header: Add IKE_FOLLOWUP_KE exchange type
Tobias Brunner [Fri, 3 Apr 2020 13:01:17 +0000 (15:01 +0200)] 
ike-header: Add IKE_FOLLOWUP_KE exchange type

11 months agonotify-payload: Add notify types for multiple key exchanges
Tobias Brunner [Fri, 25 Oct 2019 12:27:47 +0000 (14:27 +0200)] 
notify-payload: Add notify types for multiple key exchanges

11 months agoikev2: Reject IKE_INTERMEDIATE requests after IKE_AUTH
Tobias Brunner [Tue, 8 Feb 2022 13:23:37 +0000 (14:23 +0100)] 
ikev2: Reject IKE_INTERMEDIATE requests after IKE_AUTH

We currently only support these exchanges for additional key exchanges,
so once we have the final keys derived and the ike-init task is removed,
we don't expect any more of them.

11 months agomessage: Add rules for IKE_INTERMEDIATE exchanges
Tobias Brunner [Fri, 25 Oct 2019 12:40:35 +0000 (14:40 +0200)] 
message: Add rules for IKE_INTERMEDIATE exchanges

11 months agoike-header: Add IKE_INTERMEDIATE exchange type
Tobias Brunner [Fri, 25 Oct 2019 12:39:54 +0000 (14:39 +0200)] 
ike-header: Add IKE_INTERMEDIATE exchange type

11 months agonotify-payload: Add notify type for IKE_INTERMEDIATE exchange
Tobias Brunner [Wed, 18 Dec 2019 17:42:59 +0000 (18:42 +0100)] 
notify-payload: Add notify type for IKE_INTERMEDIATE exchange

11 months agoproposal-substructure: Encode additional key exchange methods
Tobias Brunner [Fri, 25 Oct 2019 12:55:05 +0000 (14:55 +0200)] 
proposal-substructure: Encode additional key exchange methods

11 months agoproposal: Make all key exchange transforms optional in ESP/AH proposals
Tobias Brunner [Tue, 5 Nov 2019 09:22:36 +0000 (10:22 +0100)] 
proposal: Make all key exchange transforms optional in ESP/AH proposals

11 months agoproposal: Skip all KE transforms if PROPOSAL_SKIP_KE given
Tobias Brunner [Tue, 29 Oct 2019 10:50:00 +0000 (11:50 +0100)] 
proposal: Skip all KE transforms if PROPOSAL_SKIP_KE given

11 months agotransform: Add helper to check if transform type negotiates key exchange
Tobias Brunner [Tue, 29 Oct 2019 10:46:22 +0000 (11:46 +0100)] 
transform: Add helper to check if transform type negotiates key exchange

11 months agotransform: Add additional key exchange transform types
Tobias Brunner [Fri, 25 Oct 2019 12:20:59 +0000 (14:20 +0200)] 
transform: Add additional key exchange transform types

11 months agokernel-pfkey: Fix list of extension type names on FreeBSD
Tobias Brunner [Mon, 29 Jul 2024 12:36:32 +0000 (14:36 +0200)] 
kernel-pfkey: Fix list of extension type names on FreeBSD

The list was extended earlier this year.

11 months agoMerge branch 'sa-dir'
Tobias Brunner [Wed, 7 Aug 2024 12:59:55 +0000 (14:59 +0200)] 
Merge branch 'sa-dir'

Configures the direction of IPsec SAs in the Linux kernel if
possible (6.10+).

11 months agokernel-netlink: Set replay window 0 if kernel supports SA direction attribute
Tobias Brunner [Tue, 30 Apr 2024 13:12:22 +0000 (15:12 +0200)] 
kernel-netlink: Set replay window 0 if kernel supports SA direction attribute

The kernel now allows a 0 replay window with ESN for SAs that are
explicitly tagged as outbound SAs.  But not just that, it actually
rejects outbound SAs with replay windows > 0.  So we add a version check
to control the replay window size.  Note that adding the attribute
unconditionally would be fine even for older kernels, but if somebody
backports the direction patches, the installation of outbound SAs might
fail if the replay window is not adjusted accordingly.

11 months agokernel-netlink: Add SA direction attribute
Tobias Brunner [Tue, 30 Apr 2024 09:39:00 +0000 (11:39 +0200)] 
kernel-netlink: Add SA direction attribute

11 months agokernel-netlink: Only disable DF-flag copying on outbound SAs
Tobias Brunner [Tue, 30 Apr 2024 13:11:12 +0000 (15:11 +0200)] 
kernel-netlink: Only disable DF-flag copying on outbound SAs

This will cause errors on inbound SAs if the SA direction attribute is
used.

11 months agokernel-netlink: Add missing names for XFRM message types and attributes
Tobias Brunner [Tue, 7 May 2024 08:07:17 +0000 (10:07 +0200)] 
kernel-netlink: Add missing names for XFRM message types and attributes

11 months agoinclude: Update XFRM header for SA direction attribute
Tobias Brunner [Tue, 30 Apr 2024 09:09:41 +0000 (11:09 +0200)] 
include: Update XFRM header for SA direction attribute

11 months agoike-sa: Add address family specific configuration of fragment size
Thomas Egerer [Fri, 2 Aug 2024 11:47:13 +0000 (11:47 +0000)] 
ike-sa: Add address family specific configuration of fragment size

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
11 months agoandroid: Fix import of an already existing VPN profile
Tobias Brunner [Wed, 7 Aug 2024 06:58:12 +0000 (08:58 +0200)] 
android: Fix import of an already existing VPN profile

11 months agoMerge branch 'android-14' android-2.5.2
Tobias Brunner [Tue, 6 Aug 2024 16:02:18 +0000 (18:02 +0200)] 
Merge branch 'android-14'

Updates target SDK to Android 14 (34) and fixes compatibility issues.

11 months agoandroid: New release after updating target SDK and fixing some compatibility issues
Tobias Brunner [Mon, 5 Aug 2024 12:52:30 +0000 (14:52 +0200)] 
android: New release after updating target SDK and fixing some compatibility issues

11 months agoandroid: Increase targetSdkVersion to 34 (Android 14)
Tobias Brunner [Mon, 5 Aug 2024 12:31:32 +0000 (14:31 +0200)] 
android: Increase targetSdkVersion to 34 (Android 14)

11 months agoandroid: Avoid using deprecated ViewCompat methods
Tobias Brunner [Mon, 5 Aug 2024 12:16:51 +0000 (14:16 +0200)] 
android: Avoid using deprecated ViewCompat methods

11 months agoandroid: Replace deprecated Observer/Observable with PropertyChangeListener etc.
Tobias Brunner [Mon, 5 Aug 2024 09:51:40 +0000 (11:51 +0200)] 
android: Replace deprecated Observer/Observable with PropertyChangeListener etc.

Kinda misusing the interface as there is no specific property, but
otherwise seems like a 1:1 replacement.

11 months agoandroid: Add workaround for a bug preventing background service starts from TileService
Tobias Brunner [Mon, 5 Aug 2024 09:02:49 +0000 (11:02 +0200)] 
android: Add workaround for a bug preventing background service starts from TileService

When targeting Android 14, we get a "Background activity launch blocked!"
exception when trying to start the connection in the background (closing
the drawer works).  Which is apparently a bug:

  https://issuetracker.google.com/issues/305035828

The workaround here is kinda ugly.  In particular, because it's not
possible anymore since a few versions to open a dialog that allows users
to directly grant the required permission to the app.  We can only open
the generic settings dialog where users have to search for the app and
grant the permission themselves (we could add a dialog with an explanation
similar to the one for the power whitelist if necessary).  Hopefully this
gets fixed at some point (the current beta of Android 15 still has the
same bug, though).

11 months agoandroid: Use PendingIntent-version of startActivityAndCollapse()
Tobias Brunner [Mon, 5 Aug 2024 08:47:10 +0000 (10:47 +0200)] 
android: Use PendingIntent-version of startActivityAndCollapse()

The other version has been deprecated and throws an exception when
targeting Android 14+.

11 months agoandroid: Explicitly mark receiver as not exported during registration
Tobias Brunner [Mon, 5 Aug 2024 08:35:05 +0000 (10:35 +0200)] 
android: Explicitly mark receiver as not exported during registration

11 months agoandroid: Declare foreground service type for VpnService instance
Tobias Brunner [Tue, 30 Jul 2024 13:18:22 +0000 (15:18 +0200)] 
android: Declare foreground service type for VpnService instance

Required for Android 14 (34).  Since no other type fits we use specialUse,
which also requires a new permission and a description for why we use it.

11 months agoandroid: Fix label for name field in managed profiles
Tobias Brunner [Mon, 5 Aug 2024 12:39:17 +0000 (14:39 +0200)] 
android: Fix label for name field in managed profiles

The field is not actually optional.

11 months agoandroid: Fix crash when opening list of apps for new profiles
Tobias Brunner [Mon, 5 Aug 2024 09:16:39 +0000 (11:16 +0200)] 
android: Fix crash when opening list of apps for new profiles

Fixes: 150dc5ab6401 ("android: Make selected apps read-only")
11 months agoandroid: Update dependencies
Tobias Brunner [Tue, 16 Jul 2024 14:36:36 +0000 (16:36 +0200)] 
android: Update dependencies

11 months agoandroid: Update Gradle plugin
Tobias Brunner [Tue, 16 Jul 2024 08:59:06 +0000 (10:59 +0200)] 
android: Update Gradle plugin

11 months agoinit: Add `Wants=` dependencies to systemd units
Matteo Carnelos [Thu, 6 Jun 2024 13:54:11 +0000 (15:54 +0200)] 
init: Add `Wants=` dependencies to systemd units

If no other units have dependencies on network-online.target or
syslog.target they might not get initialized resulting in a possibly
non-ideal startup order.

Closes strongswan/strongswan#2279

12 months agoike-auth: Default IDi/IDr to subject DN instead of IP if a certificate is available
Tobias Brunner [Wed, 17 Jul 2024 13:31:51 +0000 (15:31 +0200)] 
ike-auth: Default IDi/IDr to subject DN instead of IP if a certificate is available

This avoids sending a likely unconfirmed identity if no identity is
configured and received (in case of IDr).

Closes strongswan/strongswan#2353

12 months agoike-sa: Assign function pointers for mediation extension separately
Tobias Brunner [Fri, 26 Jul 2024 16:07:23 +0000 (18:07 +0200)] 
ike-sa: Assign function pointers for mediation extension separately

Using preprocessor directives in calls of function-like macros is
not recommended as it might lead to undefined behavior.

12 months agoMerge branch 'vici-reload-actions'
Tobias Brunner [Tue, 30 Jul 2024 08:26:21 +0000 (10:26 +0200)] 
Merge branch 'vici-reload-actions'

This improves the behavior when reloading or unloading connections that
have `start` included in their `start_actiton`.

Closes strongswan/strongswan#2324

12 months agotesting: Add ikev2/start-action-start scenario
Tobias Brunner [Fri, 26 Jul 2024 14:56:32 +0000 (16:56 +0200)] 
testing: Add ikev2/start-action-start scenario

This tests the behavior for configs with start_action=start during
reloads of the config (updates/removal).

12 months agovici: Improve handling of start action when reloading configs
Tobias Brunner [Thu, 4 Jul 2024 14:17:43 +0000 (16:17 +0200)] 
vici: Improve handling of start action when reloading configs

The previous code had some issues because it handled each child config
separately.  Not only was this quite inefficient because all IKE_SAs had
to be enumerated for every config, it also caused problems with the check
for other CHILD_SAs in order to decide whether to delete the IKE_SA or
not.  Because CHILD_SAs are deleted with an INFORMATIONAL exchange, they
are not immediately gone.  This caused a race condition and with more
than one child config and SAs the IKE_SA could be kept because it
could appear as if other, unrelated CHILD_SAs were still there.

Another race condition, which is fixed by the previous commit, occurred
when only changing child configs.  Then it could happen that the code
deemed the IKE_SA empty and a delete for it was queued.  If that happened
while the IKE_SA was deleting one of the CHILD_SAs (or was busy with some
other exchange), the IKE_SA was not switched to IKE_DELETING.  So it
looked usable and create-child tasks for the updated configs might have
gotten queued.  Unfortunately, once the ike-delete task is eventually
executed, these tasks would be gone and the replacement CHILD_SAs never
created.  This commit additionally avoids actually deleting the IKE_SA
even if all child configs change or get removed if any new CHILD_SAs are
to be initiated.

12 months agoike-sa-manager: Avoid initiating CHILD_SAs on IKE_SAs with queued DELETE
Tobias Brunner [Thu, 4 Jul 2024 12:43:37 +0000 (14:43 +0200)] 
ike-sa-manager: Avoid initiating CHILD_SAs on IKE_SAs with queued DELETE

The IKE_SA might be busy with a different task while a request to
terminate it is getting queued, we don't want to use such an IKE_SA to
initiate new CHILD_SAs as these tasks will get lost once the IKE_SA is
terminated.

12 months agotesting: Enable IPv6 guest-to-guest communication
Tobias Brunner [Thu, 4 Jul 2024 16:23:03 +0000 (18:23 +0200)] 
testing: Enable IPv6 guest-to-guest communication

Not sure what changed, but without this setting, ND packets would not
get through to other hosts connected to the same bridge.

12 months agounit-tests: Fix compiler warning with empty message assertion
Tobias Brunner [Mon, 15 Jul 2024 14:55:29 +0000 (16:55 +0200)] 
unit-tests: Fix compiler warning with empty message assertion

The empty array of rules for `assert_message_empty()` and the resulting
size 0 triggers warnings like these:

  allocation of insufficient size '0' for type 'listener_message_rule_t' with size '12'

Using calloc() with `nmemb` set to 0 triggers the same warning.

12 months agodaemon: Use correct argument order for calloc() to fix compiler warning
Tobias Brunner [Fri, 12 Jul 2024 12:00:15 +0000 (14:00 +0200)] 
daemon: Use correct argument order for calloc() to fix compiler warning

The number of elements is the first argument, their size the second.
The previous code triggered the following warning:

  'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument

12 months agobacktrace: Fix compiler warning on Windows
Tobias Brunner [Fri, 12 Jul 2024 08:24:35 +0000 (10:24 +0200)] 
backtrace: Fix compiler warning on Windows

This change avoids a "variable 'got' might be clobbered by 'longjmp' or
'vfork'" warning with -Wextra.

12 months agoUse wolfSSL 5.7.2 for tests
Tobias Brunner [Thu, 11 Jul 2024 13:57:12 +0000 (15:57 +0200)] 
Use wolfSSL 5.7.2 for tests

13 months agotesting: Enable mgf1 plugin for scenarios where FreeRADIUS uses PSS signatures
Tobias Brunner [Wed, 26 Jun 2024 12:49:34 +0000 (14:49 +0200)] 
testing: Enable mgf1 plugin for scenarios where FreeRADIUS uses PSS signatures

Looks like a cipher suite without DHE was selected previously.

Could be a side-effect of dc1085734f34 ("testing: Remove unnecessary
FreeRADIUS dh_file option as recommended in the log").

13 months agotesting: Fix IP pool scenarios after changing base address
Tobias Brunner [Wed, 26 Jun 2024 08:12:16 +0000 (10:12 +0200)] 
testing: Fix IP pool scenarios after changing base address

Fixes: 2b11764b705d ("mem-pool: Adjust the base address if it's the network ID")
13 months agotesting: Enable error code checks for load-testconfig
Maxim Uvarov [Mon, 24 Jun 2024 14:05:20 +0000 (17:05 +0300)] 
testing: Enable error code checks for load-testconfig

Errors in load-testconfig are hidden due to not checking scp
return code and mute all errors. Add -e to trap script on
any errors in this script.

References strongswan/strongswan#2310

Signed-off-by: Maxim Uvarov <muvarov@gmail.com>
13 months agotesting: Enable sftp subsystem in default sshd_config
Maxim Uvarov [Mon, 24 Jun 2024 13:51:51 +0000 (16:51 +0300)] 
testing: Enable sftp subsystem in default sshd_config

OpenSSH defaults have changed and scp stopped to work with newer versions.
There are 2 options to fix it, either use -O (legacy scp protocol)
with scp, or enable the sftp subsystem in the SSH server config.
This fix uses the second variant.

Closes strongswan/strongswan#2310

Signed-off-by: Maxim Uvarov <muvarov@gmail.com>
13 months agocirrus: Use FreeBSD 13.3 and 14.1
Tobias Brunner [Tue, 18 Jun 2024 14:25:08 +0000 (16:25 +0200)] 
cirrus: Use FreeBSD 13.3 and 14.1

13 months agoquick-mode: Get a reference when adopting the reqid of a rekeyed CHILD_SA
Tobias Brunner [Thu, 13 Jun 2024 13:51:46 +0000 (15:51 +0200)] 
quick-mode: Get a reference when adopting the reqid of a rekeyed CHILD_SA

13 months agomem-pool: Adjust the base address if it's the network ID
Tobias Brunner [Tue, 28 May 2024 07:41:29 +0000 (09:41 +0200)] 
mem-pool: Adjust the base address if it's the network ID

Instead of just adding the offset internally, this way the reported
base address is always the first assignable address (e.g. for
192.168.0.0/24 vs. 192.168.0.1/24).

Closes strongswan/strongswan#2264

13 months agotesting: Make RADIUS server enforce client identity in certificate's CN
Tobias Brunner [Thu, 16 May 2024 14:34:02 +0000 (16:34 +0200)] 
testing: Make RADIUS server enforce client identity in certificate's CN

13 months agotesting: Remove unnecessary FreeRADIUS dh_file option as recommended in the log
Tobias Brunner [Thu, 2 May 2024 14:00:53 +0000 (16:00 +0200)] 
testing: Remove unnecessary FreeRADIUS dh_file option as recommended in the log

13 months agocharon-nm: Use a different routing table than the regular IKE daemon
Tobias Brunner [Fri, 3 May 2024 13:31:27 +0000 (15:31 +0200)] 
charon-nm: Use a different routing table than the regular IKE daemon

If the regular daemon is running, it creates an unconditional routing
rule for the routing table.  The rule that charon-nm tries to create,
which excludes marked IKE/ESP traffic to avoid a routing loop, then
can't be installed and we'd end up with said loop.

Closes strongswan/strongswan#2230

14 months agocirrus: Explicitly install tpm2-tss-sys package on Alpine
Tobias Brunner [Mon, 27 May 2024 12:08:08 +0000 (14:08 +0200)] 
cirrus: Explicitly install tpm2-tss-sys package on Alpine

The libraries were previously shipped with the -dev package.

14 months agogithub: Use AWS-LC 1.28.0 for tests
Tobias Brunner [Mon, 27 May 2024 08:42:18 +0000 (10:42 +0200)] 
github: Use AWS-LC 1.28.0 for tests

14 months agox509: Encode challenge passwords as PrintableString if possible
Tobias Brunner [Tue, 30 Apr 2024 14:46:34 +0000 (16:46 +0200)] 
x509: Encode challenge passwords as PrintableString if possible

As recommended by RFC 2985, section 5.4.1:

  ChallengePassword attribute values generated in accordance with this
  version of this document SHOULD use the PrintableString encoding
  whenever possible.  If internationalization issues make this
  impossible, the UTF8String alternative SHOULD be used.

Even though the RFC continues with

  PKCS #9-attribute processing systems MUST be able to recognize and
  process all string types in DirectoryString values.

there might be older SCEP server implementations that don't accept
UTF8String-encoded passwords.  In particular because previous versions of
PKCS#9 defined this attribute's type as a CHOICE between PrintableString
and T61String.

References strongswan/strongswan#1831

14 months agostreams: Add ability to listen on any VSOCK CID
Tobias Brunner [Wed, 1 May 2024 12:50:16 +0000 (14:50 +0200)] 
streams: Add ability to listen on any VSOCK CID

Can be useful if the CID inside the VM is not known.

The \htmlonly\endhtmlonly hack is used to avoid compiler warnings due
to /* inside a block comment.

14 months agostreams: Add support for AF_VSOCK sockets on Linux
Thomas Egerer [Tue, 30 Apr 2024 12:20:57 +0000 (14:20 +0200)] 
streams: Add support for AF_VSOCK sockets on Linux

These allow, for instance, a vici client on a host to communicate with
an IKE daemon running in a VM.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
14 months agoike-cfg: Consider port information in IKE config match
Thomas Egerer [Fri, 12 Apr 2024 15:07:21 +0000 (15:07 +0000)] 
ike-cfg: Consider port information in IKE config match

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
15 months agogithub: Use tpm2-tss 3.2.3 for tests
Tobias Brunner [Mon, 29 Apr 2024 14:10:39 +0000 (16:10 +0200)] 
github: Use tpm2-tss 3.2.3 for tests

15 months agoconfigure: Enable counters plugin also if vici is enabled but stroke is disabled
Tobias Brunner [Thu, 18 Apr 2024 06:59:18 +0000 (08:59 +0200)] 
configure: Enable counters plugin also if vici is enabled but stroke is disabled

15 months agogitignore: Don't ignore proposal_keywords.c
Tobias Brunner [Mon, 15 Apr 2024 16:29:42 +0000 (18:29 +0200)] 
gitignore: Don't ignore proposal_keywords.c

If somebody copies our .gitignore and tries to import the source code,
the proposal_keywords.c file will not be added as it's ignored by the
`*keywords.c` pattern we use to ignore gperf-generated source files.

Closes strongswan/strongswan#2014

15 months agomem-pool: Reject the creation of unintentionally empty pools
Tobias Brunner [Fri, 12 Apr 2024 12:14:11 +0000 (14:14 +0200)] 
mem-pool: Reject the creation of unintentionally empty pools

If a base address is configured, we don't expect the pool to be empty,
so reject the creation (e.g. with the broadcast address as base).

References strongswan/strongswan#2205

15 months agoswanctl: Document possibility of non-zero base addresses for in-memory pools
Tobias Brunner [Fri, 12 Apr 2024 12:01:23 +0000 (14:01 +0200)] 
swanctl: Document possibility of non-zero base addresses for in-memory pools

References strongswan/strongswan#2205

15 months agoUse AWS-LC 1.24.0 for tests
Tobias Brunner [Fri, 12 Apr 2024 12:59:32 +0000 (14:59 +0200)] 
Use AWS-LC 1.24.0 for tests

15 months agogithub: Don't search for coverage results
Tobias Brunner [Thu, 4 Apr 2024 12:14:29 +0000 (14:14 +0200)] 
github: Don't search for coverage results

We explicitly pass the final .info file prepared with lcov, so there is
no need to search for other files (that then won't work anyway).  The
search also finds the uncleaned .info file, which includes the test code.

The latter should have gotten ignored anyway, but the patterns are
apparently not correct anymore. So fixing that as well just to be sure.

15 months agogithub: Update coverage data upload to Codecov
Tobias Brunner [Tue, 27 Feb 2024 10:07:06 +0000 (11:07 +0100)] 
github: Update coverage data upload to Codecov

Since the script and action have issues with the directory structure, we
upload the lcov results instead.

15 months agoMerge branch 'openwrt-fixes'
Tobias Brunner [Wed, 3 Apr 2024 09:28:24 +0000 (11:28 +0200)] 
Merge branch 'openwrt-fixes'

Closes strongswan/strongswan#2185

15 months agowolfssl: Avoid conflict with RNG when built without EdDSA or FIPS enabled
Philip Prindeville [Wed, 27 Mar 2024 23:41:18 +0000 (17:41 -0600)] 
wolfssl: Avoid conflict with RNG when built without EdDSA or FIPS enabled

There are definitions of RNG in <wolfssl/wolfcrypt/settings.h> and
<wolfssl/wolfcrypt/random.h> that play havoc with the literal RNG being
used in the expansions of PLUGIN_*(RNG, ...) when ##-concatenated to
build the enum value FEATURE_RNG.

The #undef in wolfssl_cmmon.h only had an effect if wolfSSL was built
with EdDSA or FIPS enabled, otherwise, the headers that define RNG were
not pulled in before it.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
15 months agouci: Upstream patch to adapt to option datatype abstraction
Noel Kuntze [Mon, 25 Mar 2024 17:22:30 +0000 (11:22 -0600)] 
uci: Upstream patch to adapt to option datatype abstraction

This is a patch from the OpenWrt package sources necessary to adapt to
changes from 2008 that abstracted the option datatype (added a list
type).

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com>
15 months agocirrus: Add build on Alpine Linux with musl C library
Tobias Brunner [Wed, 27 Mar 2024 09:48:48 +0000 (10:48 +0100)] 
cirrus: Add build on Alpine Linux with musl C library

15 months agosha3: Fix Keccak when compiled with GCC 13.x
Tobias Brunner [Thu, 28 Mar 2024 10:51:15 +0000 (11:51 +0100)] 
sha3: Fix Keccak when compiled with GCC 13.x

With GCC 13, the compiler apparently applies new aliasing optimizations
when compiled with -O2 and without -fno-strict-aliasing.  This caused
the application of the second padding bit, where the state was accessed
via uint8_t[], to be moved before the loop that absorbs the buffer into
the state, where the state is accessed via uint64_t[], resulting in
incorrect output.  By only accessing the state via uint64_t[] here the
compiler won't reorder the instructions.

15 months agounit-tests: Adhere to TESTS_NO_IPV6 in HTTP fetcher test suite
Tobias Brunner [Thu, 28 Mar 2024 06:46:17 +0000 (07:46 +0100)] 
unit-tests: Adhere to TESTS_NO_IPV6 in HTTP fetcher test suite

15 months agobliss: Fix build with built-in printf-specifiers
Tobias Brunner [Wed, 27 Mar 2024 15:26:48 +0000 (16:26 +0100)] 
bliss: Fix build with built-in printf-specifiers

This won't work for monolithic builds because the plugin and the
executable are built before libstrongswan.

16 months agoUse wolfSSL 5.7.0 for tests
Tobias Brunner [Fri, 22 Mar 2024 10:43:39 +0000 (11:43 +0100)] 
Use wolfSSL 5.7.0 for tests

16 months agofarp: Fix build with musl C library
Tobias Brunner [Fri, 22 Mar 2024 09:42:34 +0000 (10:42 +0100)] 
farp: Fix build with musl C library

Same issue as described in the previous commit.

Fixes: 187c72d1afdc ("dhcp: Port the plugin to FreeBSD/macOS")
16 months agopf-handler: Fix build with musl C library
Tobias Brunner [Fri, 22 Mar 2024 08:57:07 +0000 (09:57 +0100)] 
pf-handler: Fix build with musl C library

musl's headers define a lot of networking structs.  For some, the
definition in the Linux UAPI headers is then suppressed by e.g.
__UAPI_DEF_ETHHDR.

Since we included musl's net/ethernet.h, which includes netinet/if_ether.h
that defines `struct ethhdr` (and the above constant), **after** we
include linux/if_ether.h, there was a compilation error because the
struct was defined multiple times.

However, simply moving that include doesn't fix the problem because for
ARP-specific structs the Linux headers don't provide __UAPI_DEF* checks.
So instead of directly including the linux/ headers, we include those
provided by the C library.  For glibc these usually just include the
Linux headers, but for musl this allows them to define the struct
directly.  We also need to move if.h and add packet.h, which define
other structs (or include headers that do so) that we use.

Fixes: 187c72d1afdc ("dhcp: Port the plugin to FreeBSD/macOS")
16 months agoike-sa-manager: Unlock mutex if allocating SPI fails to avoid lock contention
Thomas Egerer [Wed, 20 Mar 2024 10:11:17 +0000 (10:11 +0000)] 
ike-sa-manager: Unlock mutex if allocating SPI fails to avoid lock contention

Fixes: 5d91d8c46937 ("Check rng return value when generating SPIs in ike_sa_manager_t")
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
16 months agoVersion bump to 5.9.14 5.9.14
Andreas Steffen [Tue, 19 Mar 2024 10:56:44 +0000 (11:56 +0100)] 
Version bump to 5.9.14

16 months agogithub: Use AWS-LC 1.23.0 for tests
Tobias Brunner [Mon, 18 Mar 2024 07:01:18 +0000 (08:01 +0100)] 
github: Use AWS-LC 1.23.0 for tests

16 months agosave-keys: Fix Wireshark algorithm identifier for 3DES
Wataru Ashihara [Sat, 25 Nov 2023 10:32:20 +0000 (19:32 +0900)] 
save-keys: Fix Wireshark algorithm identifier for 3DES

Wireshark has shown the following error dialogue because the identifier
was incorrect [1]:

Error loading table 'ESP SAs': esp_sa:18: invalid value: TripleDes-CBC [RFC2451]

[1] https://github.com/wireshark/wireshark/blob/3757f42e5f0a8ee6b14a117a2fd99af759a31d98/epan/dissectors/packet-ipsec.c#L203

Closes strongswan/strongswan#2013

16 months agoike-cfg: Change how OCSP certificate requests are enabled
Tobias Brunner [Fri, 15 Mar 2024 13:40:30 +0000 (14:40 +0100)] 
ike-cfg: Change how OCSP certificate requests are enabled

The previous option caused such requests to be enabled if not explicitly
disabled, which only the vici plugin did, for all other backends requests
would have been sent.

References strongswan/strongswan#2016

16 months agopeer-cfg: Renumber ocsp_policy_t values so the same default applies for all backends
Tobias Brunner [Fri, 15 Mar 2024 13:37:53 +0000 (14:37 +0100)] 
peer-cfg: Renumber ocsp_policy_t values so the same default applies for all backends

Only the vici plugin previously set OCSP_SEND_REPLY explicitly, all other
backends would have defaulted to OCSP_SEND_BOTH.

References strongswan/strongswan#2016

16 months agokernel-pfroute: Log ignored interfaces when listing known interfaces
Tobias Brunner [Fri, 15 Mar 2024 12:47:23 +0000 (13:47 +0100)] 
kernel-pfroute: Log ignored interfaces when listing known interfaces