]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
7 days agoMerge branch 'android-updates' master android-2.6.2
Tobias Brunner [Thu, 30 Oct 2025 16:13:38 +0000 (17:13 +0100)] 
Merge branch 'android-updates'

Fixes edge-to-edge layout issues with the settings and application
selection Activities.

7 days agoandroid: New release after fixing edge-to-edge layout issues
Tobias Brunner [Thu, 30 Oct 2025 16:12:54 +0000 (17:12 +0100)] 
android: New release after fixing edge-to-edge layout issues

7 days agoandroid: Fix edge-to-edge layout issues with settings and app selection
Tobias Brunner [Thu, 30 Oct 2025 15:36:45 +0000 (16:36 +0100)] 
android: Fix edge-to-edge layout issues with settings and app selection

Using FrameLayout for the settings instead of the recommended
FragmentContainerView because the latter makes handling insets more
complicated (fitsSystemWindows doesn't work as the fragment is responsible
for handling insets but how that should work with PreferenceFragmentCompat
is unclear).

Fixes: 2404b2bee632 ("android: Apply UI changes for edge-to-edge views in Android 15+")
10 days agoMerge branch 'android-updates' android-2.6.1
Tobias Brunner [Mon, 27 Oct 2025 14:36:49 +0000 (15:36 +0100)] 
Merge branch 'android-updates'

This fixes the vulnerability in the eap-mschapv2 plugin and an issue
with the filename of log files.  In the released app, the OpenSSL version
is also increased in order to support ML-KEM.

10 days agoandroid: New release after fixing eap-mschapv2 and log file issues
Tobias Brunner [Mon, 27 Oct 2025 14:13:02 +0000 (15:13 +0100)] 
android: New release after fixing eap-mschapv2 and log file issues

OpenSSL is also updated in the released version of the app.

10 days agoandroid: Fix querying display name of the log file
Tobias Brunner [Thu, 16 Oct 2025 14:39:49 +0000 (16:39 +0200)] 
android: Fix querying display name of the log file

The previous code did not necessarily provide it (in particular if the
size, or anything else, was queried as first column).

10 days agoandroid: Use Docker's recommended syntax for env variables
Tobias Brunner [Thu, 16 Oct 2025 13:31:28 +0000 (15:31 +0200)] 
android: Use Docker's recommended syntax for env variables

10 days agoVersion bump to 6.0.3 6.0.3
Andreas Steffen [Mon, 27 Oct 2025 11:28:13 +0000 (12:28 +0100)] 
Version bump to 6.0.3

10 days agoNEWS: Add info about CVE-2025-62291
Tobias Brunner [Fri, 24 Oct 2025 13:22:53 +0000 (15:22 +0200)] 
NEWS: Add info about CVE-2025-62291

10 days agoeap-mschapv2: Fix length check for Failure Request packets on the client
Tobias Brunner [Thu, 9 Oct 2025 09:33:45 +0000 (11:33 +0200)] 
eap-mschapv2: Fix length check for Failure Request packets on the client

For message lengths between 6 and 8, subtracting HEADER_LEN (9) causes
`message_len` to become negative, which is then used in calls to malloc()
and memcpy() that both take size_t arguments, causing an integer
underflow.

For 6 and 7, the huge size requested from malloc() will fail (it exceeds
PTRDIFF_MAX) and the returned NULL pointer will cause a segmentation
fault in memcpy().

However, for 8, the allocation is 0, which succeeds.  But then the -1
passed to memcpy() causes a heap-based buffer overflow (and possibly a
segmentation fault when attempting to read/write that much data).
Fortunately, if compiled with -D_FORTIFY_SOURCE=3 (the default on e.g.
Ubuntu), the compiler will use __memcpy_chk(), which prevents that buffer
overflow and causes the daemon to get aborted immediately instead.

Fixes: f98cdf7a4765 ("adding plugin for EAP-MS-CHAPv2")
Fixes: CVE-2025-62291
10 days agoeap-mschapv2: Fix length check for successful responses on the client
Tobias Brunner [Thu, 9 Oct 2025 09:29:30 +0000 (11:29 +0200)] 
eap-mschapv2: Fix length check for successful responses on the client

While wrong, this isn't an issue in practice as AUTH_RESPONSE_LEN is
long enough that subtracting HEADER_LEN is fine.

