]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
2 years agotesting: Migrated ipv6-stroke scenarios to new default plugins
Andreas Steffen [Wed, 19 Oct 2022 05:25:26 +0000 (07:25 +0200)] 
testing: Migrated ipv6-stroke scenarios to new default plugins

2 years agotesting: Migrated ipv6 scenarios to new default plugins
Andreas Steffen [Wed, 19 Oct 2022 05:20:18 +0000 (07:20 +0200)] 
testing: Migrated ipv6 scenarios to new default plugins

2 years agotesting: Distributed openssl-ikev1 scenarios
Andreas Steffen [Tue, 18 Oct 2022 19:40:36 +0000 (21:40 +0200)] 
testing: Distributed openssl-ikev1 scenarios

2 years agotesting: Migrated ikev1-algs scenarios to new default plugins
Andreas Steffen [Tue, 18 Oct 2022 19:24:40 +0000 (21:24 +0200)] 
testing: Migrated ikev1-algs scenarios to new default plugins

2 years agotesting: Migrated ikev1 scenarios to new default plugins
Andreas Steffen [Tue, 18 Oct 2022 19:11:38 +0000 (21:11 +0200)] 
testing: Migrated ikev1 scenarios to new default plugins

2 years agotesting: Distributed openssl-ikev2 scenarios
Andreas Steffen [Tue, 18 Oct 2022 17:15:08 +0000 (19:15 +0200)] 
testing: Distributed openssl-ikev2 scenarios

2 years agotesting: Migrated ikev2-algs scenarios to new default plugins
Andreas Steffen [Tue, 18 Oct 2022 17:41:49 +0000 (19:41 +0200)] 
testing: Migrated ikev2-algs scenarios to new default plugins

2 years agotesting: Migrated ikev2 scenarios to new default plugins
Andreas Steffen [Tue, 18 Oct 2022 15:44:30 +0000 (17:44 +0200)] 
testing: Migrated ikev2 scenarios to new default plugins

2 years agokey_exchange_t: Removed broken SIKE KE algorithms
Andreas Steffen [Wed, 5 Oct 2022 13:22:41 +0000 (15:22 +0200)] 
key_exchange_t: Removed broken SIKE KE algorithms

2 years agooqs: Included version 4.1 of BIKE Round 3 (L1 and L3)
Andreas Steffen [Fri, 27 Aug 2021 06:40:41 +0000 (08:40 +0200)] 
oqs: Included version 4.1 of BIKE Round 3 (L1 and L3)

Requirement: liboqs-0.7.0

2 years agooqs: Updated Falcon sig tests to liboqs-0.5.0
Andreas Steffen [Sun, 21 Mar 2021 15:12:45 +0000 (16:12 +0100)] 
oqs: Updated Falcon sig tests to liboqs-0.5.0

2 years agooqs: Upgraded Dilithium to NIST Round 3.1
Andreas Steffen [Sun, 21 Mar 2021 11:10:40 +0000 (12:10 +0100)] 
oqs: Upgraded Dilithium to NIST Round 3.1

2 years agotest-vectors: No changes for Saber KE NIST Round 3 tests
Andreas Steffen [Tue, 8 Dec 2020 09:19:36 +0000 (10:19 +0100)] 
test-vectors: No changes for Saber KE NIST Round 3 tests

2 years agooqs: Support for HQC key exchange algorithm
Andreas Steffen [Mon, 7 Dec 2020 14:25:43 +0000 (15:25 +0100)] 
oqs: Support for HQC key exchange algorithm

2 years agotest-vectors: Upgraded Kyber KE tests to NIST Round 3
Andreas Steffen [Mon, 7 Dec 2020 12:27:19 +0000 (13:27 +0100)] 
test-vectors: Upgraded Kyber KE tests to NIST Round 3

2 years agotest-vectors: Upgraded NTRU KE tests to NIST Round 3
Andreas Steffen [Wed, 2 Dec 2020 16:29:37 +0000 (17:29 +0100)] 
test-vectors: Upgraded NTRU KE tests to NIST Round 3

2 years agoscripts: Fixed NIST KAT scripts
Andreas Steffen [Wed, 2 Dec 2020 16:27:08 +0000 (17:27 +0100)] 
scripts: Fixed NIST KAT scripts

2 years agooqs: Support of Falcon signature algorithms
Andreas Steffen [Fri, 20 Nov 2020 16:30:15 +0000 (17:30 +0100)] 
oqs: Support of Falcon signature algorithms

2 years agooqs: Complete post-quantum signature support
Andreas Steffen [Wed, 18 Nov 2020 17:19:43 +0000 (18:19 +0100)] 
oqs: Complete post-quantum signature support

2 years agontru: Removed legacy NTRU key exchange method
Andreas Steffen [Wed, 18 Nov 2020 09:39:28 +0000 (10:39 +0100)] 
ntru: Removed legacy NTRU key exchange method

2 years agonewhope: Removed legacy Newhope key exchange method
Andreas Steffen [Tue, 17 Nov 2020 18:27:20 +0000 (19:27 +0100)] 
newhope: Removed legacy Newhope key exchange method

2 years agobliss: Removed legacy BLISS signatures
Andreas Steffen [Mon, 16 Nov 2020 19:22:21 +0000 (20:22 +0100)] 
bliss: Removed legacy BLISS signatures

2 years agooqs: Added signature tests
Andreas Steffen [Tue, 10 Nov 2020 19:28:33 +0000 (20:28 +0100)] 
oqs: Added signature tests

2 years agoscripts: Added nist_sig_kat script
Andreas Steffen [Fri, 6 Nov 2020 08:33:25 +0000 (09:33 +0100)] 
scripts: Added nist_sig_kat script

2 years agooqs: Postponed freeing of kem object
Andreas Steffen [Mon, 2 Nov 2020 15:49:37 +0000 (16:49 +0100)] 
oqs: Postponed freeing of kem object

2 years agooqs: Support of Dilithium signature algorithms
Andreas Steffen [Wed, 28 Oct 2020 19:09:41 +0000 (20:09 +0100)] 
oqs: Support of Dilithium signature algorithms

2 years agooqs: Update to NIST round 3 KEM candidates
Andreas Steffen [Sat, 17 Oct 2020 09:58:58 +0000 (11:58 +0200)] 
oqs: Update to NIST round 3 KEM candidates

2 years agooqs: Removed BIKE round 1 version including test vectors
Andreas Steffen [Thu, 28 Nov 2019 22:23:14 +0000 (23:23 +0100)] 
oqs: Removed BIKE round 1 version including test vectors

2 years agotesting: Added ikev2/rw-cert-qske scenario
Andreas Steffen [Tue, 19 Nov 2019 22:01:26 +0000 (23:01 +0100)] 
testing: Added ikev2/rw-cert-qske scenario

2 years agofrodo: FrodoKEM KE method
Andreas Steffen [Wed, 6 Nov 2019 22:08:43 +0000 (23:08 +0100)] 
frodo: FrodoKEM KE method

2 years agooqs: Added post-quantum KEM methods based on liboqs
Andreas Steffen [Tue, 5 Nov 2019 20:52:20 +0000 (21:52 +0100)] 
oqs: Added post-quantum KEM methods based on liboqs

2 years agonist_kem_kat: Added script formating NIST KEM KAT records into ke_test vectors
Andreas Steffen [Tue, 5 Nov 2019 11:16:49 +0000 (12:16 +0100)] 
nist_kem_kat: Added script formating NIST KEM KAT records into ke_test vectors

2 years agotest-vectors: Added NIST KEM test vectors
Andreas Steffen [Tue, 5 Nov 2019 11:12:19 +0000 (12:12 +0100)] 
test-vectors: Added NIST KEM test vectors

2 years agokey-exchange: Joint ke_test_vector format for DH and KEM
Andreas Steffen [Mon, 4 Nov 2019 21:22:47 +0000 (22:22 +0100)] 
key-exchange: Joint ke_test_vector format for DH and KEM

Both Diffie-Hellman (DH) and Key Encapsulation Mechanism (KEM) based
key exchange methods use a common ke_test_vector format. The
set_seed() function is used to provide deterministic private key
material for the crypto tests.

2 years agokey-exchange: Added NIST round 2 submission KEM candidates
Andreas Steffen [Fri, 1 Nov 2019 18:41:46 +0000 (19:41 +0100)] 
key-exchange: Added NIST round 2 submission KEM candidates

2 years agounit-tests: Ensure listeners can track SAs via ike/child_updown/rekey()
Tobias Brunner [Fri, 9 Sep 2022 16:34:29 +0000 (18:34 +0200)] 
unit-tests: Ensure listeners can track SAs via ike/child_updown/rekey()