Fixes: f98cdf7a4765 ("adding plugin for EAP-MS-CHAPv2")
13 days agoVersion bump 6.0.3rc1 6.0.3rc1
Andreas Steffen [Thu, 23 Oct 2025 13:47:44 +0000 (15:47 +0200)] 
Version bump 6.0.3rc1

13 days agovici: Add event listener of Python bindings to release tarball
Tobias Brunner [Fri, 24 Oct 2025 13:15:45 +0000 (15:15 +0200)] 
vici: Add event listener of Python bindings to release tarball

Fixes: 4e065a96242f ("vici: Add decorators to Python bindings to simplify listening for events")
2 weeks agoNEWS: Add news for 6.0.3
Tobias Brunner [Thu, 9 Oct 2025 09:28:28 +0000 (11:28 +0200)] 
NEWS: Add news for 6.0.3

2 weeks agoFixed some typos, courtesy of codespell
Tobias Brunner [Mon, 6 Oct 2025 15:07:57 +0000 (17:07 +0200)] 
Fixed some typos, courtesy of codespell

2 weeks agopkcs11: Fix comment
Tobias Brunner [Fri, 17 Oct 2025 15:16:32 +0000 (17:16 +0200)] 
pkcs11: Fix comment

Fixes: e9fa338e23cf ("pkcs11: Improve detection of already unwrapped CKA_EC_POINTs")
3 weeks agoMerge branch 'python-decorators'
Tobias Brunner [Thu, 16 Oct 2025 13:05:22 +0000 (15:05 +0200)] 
Merge branch 'python-decorators'

Adds decorators to simplify listening for events.

References strongswan/strongswan#2772

4 weeks agovici: Allow callers of listen() to distinguish between disconnects and intended breaks
Tobias Brunner [Wed, 8 Oct 2025 14:21:33 +0000 (16:21 +0200)] 
vici: Allow callers of listen() to distinguish between disconnects and intended breaks

4 weeks agovici: Export timeout in event listener of Python bindings
Tobias Brunner [Fri, 3 Oct 2025 09:42:11 +0000 (11:42 +0200)] 
vici: Export timeout in event listener of Python bindings

This allows running periodic tasks (e.g. check some outside condition)
and stop listening by raising the StopListening exception.

4 weeks agovici: Provide a way to stop listening and re-connect in Python bindings
Tobias Brunner [Fri, 3 Oct 2025 08:59:03 +0000 (10:59 +0200)] 
vici: Provide a way to stop listening and re-connect in Python bindings

This allows re-connecting to a new session in a disconnect listener and
continue listening without having to return from listen().  The exception
can also be used to stop listening after some condition (e.g. to wait
until a specific SA got created and then stop).

4 weeks agovici: Add decorators to Python bindings to simplify listening for events
Tobias Brunner [Thu, 2 Oct 2025 14:25:58 +0000 (16:25 +0200)] 
vici: Add decorators to Python bindings to simplify listening for events

4 weeks agoappveyor: Change OpenSSL directory on Windows Server 2019 image
Tobias Brunner [Mon, 6 Oct 2025 12:45:49 +0000 (14:45 +0200)] 
appveyor: Change OpenSSL directory on Windows Server 2019 image

The default OpenSSL version has changed to 1.1.1 and the -v111 dir was
removed.

5 weeks agoMerge branch 'vici-alerts'
Tobias Brunner [Thu, 2 Oct 2025 08:22:51 +0000 (10:22 +0200)] 
Merge branch 'vici-alerts'

Exposes alerts via vici protocol.

Closes strongswan/strongswan#2894

5 weeks agobus: Clarify that ALERT_TS_NARROWED is issued for local narrowing as well
Martin Willi [Fri, 26 Sep 2025 14:47:32 +0000 (16:47 +0200)] 
bus: Clarify that ALERT_TS_NARROWED is issued for local narrowing as well

5 weeks agochild-create: Raise an ALERT_TS_MISMATCH when receiving TS_UNACCEPTABLE
Martin Willi [Wed, 24 Sep 2025 13:15:03 +0000 (15:15 +0200)] 
child-create: Raise an ALERT_TS_MISMATCH when receiving TS_UNACCEPTABLE

When sending a TS_UNACCEPTABLE notify, a ALERT_TS_MISMATCH is sent, but
not when receiving one. This seems inconsistent compared to proposal
mismatch handling, so extend the child_create task to raise such an alert.

5 weeks agovici: Raise alert events from the bus alert listener hook
Martin Willi [Tue, 23 Sep 2025 11:01:52 +0000 (13:01 +0200)] 
vici: Raise alert events from the bus alert listener hook

The bus alert infrastructure is currently exposed through the error-notify
plugin using a dedicated socket using a rather archaic message format.
Vici clients would need a dedicated socket connection just to receive such
alert messages, making their implementation more complex.

With vici, it is rather trivial to expose bus alerts through a dedicated
event message that vici clients may subscribe to. Add such an "alert"
event type to vici. Alert names are mapped to strings for simple consumption by
clients.

For now, the error-notify string message is omitted from events, as it mostly
contains static information without much value; instead add the IKE_SA details
for alerts associated to an IKE_SA. Other alert specific data may be added in
the future if needed; preferably using a structured format instead of the
arbitrary string messages used by error-notify. To allow future extensions,
wrap IKE_SA details under a dedicated "ike-sa" property.

5 weeks agolibtls: Use correct constant in error message
Tobias Brunner [Mon, 29 Sep 2025 13:32:13 +0000 (15:32 +0200)] 
libtls: Use correct constant in error message

Closes strongswan/strongswan#2896

Fixes: e7313962808c ("tls-server: Check if peer sent hash and signature algorithms")
5 weeks agogithub: Use OpenSSL 3 for macOS builds and enable additional plugins devel
Tobias Brunner [Thu, 2 Oct 2025 06:47:34 +0000 (08:47 +0200)] 
github: Use OpenSSL 3 for macOS builds and enable additional plugins

The Homebrew formula has been using OpenSSL 3 for a while.  The eap-peap
and pkcs11 plugins also have been enabled in the formula.  The dhcp plugin
is enabled to test the port (the farp plugin was already enabled since
its port to FreeBSD/macOS).  The drbg plugin is enabled to run the ML-KEM
test vectors.

5 weeks agogithub: Build on macOS 14 instead of the deprecated macOS 13
Tobias Brunner [Wed, 1 Oct 2025 13:52:45 +0000 (15:52 +0200)] 
github: Build on macOS 14 instead of the deprecated macOS 13

While macos-13 was running on Intel, both macos-latest (macOS 15) and
macos-14 run on ARM64.  While there are Intel-based images for 14 and 15,
they will only be available until August 2027 (and there aren't any Intel
devices anymore anyway).

5 weeks agogithub: Use OpenSSL 3.6.0 for tests
Tobias Brunner [Wed, 1 Oct 2025 17:07:07 +0000 (19:07 +0200)] 
github: Use OpenSSL 3.6.0 for tests

5 weeks agovici: Remove deprecated license classifier in Python metadata
Tobias Brunner [Mon, 29 Sep 2025 14:25:41 +0000 (16:25 +0200)] 
vici: Remove deprecated license classifier in Python metadata

5 weeks agoMerge branch 'android-updates' android-2.6.0
Tobias Brunner [Wed, 1 Oct 2025 13:19:18 +0000 (15:19 +0200)] 
Merge branch 'android-updates'

This fixes GUI-related compatibility issues with Android 16 and allows
(pre-)selecting on-device certificates/keys with managed profiles.  Also
fixes a typo in the managed config description that prevented
split-tunneling settings from working.

5 weeks agoandroid: New release after updating target SDK and allowing cert selection in managed...
Tobias Brunner [Fri, 26 Sep 2025 13:18:01 +0000 (15:18 +0200)] 
android: New release after updating target SDK and allowing cert selection in managed profiles

5 weeks agoandroid: Fix typo for split-tunneling settings in managed config description
Tobias Brunner [Wed, 1 Oct 2025 12:39:53 +0000 (14:39 +0200)] 
android: Fix typo for split-tunneling settings in managed config description

We use the American spelling "tunneling" throughout the app.

5 weeks agoandroid: Make a certificate alias pre-selectable in managed profiles
Tobias Brunner [Tue, 30 Sep 2025 14:47:42 +0000 (16:47 +0200)] 
android: Make a certificate alias pre-selectable in managed profiles

This allows associating a pre-installed certificate/key with a VPN
profile.  For instance, one locally generated on the device via
SCEP/ETS by the MDM.  It only works if the app is granted access to the
certificate/key (alias) by the MDM.

For now, users may still select a different certificate if one is
available (since this requires the certificate to be installed as
user-selectable there might not be).