Previously, it could happen that child_rekey() was triggered twice for
the same "old" SA.  For listeners that would mean they'd loose track as
they'd be tracking a new SA that wasn't relevant anymore and for which
no updown event would ever get triggered (it was the redundant SA in a
collision).  This new assert ensures that events are triggered in a
predictable way and listeners can track SAs properly.

2 years agoikev2: Make CHILD_SAs properly trackable during rekey collisions
Tobias Brunner [Mon, 22 Aug 2022 13:43:16 +0000 (15:43 +0200)] 
ikev2: Make CHILD_SAs properly trackable during rekey collisions

As the winner of a rekey collision, we previously always triggered the
child_rekey() event once when creating the redundant SA on behalf of the
peer in the passive child-rekey task and then a second time when
creating the winning SA in the active task.  However, both calls passed
the replaced CHILD_SA as "old". This made tracking CHILD_SAs impossible
because there was no transition from the redundant, "new" SA of the
first event to the "new", winning SA of the second.  Of course, when the
second event was triggered, the redundant SA might not have existed
anymore because the peer is expected to delete it, which could happen
before the CREATE_CHILD_SA response arrives at the initiator.

This refactoring ensures that the child_rekey() event is triggered in
a way that makes the CHILD_SAs trackable in all reasonable (and even
some unreasonable) scenarios.  The event is generally only triggered
once after installing the outbound SA for the new/winning CHILD_SA.
This can be when processing the CREATE_CHILD_SA in the active child-rekey
task, or when processing the DELETE for the old SA in a passive
child-delete task.  There are some cases where the event is still
triggered twice, but it is now ensured that listeners can properly
transition to the winning SA.

Some corner cases are now also handled correctly, e.g. if a responder's
DELETE for the new CHILD_SA arrives before its CREATE_CHILD_SA response
that actually creates it on the initiator.  Also handled properly are
responders of rekeyings that incorrectly send a DELETE for the old
CHILD_SA (previously this caused both, the new and the old SA, to get
deleted).

2 years agowip: ike-init: Indicate support for IKE_INTERMEDIATE
Tobias Brunner [Tue, 5 Nov 2019 15:42:58 +0000 (16:42 +0100)] 
wip: ike-init: Indicate support for IKE_INTERMEDIATE

wip: We should also add some checks if the notify was not received.

2 years agoproposal: Prevent selection of duplicate key exchange methods
Tobias Brunner [Fri, 16 Jul 2021 11:52:19 +0000 (13:52 +0200)] 
proposal: Prevent selection of duplicate key exchange methods

All additional (and the initial) key exchanges must use a different method.

2 years agoproposal: Add helper to check if additional key exchanges are contained
Tobias Brunner [Tue, 5 Nov 2019 16:03:42 +0000 (17:03 +0100)] 
proposal: Add helper to check if additional key exchanges are contained

2 years agoproposal: Accept NONE for additional key exchanges also for IKE proposals
Tobias Brunner [Thu, 22 Oct 2020 11:13:00 +0000 (13:13 +0200)] 
proposal: Accept NONE for additional key exchanges also for IKE proposals

2 years agounit-tests: Add tests for CHILD_SA rekeying with multiple key exchanges
Tobias Brunner [Mon, 29 Jun 2020 12:13:53 +0000 (14:13 +0200)] 
unit-tests: Add tests for CHILD_SA rekeying with multiple key exchanges

2 years agounit-tests: Add tests for CHILD_SA creation with multiple key exchanges
Tobias Brunner [Fri, 26 Jun 2020 12:12:47 +0000 (14:12 +0200)] 
unit-tests: Add tests for CHILD_SA creation with multiple key exchanges

2 years agounit-tests: Tests for additional key exchanges
Tobias Brunner [Mon, 4 Nov 2019 15:17:30 +0000 (16:17 +0100)] 
unit-tests: Tests for additional key exchanges

2 years agounit-tests: Support multiple proposals in exchange tests
Tobias Brunner [Wed, 17 Jun 2020 16:39:44 +0000 (18:39 +0200)] 
unit-tests: Support multiple proposals in exchange tests

2 years agovici: Increase maximum proposal length
Andreas Steffen [Tue, 6 Jul 2021 10:11:51 +0000 (12:11 +0200)] 
vici: Increase maximum proposal length

2 years agovici: List additional key exchanges
Andreas Steffen [Tue, 19 Nov 2019 19:44:39 +0000 (20:44 +0100)] 
vici: List additional key exchanges