5 weeks agoandroid: Prompt the user to edit the profile if no certificate is selected
Tobias Brunner [Tue, 30 Sep 2025 12:19:12 +0000 (14:19 +0200)] 
android: Prompt the user to edit the profile if no certificate is selected

5 weeks agoandroid: Don't print "null" if no user certificate is selected
Tobias Brunner [Fri, 26 Sep 2025 11:49:53 +0000 (13:49 +0200)] 
android: Don't print "null" if no user certificate is selected

5 weeks agoandroid: Allow selecting a user certificate for managed profiles
Tobias Brunner [Thu, 25 Sep 2025 16:37:15 +0000 (18:37 +0200)] 
android: Allow selecting a user certificate for managed profiles

This is only enabled for profiles that are not distributed with a
certificate.

5 weeks agoandroid: Explicitly pull in androidx.localbroadcastmanager
Tobias Brunner [Thu, 25 Sep 2025 15:31:03 +0000 (17:31 +0200)] 
android: Explicitly pull in androidx.localbroadcastmanager

Seems to not get pulled in automatically anymore.  This has actually been
deprecated for years apparently.  Unfortunately, it's not that easy to
replace, so keep it for now.

5 weeks agoandroid: Remove redundant namespace and fix indentation in state fragment layout
Tobias Brunner [Mon, 4 Aug 2025 13:44:16 +0000 (15:44 +0200)] 
android: Remove redundant namespace and fix indentation in state fragment layout

5 weeks agoandroid: Use correct title for proxy server port field in managed configs
Tobias Brunner [Mon, 4 Aug 2025 13:42:21 +0000 (15:42 +0200)] 
android: Use correct title for proxy server port field in managed configs

5 weeks agoandroid: Simplify theme definition due to minSdkVersion
Tobias Brunner [Mon, 4 Aug 2025 13:39:10 +0000 (15:39 +0200)] 
android: Simplify theme definition due to minSdkVersion

5 weeks agoandroid: Remove obsolete TargetApi attribute
Tobias Brunner [Mon, 4 Aug 2025 13:38:26 +0000 (15:38 +0200)] 
android: Remove obsolete TargetApi attribute

5 weeks agoandroid: Update syntax for three values Gradle warns about
Tobias Brunner [Mon, 4 Aug 2025 13:18:02 +0000 (15:18 +0200)] 
android: Update syntax for three values Gradle warns about

Others seem to be fine or even get an explicit error if changed, like
targetSdkVersion.

5 weeks agoandroid: Increase targetSdkVersion to 36 (Android 16)
Tobias Brunner [Mon, 4 Aug 2025 12:50:25 +0000 (14:50 +0200)] 
android: Increase targetSdkVersion to 36 (Android 16)

5 weeks agoandroid: Update NDK version
Tobias Brunner [Mon, 4 Aug 2025 12:50:13 +0000 (14:50 +0200)] 
android: Update NDK version

5 weeks agoandroid: Apply UI changes for edge-to-edge views in Android 15+
Tobias Brunner [Mon, 4 Aug 2025 12:35:11 +0000 (14:35 +0200)] 
android: Apply UI changes for edge-to-edge views in Android 15+

When targeting Android 15, edge-to-edge is the default and when targeting
Android 16, apps can't opt-out from this anymore.  So we update our views
and enable edge-to-edge also for older versions (avoids the black bar
behind the system UI at the bottom).  For most views we just use automatic
margins via android:fitsSystemWindows (or programmatically via
setDecorFitsSystemWindows).  However, for the profile lists and log views,
we take some extra measures that allow the lists to go behind the bottom
system UI.  Appropriate padding is applied at the bottom of the lists so
the last item(s) can be scrolled into full view.

5 weeks agoandroid: Avoid crash if read-only profile selection dialog is hidden
Tobias Brunner [Mon, 4 Aug 2025 12:31:26 +0000 (14:31 +0200)] 
android: Avoid crash if read-only profile selection dialog is hidden

5 weeks agoandroid: Update dependencies
Tobias Brunner [Mon, 28 Jul 2025 12:31:27 +0000 (14:31 +0200)] 
android: Update dependencies

5 weeks agoandroid: Update Gradle plugin
Tobias Brunner [Mon, 28 Jul 2025 12:31:17 +0000 (14:31 +0200)] 
android: Update Gradle plugin

5 weeks agogithub: Use latest SonarQube action
Tobias Brunner [Fri, 26 Sep 2025 13:22:24 +0000 (15:22 +0200)] 
github: Use latest SonarQube action

Updating this although the fixed security issue only affects Windows
builds.

6 weeks agoRemove support for MD2
Tobias Brunner [Tue, 23 Sep 2025 12:59:37 +0000 (14:59 +0200)] 
Remove support for MD2

No part of IKE/IPsec or X.509 uses MD2 anymore, so there really is no
reason to still support it (unlike MD4 that is used in EAP-MSCHAPv2,
MD5 that's used in EAP-MD5, or SHA-1 that's used for e.g. NAT-D hashes).

It caused test vectors to fail on systems where OpenSSL is built with
MD2 support but has it disabled at runtime.

6 weeks agoVersion bump to 6.0.3dr1 6.0.3dr1
Andreas Steffen [Mon, 22 Sep 2025 16:57:54 +0000 (18:57 +0200)] 
Version bump to 6.0.3dr1

7 weeks agoMerge branch 'testing-trixie'
Tobias Brunner [Thu, 18 Sep 2025 09:27:38 +0000 (11:27 +0200)] 
Merge branch 'testing-trixie'

Use Debian trixie as base image for testing.

7 weeks agotesting: Add delay after qemu-nbd -c
Tobias Brunner [Mon, 18 Aug 2025 16:05:01 +0000 (18:05 +0200)] 
testing: Add delay after qemu-nbd -c

Seems that there is a delay before the disk can be used when using newer
QEMU versions (e.g. on Debian trixie). We get errors like these:

  sfdisk: cannot open /dev/nbd0: Inappropriate ioctl for device

or

  mount: /srv/strongswan-testing/build/loop: special device /dev/nbd0p1 does not exist.

A sleep before the next command seems to help.

Also see [1].

[1] https://gitlab.com/qemu-project/qemu/-/issues/1413

7 weeks agotesting: Add option to run tests without leak detective
Tobias Brunner [Fri, 15 Aug 2025 16:32:24 +0000 (18:32 +0200)] 
testing: Add option to run tests without leak detective

This new option allows to disable leak detective to reduce the runtime
during development.  Either only for the command line (swanctl, pki etc.)
or optionally also for the daemon(s).

Disabling leak detective only for the CLI tools already brings a
considerable reduction in runtime (from 48m to 38m on my dev host) as
there are many such calls in the post-test stage.  Any leaks in those
tools are also a lot less of an issue than leaks in the daemon.  So using
this during development should be fine as long as a full test run is done
regularly (in particular before releases).  Disabling leak detective
completely further reduces the runtime (to 30m on my dev host). But that
should probably only be used for functional regression tests after
verifying new code didn't introduce new leaks.

This also fixes the service script which is used for charon-tkm since
16fcdb460afd ("charon-tkm: Don't use starter/stroke with charon-tkm anymore").

7 weeks agotesting: Use Debian trixie to test TKM
Tobias Brunner [Fri, 15 Aug 2025 13:10:21 +0000 (15:10 +0200)] 
testing: Use Debian trixie to test TKM

7 weeks agotesting: Use Debian trixie
Tobias Brunner [Fri, 15 Aug 2025 13:10:09 +0000 (15:10 +0200)] 
testing: Use Debian trixie

7 weeks agotesting: Use proper directory for slapd PID files
Tobias Brunner [Mon, 18 Aug 2025 10:43:50 +0000 (12:43 +0200)] 
testing: Use proper directory for slapd PID files

7 weeks agolibimcv: Add Debian 13 (trixie) to database
Tobias Brunner [Mon, 18 Aug 2025 10:40:18 +0000 (12:40 +0200)] 
libimcv: Add Debian 13 (trixie) to database

7 weeks agotesting: Increase memory for guest hosts to run Debian trixie
Tobias Brunner [Fri, 15 Aug 2025 12:48:49 +0000 (14:48 +0200)] 
testing: Increase memory for guest hosts to run Debian trixie

While some increase was necessary anyway because the idle system requires
about 5-10 MiB more memory, the main issue is resolving the code line and
function name in case of a memory leak.  Calling addr2line requires a lot
more memory than before.  Using backtraces via libbfd doesn't help either
because the trigger is the bfd_find_nearest_line() call we use as well.
And because we'd try to resolve all symbols that way (for whitelisting),
the memory overhead would be even higher and affect every shutdown, even
if no leak occurred.  It also causes a significant time overhead (running
all tests took 75m instead of 48m).