Co-authored-by: Tobias Brunner <tobias@strongswan.org>
2 years agoproposal: Add prefix for additional key exchanges when logging proposals
Tobias Brunner [Thu, 22 Oct 2020 12:15:31 +0000 (14:15 +0200)] 
proposal: Add prefix for additional key exchanges when logging proposals

2 years agokey-exchange: Add dynamic parser for additional key exchange methods
Tobias Brunner [Mon, 4 Nov 2019 16:27:20 +0000 (17:27 +0100)] 
key-exchange: Add dynamic parser for additional key exchange methods

2 years agochild-rekey: Support CHILD_SA rekeying with multiple key exchanges
Tobias Brunner [Mon, 29 Jun 2020 12:12:05 +0000 (14:12 +0200)] 
child-rekey: Support CHILD_SA rekeying with multiple key exchanges

2 years agounit-tests: Fix CHILD_SA rekey tests after INVALID_KE_PAYLOAD handling changes
Tobias Brunner [Fri, 20 Jul 2018 12:12:48 +0000 (14:12 +0200)] 
unit-tests: Fix CHILD_SA rekey tests after INVALID_KE_PAYLOAD handling changes

The responder doesn't create a CHILD_SA and allocate an SPI anymore
when responding with an INVALID_KE_PAYLOAD notify.

2 years agochild-create: Add support for multiple key exchanges
Tobias Brunner [Thu, 25 Jun 2020 08:26:38 +0000 (10:26 +0200)] 
child-create: Add support for multiple key exchanges

It also changes that payloads are built before installing the CHILD_SA on
the responder, that is, the KE payload is generated before keys are derived,
so that key_exchange_t::get_public_key() is called before get_shared_secret(),
or it's internal equivalent, which could be relevant for KE implementations
that want to ensure that the key can't be used again after the key
derivation.

2 years agoike-rekey: Support IKE_SA rekeying with multiple key exchanges
Tobias Brunner [Mon, 6 Apr 2020 15:41:15 +0000 (17:41 +0200)] 
ike-rekey: Support IKE_SA rekeying with multiple key exchanges

2 years agoike-init: Add support for multiple key exchanges
Tobias Brunner [Thu, 31 Oct 2019 16:16:44 +0000 (17:16 +0100)] 
ike-init: Add support for multiple key exchanges

Initially, this is handled with a key derivation for each
IKE_INTERMEDIATE exchange.  When rekeying the keys are derived only when
all IKE_FOLLOWUP_KE exchanges are done.

2 years agobus: Support multiple key exchanges in ike/child_keys() events
Tobias Brunner [Thu, 9 Apr 2020 09:53:45 +0000 (11:53 +0200)] 
bus: Support multiple key exchanges in ike/child_keys() events

2 years 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

2 years 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

2 years 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

2 years 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.

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

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

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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years agoappveyor: Build eap-radius plugin on Windows
Tobias Brunner [Wed, 8 Mar 2023 14:33:43 +0000 (15:33 +0100)] 
appveyor: Build eap-radius plugin on Windows

2 years agolibradius: Link to winsock32 on Windows
Tobias Brunner [Wed, 8 Mar 2023 14:55:38 +0000 (15:55 +0100)] 
libradius: Link to winsock32 on Windows

2 years agoeap-radius: Don't include socket.h explicitly
Tobias Brunner [Wed, 8 Mar 2023 14:31:42 +0000 (15:31 +0100)] 
eap-radius: Don't include socket.h explicitly

We rely on the includes via utils.h so this compiles on Windows.

2 years agowindows: Fix compat define for sendto(2)
Tobias Brunner [Wed, 8 Mar 2023 14:05:42 +0000 (15:05 +0100)] 
windows: Fix compat define for sendto(2)

2 years agokernel-wfp: Install bypass policies also on FWPM_SUBLAYER_IPSEC_TUNNEL sublayer
Tobias Brunner [Wed, 1 Mar 2023 16:08:37 +0000 (17:08 +0100)] 
kernel-wfp: Install bypass policies also on FWPM_SUBLAYER_IPSEC_TUNNEL sublayer

This is apparently necessary to bypass tunnel mode SAs/policies.

References strongswan/strongswan#1552

2 years agowindows: Fix invalid pointer dereference when terminating service thread
Tobias Brunner [Tue, 7 Mar 2023 15:57:27 +0000 (16:57 +0100)] 
windows: Fix invalid pointer dereference when terminating service thread