I also tested switching to ASAN/LSAN.  The peak memory usage is slightly
higher than when using libbfd, but enabling it also increased the runtime
overhead a lot (the daemon and swanctl both required about 10-20 MiB more
memory, not just during the shutdown).

7 weeks agotesting: Add support for Debian trixie base images
Tobias Brunner [Fri, 15 Aug 2025 12:47:44 +0000 (14:47 +0200)] 
testing: Add support for Debian trixie base images

7 weeks agotesting: Use pipx to install swidGenerator on Debian trixie
Tobias Brunner [Fri, 15 Aug 2025 12:46:13 +0000 (14:46 +0200)] 
testing: Use pipx to install swidGenerator on Debian trixie

We could use the same approach on bookworm (if the base image is updated),
but just use the old approach there for now.

7 weeks agotesting: Install required packages in venv of updated strongTNC
Tobias Brunner [Fri, 15 Aug 2025 12:45:13 +0000 (14:45 +0200)] 
testing: Install required packages in venv of updated strongTNC

Update revision for some dependency updates.  While python3-setuptools is
installed on the system, the venv apparently can't use it.  legacy-cgi is
required to use that old Django version with newer Python releases.

7 weeks agotesting: Update TKM RPC to be compatible with newer compilers
Tobias Brunner [Fri, 15 Aug 2025 12:43:46 +0000 (14:43 +0200)] 
testing: Update TKM RPC to be compatible with newer compilers

7 weeks agotesting: Use newer version of TKM on trixie
Tobias Brunner [Fri, 15 Aug 2025 12:40:38 +0000 (14:40 +0200)] 
testing: Use newer version of TKM on trixie

The API for libgmpada has change with 1.6 in a way that's not
backwards-compatible.  So we use a different revision that includes
the required changes depending on the Debian version.

This also adds support for esa_select(), to support seamless rekeyings,
which requires updating xfrm-ada as well.

7 weeks agotesting: Run commands in chroot in a login shell
Tobias Brunner [Fri, 15 Aug 2025 12:36:45 +0000 (14:36 +0200)] 
testing: Run commands in chroot in a login shell

Similar to the previous commit, this ensures we have the same environment
we do later on the system.

7 weeks agotesting: Start a login shell in chroot script
Tobias Brunner [Fri, 15 Aug 2025 12:34:17 +0000 (14:34 +0200)] 
testing: Start a login shell in chroot script

This ensures we have the same environment (e.g. stuff from /etc/profile.d)
as when logging in via SSH later.

7 weeks agotesting: Ignore unknown memory in leak detective
Tobias Brunner [Fri, 15 Aug 2025 13:11:48 +0000 (15:11 +0200)] 
testing: Ignore unknown memory in leak detective

This is set in two locations for systemd services and login shells. The
memory is freed by OPENSSL_cleanup().

7 weeks agoleak-detective: Include OpenSSL symbol seen on Debian trixie
Tobias Brunner [Fri, 15 Aug 2025 12:33:16 +0000 (14:33 +0200)] 
leak-detective: Include OpenSSL symbol seen on Debian trixie

7 weeks agotesting: Pass base image codename to application Makefiles
Tobias Brunner [Wed, 13 Aug 2025 12:01:08 +0000 (14:01 +0200)] 
testing: Pass base image codename to application Makefiles

Some might require it to use different revisions or commands.

7 weeks agotesting: Mount /proc in the chroot to make systemctl happy
Tobias Brunner [Wed, 13 Aug 2025 11:57:13 +0000 (13:57 +0200)] 
testing: Mount /proc in the chroot to make systemctl happy

7 weeks agotesting: Use new recommended approach to install key for custom apt repository
Tobias Brunner [Wed, 13 Aug 2025 11:54:01 +0000 (13:54 +0200)] 
testing: Use new recommended approach to install key for custom apt repository

apt-key add is deprecated (and not available in trixie) as it makes the
available for all sources.  The recommended approach makes the key very
specifically available for just our repository.

7 weeks agotesting: Remove unnecessary workaround for DHCP
Tobias Brunner [Wed, 13 Aug 2025 11:52:20 +0000 (13:52 +0200)] 
testing: Remove unnecessary workaround for DHCP

7 weeks agotesting: Move sysctl settings to sysctl.d and add some memory settings
Tobias Brunner [Wed, 13 Aug 2025 11:38:52 +0000 (13:38 +0200)] 
testing: Move sysctl settings to sysctl.d and add some memory settings

Debian trixie doesn't provide a 99-sysctl.conf symlink in that directory
anymore.  The memory settings are also useful there as the default of
one changed and overbooking helps when forking a process with large
memory footprint (e.g. the IKE daemon).

7 weeks agotesting: Remove xconsole config for rsyslogd
Tobias Brunner [Wed, 13 Aug 2025 11:37:36 +0000 (13:37 +0200)] 
testing: Remove xconsole config for rsyslogd

This produces a warning and we don't have X.

7 weeks agogithub: Use AWS-LC 1.61.1 for tests
Tobias Brunner [Thu, 18 Sep 2025 06:29:39 +0000 (08:29 +0200)] 
github: Use AWS-LC 1.61.1 for tests

7 weeks agohost: Don't try to resolve %any* keywords with mismatched address family
Tobias Brunner [Mon, 15 Sep 2025 13:56:26 +0000 (15:56 +0200)] 
host: Don't try to resolve %any* keywords with mismatched address family

While host_create_from_string_and_family() usually replaces %any*
keywords, this fails if the address family doesn't match (e.g. %any4 with
AF_INET6).  There is no point in trying to resolve these keywords via
DNS as % is no valid character for host names.

Closes strongswan/strongswan#2880

7 weeks agogithub: Use latest SonarQube action
Tobias Brunner [Mon, 15 Sep 2025 15:46:03 +0000 (17:46 +0200)] 
github: Use latest SonarQube action

7 weeks agocurl: Fix types enforced by compiler check in newer libcurl headers
Tobias Brunner [Mon, 15 Sep 2025 14:50:26 +0000 (16:50 +0200)] 
curl: Fix types enforced by compiler check in newer libcurl headers

2 months agoMerge branch 'plugin-versions'
Tobias Brunner [Fri, 22 Aug 2025 14:46:10 +0000 (16:46 +0200)] 
Merge branch 'plugin-versions'

This adds a symbol with the current version number to all existing
plugins (the PLUGIN_DEFINE() macro makes this easy).  The version is
checked when a plugin is loaded from a file in order to prevent loading
old plugins from any previous build, which could cause all sorts of
issues.

References strongswan/strongswan#2835

2 months agoplugin-loader: Check version of loaded plugins
Tobias Brunner [Mon, 11 Aug 2025 14:28:46 +0000 (16:28 +0200)] 
plugin-loader: Check version of loaded plugins

This prevents loading plugins from older builds that can cause all sorts
of issues as they might access struct members in different locations.

We don't check the version for statically linked plugins.

2 months agoDefine plugin version in all existing plugins
Tobias Brunner [Mon, 11 Aug 2025 14:35:32 +0000 (16:35 +0200)] 
Define plugin version in all existing plugins

2 months agoplugin: Add macro to define plugin version and constructor
Tobias Brunner [Mon, 11 Aug 2025 14:28:14 +0000 (16:28 +0200)] 
plugin: Add macro to define plugin version and constructor

2 months agoplugin-loader: Don't prevent dynamic linking in addition to static constructors
Tobias Brunner [Mon, 11 Aug 2025 13:55:03 +0000 (15:55 +0200)] 
plugin-loader: Don't prevent dynamic linking in addition to static constructors

When built with static plugins and constructors, we might still want to
be able to load external plugins.

Fixes: d860c26e9533 ("plugin-loader: Properly support compilation without dlopen()/dlsym() etc.")
2 months agopkcs11: Improve detection of already unwrapped CKA_EC_POINTs
Tobias Brunner [Thu, 21 Aug 2025 08:24:37 +0000 (10:24 +0200)] 
pkcs11: Improve detection of already unwrapped CKA_EC_POINTs

If an uncompressed point is already unwrapped (incorrect but some tokens/
modules do this) and therefore still looks like an ASN.1 octet string,
there could be false positives with the previous checks that lead to
mangled points.

By ensuring that we unwrapped the complete ASN.1 chunk, we can already
reduce the false positive rate when the assumed length is smaller than
the chunk, which we previously accepted but isn't the case in correctly
encoded points.

And while we already checked that the first byte indicates a valid point
type/encoding, there could still be false positives.  We can avoid those
with some checks on the length of the unwrapped point.  In particular,
enforcing a multiple of 4/8 should fail for valid unwrapped points where
three bytes were removed in the process (ASN.1 tag and length, point
encoding).