When running as a service, the libraries are initialized/deinitialized
not by the main thread but by a separate thread that runs the registered
main service procedure.  When the service is stopped, the libraries are
deinitialized by that thread and the thread lock and hashtable are
destroyed.  But afterwards the DllMain callback is also triggered for
that thread so we have to prevent it from accessing these objects again.

References strongswan/strongswan#1567

2 years agocontroller: Immediately return after re-initiating an existing IKE_SA childless
Tobias Brunner [Wed, 1 Mar 2023 16:31:07 +0000 (17:31 +0100)] 
controller: Immediately return after re-initiating an existing IKE_SA childless

If no CHILD_SA is initiated, we wait for a state change to IKE_ESTABLISHED
but that will never happen for already established IKE_SAs.

References strongswan/strongswan#1553

2 years agovici: Fix fallback to remote ID if no mediation peer ID is configured
Tobias Brunner [Thu, 2 Mar 2023 09:21:43 +0000 (10:21 +0100)] 
vici: Fix fallback to remote ID if no mediation peer ID is configured

Also adds error reporting via VICI for issues with mediation settings.

Fixes: 229cdf6bc8f2 ("vici: Order auth rounds by optional `round` parameter instead of by position in the request")
References strongswan/strongswan#1569

2 years agodhcp: Don't use get_source_addr() to determine source address
Tobias Brunner [Fri, 10 Mar 2023 09:43:24 +0000 (10:43 +0100)] 
dhcp: Don't use get_source_addr() to determine source address

That method is subject to interface filtering, which isn't ideal for
DHCP traffic that probably uses an internal interface on which the IKE
daemon might be disabled.  In that case `giaddr` is set to an incorrect
public IP, which in turn might prevent the plugin from receiving the
DHCP server's unicast response, in particular if the DHCP socket
is bound to the internal interface.

This new approach connects the client socket and thereby determines the
source address to reach the DHCP server.

Closes strongswan/strongswan#1573

2 years agopki: Fix enum for SCEP CA capabilities
Tobias Brunner [Fri, 17 Mar 2023 16:24:41 +0000 (17:24 +0100)] 
pki: Fix enum for SCEP CA capabilities

As indicated by the comparisons and the parsing in scep_parse_caps()
this should be a bitmask.

Fixes: 7c7a5a0260ca ("pki: Enroll an X.509 certificate with a SCEP server")
Closes strongswan/strongswan#1607

2 years agoeap-tls: Fix server implementation with TLS 1.2 and earlier
Tobias Brunner [Mon, 13 Mar 2023 12:39:17 +0000 (13:39 +0100)] 
eap-tls: Fix server implementation with TLS 1.2 and earlier

With 5401a74d3608 ("eap-tls: Add support for TLS 1.3") a TLS application
was added to implement TLS 1.3's protected success indication.  For
earlier TLS versions, its build() method simply returned SUCCESS as
there was nothing to send.  However, that had the unintended side-effect
of also not sending the final TLS handshake messages (ChangeCipherSpec
and Finished).

The reason is that the TLS stack first checks for remaining handshake
messages but then also asks the registered application for data to
piggyback to that response (before the commit there was no application,
so that step was skipped).  The problem is that the status returned by
the application is directly forwarded through the TLS stack.  So not
returning INVALID_STATE caused the session to get concluded immediately
instead of resulting in ALREADY_DONE that would trigger sending the
final EAP message instead of an EAP-Success.

Fixes: 5401a74d3608 ("eap-tls: Add support for TLS 1.3")
2 years agotls: Only return EAP MSK if TLS handshake is complete
Tobias Brunner [Mon, 13 Mar 2023 12:26:25 +0000 (13:26 +0100)] 
tls: Only return EAP MSK if TLS handshake is complete

The MSK is generated when the keys are derived.  For TLS 1.3 that's also
when the handshake is complete.  However, for TLS 1.2 it happens when
generating or processing the ClientKeyExchange message, which, on the
client, happens before the final Finished handshake message has been
received from the server.  This caused the EAP-TLS client to accept an
EAP-Success message instead of the server's final TLS handshake
messages, unintentionally allowing servers to cut the exchange short by
two EAP messages (in the regular exchange the response to the server's
final handshake messages is an empty EAP-Response, which is then
followed by the server's EAP-Success).

While this is not correct, it does not seem to pose a security issue.
If DH is used as key exchange, the server signs the ServerKeyExchange
message and the client is sure to communicate with a trusted server
before it derives the MSK.  If RSA encryption is used as key exchange,
the client sends the premaster secret, on which the MSK is based,
encrypted with the server's public key (as extracted from the trusted
certificate).  An attacker won't be able to decrypt this and, therefore,
can't derive the same MSK to generate a valid AUTH payload and the IKE
authentication will fail.