Closes strongswan/strongswan#2872

2 months agocharon-cmd: Cache shared secret under identities if available
Tobias Brunner [Mon, 11 Aug 2025 13:37:51 +0000 (15:37 +0200)] 
charon-cmd: Cache shared secret under identities if available

We won't have identities for private key passwords, but we do for EAP
identities and they might get reused if redirected.

2 months agoike-sa-manager: Avoid deadlock due to race condition during shutdown
Tobias Brunner [Mon, 11 Aug 2025 12:24:16 +0000 (14:24 +0200)] 
ike-sa-manager: Avoid deadlock due to race condition during shutdown

If an entry is added while we wait for a checked out SA in flush() (e.g.
due to an action performed by that SA), new entries might get inserted
before the one we wait for.  If that was the first entry in the row, we
didn't correctly update the table and the new entries were basically lost
by overwriting the first entry in the row.  As the SA count was still
increased but the new entries couldn't get enumerated, the daemon wasn't
terminated properly but was stuck in the loop in flush().

2 months agotrap-manager: Migrate tracked IKE SA in case of redirect during IKE_AUTH
Tobias Brunner [Mon, 11 Aug 2025 08:33:00 +0000 (10:33 +0200)] 
trap-manager: Migrate tracked IKE SA in case of redirect during IKE_AUTH

2 months agocontroller: Migrate tracked IKE SA in case of redirect during IKE_AUTH
Tobias Brunner [Mon, 11 Aug 2025 08:26:55 +0000 (10:26 +0200)] 
controller: Migrate tracked IKE SA in case of redirect during IKE_AUTH

2 months agoike-sa: Avoid reusing established IKE_SAs that got redirected
Tobias Brunner [Thu, 7 Aug 2025 09:56:25 +0000 (11:56 +0200)] 
ike-sa: Avoid reusing established IKE_SAs that got redirected

These will get terminated by the peer after a while.  So we don't want
to reuse them.

2 months agovici: Fix indentation for some add_kv() calls
Tobias Brunner [Thu, 21 Aug 2025 13:53:40 +0000 (15:53 +0200)] 
vici: Fix indentation for some add_kv() calls

2 months agovici: Include configured local and remote ports in list-conns
Mathias Aerts [Thu, 21 Aug 2025 10:59:00 +0000 (12:59 +0200)] 
vici: Include configured local and remote ports in list-conns

Closes strongswan/strongswan#2869

2 months agogithub: Only run CI for latest commit in a branch, cancel old runs
Tobias Brunner [Fri, 22 Aug 2025 10:21:50 +0000 (12:21 +0200)] 
github: Only run CI for latest commit in a branch, cancel old runs

2 months agolibipsec: Run unit tests with TESTS_PLUGINS if specified
Tobias Brunner [Fri, 22 Aug 2025 10:11:11 +0000 (12:11 +0200)] 
libipsec: Run unit tests with TESTS_PLUGINS if specified

2 months agolibtls: Fix double-free when enumerating private keys
Tobias Brunner [Fri, 22 Aug 2025 09:46:52 +0000 (11:46 +0200)] 
libtls: Fix double-free when enumerating private keys

2 months agotesting: Disable deprecated features in Botan
Tobias Brunner [Fri, 22 Aug 2025 06:34:01 +0000 (08:34 +0200)] 
testing: Disable deprecated features in Botan

We keep MD5 enabled for now as we need it for TLS 1.0/1.1.  Once we
remove that we can reconsider (although, it's also needed for EAP-MD5
and since MD4 is disabled as well, which means EAP-MSCHAPv2 won't
be available, we'd be left with only EAP-GTC for simple username/password
authentication, which nobody else supports).

2 months agobotan: Replace calls to deprecated botan_privkey|pubkey_export()
Tobias Brunner [Mon, 12 May 2025 14:14:17 +0000 (16:14 +0200)] 
botan: Replace calls to deprecated botan_privkey|pubkey_export()

2 months agogithub: Use OpenSSL 3.5.2 for tests
Tobias Brunner [Fri, 8 Aug 2025 08:28:06 +0000 (10:28 +0200)] 
github: Use OpenSSL 3.5.2 for tests

2 months agogithub: Use AWS-LC 1.58.1 for tests
Tobias Brunner [Mon, 28 Jul 2025 08:30:02 +0000 (10:30 +0200)] 
github: Use AWS-LC 1.58.1 for tests