2 years agogithub: Add LSan workaround for tests on Ubuntu 20.04 again
Tobias Brunner [Thu, 16 Mar 2023 13:11:12 +0000 (14:11 +0100)] 
github: Add LSan workaround for tests on Ubuntu 20.04 again

This was removed with 0fea6a7f8e7e ("github: Adapt to switch to Ubuntu
22.04 for ubuntu-latest") as it didn't seem necessary anymore.  But
recently there have been such random crashes again with the 20.04 image.

2 years agogithub: Use OpenSSL 3.1.0 for tests
Tobias Brunner [Tue, 14 Mar 2023 16:03:05 +0000 (17:03 +0100)] 
github: Use OpenSSL 3.1.0 for tests

2 years agovici: Generalize timeout support in Python bindings
Jean-Tiare Le Bigot [Thu, 2 Mar 2023 22:20:13 +0000 (23:20 +0100)] 
vici: Generalize timeout support in Python bindings

Since 3dd5dc50119d ("Merge branch 'vici-python-timeout'"), any timeout
set directly on the socket is reset by `vici.Transport.receive()` unless
called by `vici.Session.listen()`. This prevents configuring a default
timeout directly on the socket.

However, setting a timeout directly on the socket also had drawbacks
since it can cause `vici.Transport.receive()` to raise a timeout error
while a subset of the data have been received, with no way to recover.

This commit merges both approaches by considering the timeout configured
on the socket by default (when no timeout is explicitly set) and
keeping the switch to blocking receive once the first byte has been
received. When the full expected data have been received, the timeout
configured on the socket is restored.

Co-authored-by: Tobias Brunner <tobias@strongswan.org>
Signed-off-by: Jean-Tiare Le Bigot <jt@yadutaf.fr>
Closes strongswan/strongswan#1562

2 years agogithub: Don't build on Ubuntu 18.04 anymore
Tobias Brunner [Tue, 7 Mar 2023 13:51:10 +0000 (14:51 +0100)] 
github: Don't build on Ubuntu 18.04 anymore

The Ubuntu 18.04 image is deprecated and builds will start to fail
temporarily during four 24 hour periods from now until the final
deprecation on April 1st.  So better remove these runs now.

2 years agoappveyor: Fix LDFLAGS for Windows build
Tobias Brunner [Fri, 3 Mar 2023 12:02:44 +0000 (13:02 +0100)] 
appveyor: Fix LDFLAGS for Windows build

With newer OpenSSL builds, the DLL files contain parts of the version
number and the architecture in their name, e.g. for OpenSSL 1.1.1 the
DLL for libcrypto is called libcrypto-1_1-x64.dll.  So referencing that
directly could be kinda tricky.  And by using `-lcrypto` we therefore
didn't link those DLLs but the OpenSSL version installed by msys2.
Since the latter ships OpenSSL 3 since January and the VS 2019 image
was updated recently, our builds broke as we used the headers from
the 1.1.1 installation but then tried to link OpenSSL 3.

Luckily, in the lib/ directory of the OpenSSL installation, there is a
libcrypto.lib file, which is an import library (containing the symbols
and a reference to the DLL).  We can use that to link the right library
via `-lcrypto`.

With the old OpenSSL 1.0.2 build on the VS 2015 image, there is also
such a .lib file but it seems the linker is too old or otherwise incapable
of finding the DLL.  But since the DLL is just called libeay32.dll there,
we use that directly and don't reference the lib/ dir.

Also removed a superfluous AC_MSG_RESULT() if libeay32 isn't found.

2 years agoappveyor: Install gperf manually on newer versions of msys2
Tobias Brunner [Thu, 2 Mar 2023 10:44:59 +0000 (11:44 +0100)] 
appveyor: Install gperf manually on newer versions of msys2

2 years agoVersion bump to 5.9.10 5.9.10
Andreas Steffen [Thu, 2 Mar 2023 08:58:24 +0000 (09:58 +0100)] 
Version bump to 5.9.10

2 years agoNEWS: Add info about CVE-2023-26463
Tobias Brunner [Fri, 24 Feb 2023 15:07:38 +0000 (16:07 +0100)] 
NEWS: Add info about CVE-2023-26463