]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
2 months agoopenssl: Handle EdDSA keys from engines special again
Tobias Brunner [Fri, 27 Mar 2026 10:04:54 +0000 (11:04 +0100)] 
openssl: Handle EdDSA keys from engines special again

Fixes: 052a93955332 ("openssl: Add support for Ed25519 via AWS-LC")
2 months agocertreq: Avoid OOB read when enumerating hashes in OCSP CERTREQ
Tobias Brunner [Wed, 25 Mar 2026 17:49:45 +0000 (18:49 +0100)] 
certreq: Avoid OOB read when enumerating hashes in OCSP CERTREQ

These certificate requests also contain SHA-1 hashes, which is assumed
in `ike_cert_pre.c::process_certreq()` when enumerating key IDs.

Because the parser allocates a separate chunk for the data and the
enumerator doesn't read beyond that chunk's length after the first
iteration, only lengths between 1 and 19 are problematic (0 doesn't
cause an enumeration because chunk_empty is assigned).

Whether the OOB read then can cause a segmentation fault depends on the
allocator, its alignment rules, and its minimum overhead.  For instance,
with glibc on a typical 64-bit system (8 bytes for pointers and size_t),
the alignment is 16 bytes and the minimum allocated size is 32 bytes,
with typically 24 that are technically available for data, even if only
0 bytes are allocated (as returned by `malloc_usable_size()`).  So with
an allocation between 1 and 19, we can always safely read 20 bytes.

Assuming that other allocators behave similar for small allocations, it
seems unlikely that this causes a crash.

Fixes: 15612b3a4243 ("Add support for IKEv2 OCSP extensions (RFC 4806)")
2 months agovici: Prevent uninitialized memory access if VICI_LIST_ITEM is too short
Tobias Brunner [Wed, 25 Mar 2026 08:56:06 +0000 (09:56 +0100)] 
vici: Prevent uninitialized memory access if VICI_LIST_ITEM is too short

If there is only a single length byte, `value` is not changed and points
to uninitialized data.

2 months agotnccs_11: Avoid crash if TNCCS-ReasonStrings is empty or only contains empty nodes
Tobias Brunner [Wed, 25 Mar 2026 08:51:31 +0000 (09:51 +0100)] 
tnccs_11: Avoid crash if TNCCS-ReasonStrings is empty or only contains empty nodes

`xmlNodeGetContent()` returns `NULL` if `child` is `NULL`, which causes
a segmentation fault in `chunk_from_str()`.

Fixes: ec1eab03195b ("fixed XML parsing of TNCCS 1.1 ReasonString message")
2 months agoeap-sim: Prevent infinite loop if version list contains more than one entry
Tobias Brunner [Wed, 25 Mar 2026 08:42:15 +0000 (09:42 +0100)] 
eap-sim: Prevent infinite loop if version list contains more than one entry

Fixes: ac4dd5439b22 ("Migrated EAP-SIM to libsimaka, separated server/peer implementations")
2 months agorevocation: Fix memory leak if nonce in OCSP response doesn't match
Tobias Brunner [Mon, 23 Mar 2026 18:03:58 +0000 (19:03 +0100)] 
revocation: Fix memory leak if nonce in OCSP response doesn't match

2 months agomessage: Drop fragments with total fragment count lower than before
Tobias Brunner [Mon, 23 Mar 2026 17:58:18 +0000 (18:58 +0100)] 
message: Drop fragments with total fragment count lower than before

The RFC only allows that the number of fragments increases (if the
sender reduces the MTU).

Not enforcing this before could cause early reassembly as the trigger was
that the number of received fragments matches the total count of the
current packet (which was a bit weird anyway).  Only an active MITM could
trigger this as individual fragments are encrypted and authenticated.

2 months agocredential-factory: Enforce an upper limit when creating nested credentials
Tobias Brunner [Fri, 20 Mar 2026 16:20:55 +0000 (17:20 +0100)] 
credential-factory: Enforce an upper limit when creating nested credentials

This mainly intended as defense-in-depth measure to avoid parsing
massively nested structures that could cause a call stack overflow due
to the massive recursion.  In particular PKCS#7 signed data is prone to
this as these can be nested basically infinitely.  When used in IKEv1 via
ENC_PKCS7_WRAPPED_X509 CERT payloads, our default of 10000 bytes for IKE
messages guards against this, but that's configurable and there might be
a chance for some bug that triggers problematic recursive parsing for
smaller input.

The upper limit is chosen arbitrarily, but there are currently no known
cases that require a depth of more than 10 levels.

2 months agotls-peer: Ensure TLS 1.3 CertificateRequest structure is valid
Tobias Brunner [Fri, 20 Mar 2026 15:05:27 +0000 (16:05 +0100)] 
tls-peer: Ensure TLS 1.3 CertificateRequest structure is valid

If nothing was read from the message, the previous code could result in
a crash depending on where `ext.ptr` pointed to, as determined by the
current stack contents.  Since TLS 1.3 is still disabled by default and
this is usually used for TLS-based EAP methods after validating the
IKEv2 server's certificate, the real world impact seems relatively low.

Fixes: 9ef46cfaf917 ("tls-peer: Mutual authentication support for TLS 1.3")
2 months agolibsimaka: Prevent out-of-bounds read when parsing attributes with actual length...
Tobias Brunner [Fri, 20 Mar 2026 14:48:41 +0000 (15:48 +0100)] 
libsimaka: Prevent out-of-bounds read when parsing attributes with actual length field

These attributes contain a 16-bit length field for the actual length of
the data in bits or bytes, as compared to the length in 4-byte blocks in
the attribute header.  The previous code didn't correctly account for the
length of the fixed header (4 bytes) when it compared the parsed length
to the length in the header.  This could cause an out-of-bounds read of
up to four bytes beyond the end of the attribute/message.

Fixes: f8330d03953b ("Added a libsimaka library with shared message handling code for EAP-SIM/AKA")
2 months agonm: Ignore all .gmo files
Tobias Brunner [Thu, 2 Apr 2026 05:54:04 +0000 (07:54 +0200)] 
nm: Ignore all .gmo files

2 months agodhcp: Use correct getter for boolean force_server_address option
Tobias Brunner [Wed, 1 Apr 2026 12:01:02 +0000 (14:01 +0200)] 
dhcp: Use correct getter for boolean force_server_address option

2 months agoopenssl: Fix return value if returning EdDSA public key fails
Tobias Brunner [Wed, 1 Apr 2026 11:49:08 +0000 (13:49 +0200)] 
openssl: Fix return value if returning EdDSA public key fails

2 months agoUse Botan 3.11.1 for tests
Tobias Brunner [Wed, 1 Apr 2026 07:07:26 +0000 (09:07 +0200)] 
Use Botan 3.11.1 for tests

2 months agonm: Add Georgian translation
Ekaterine Papava [Wed, 1 Apr 2026 10:22:39 +0000 (12:22 +0200)] 
nm: Add Georgian translation

Closes strongswan/strongswan#3041

Signed-off-by: Ekaterine Papava <papava.e@gtu.ge>
2 months agoIgnore tarball checksums and signatures
Andreas Steffen [Mon, 23 Mar 2026 16:24:53 +0000 (17:24 +0100)] 
Ignore tarball checksums and signatures

2 months agoVersion bump to 6.0.5 6.0.5
Andreas Steffen [Mon, 23 Mar 2026 12:41:52 +0000 (13:41 +0100)] 
Version bump to 6.0.5

2 months agoNEWS: Add info about CVE-2026-25075
Tobias Brunner [Fri, 20 Mar 2026 15:28:20 +0000 (16:28 +0100)] 
NEWS: Add info about CVE-2026-25075

2 months agoeap-ttls: Prevent crash if AVP length header field is invalid
Tobias Brunner [Thu, 5 Mar 2026 11:43:12 +0000 (12:43 +0100)] 
eap-ttls: Prevent crash if AVP length header field is invalid

The length field in the AVP header includes the 8 bytes of the header
itself.  Not checking for that and later subtracting it causes an
integer underflow that usually triggers a crash when accessing a
NULL pointer that resulted from the failing chunk_alloc() call because
of the high value.

The attempted allocations for invalid lengths (0-7) are 0xfffffff8,
0xfffffffc, or 0x100000000 (0 on 32-bit hosts), so this doesn't result
in a buffer overflow even if the allocation succeeds.

Fixes: 79f2102cb442 ("implemented server side support for EAP-TTLS")
Fixes: CVE-2026-25075
2 months agoUse wolfSSL 5.9.0 for tests
Tobias Brunner [Thu, 19 Mar 2026 08:18:08 +0000 (09:18 +0100)] 
Use wolfSSL 5.9.0 for tests

2 months agoconf: Install charon-specific snippets also when charon itself is not built
Tobias Brunner [Tue, 17 Mar 2026 07:27:37 +0000 (08:27 +0100)] 
conf: Install charon-specific snippets also when charon itself is not built

To make the default strongswan.conf, with `load_modular` enabled, work
if charon itself is not built, we enable generating the charon-specific
snippets also for the two other daemons that fall back on reading
options from the `charon` section.

2 months agoconf: Generate and install config snippets also for charon-cmd and charon-nm
Tobias Brunner [Tue, 10 Mar 2026 16:43:08 +0000 (17:43 +0100)] 
conf: Generate and install config snippets also for charon-cmd and charon-nm

This allows easier customization for distributions (e.g. disable some
plugins by default).

2 months agogithub: Use AWS-LC 1.70.0 for tests
Tobias Brunner [Mon, 16 Mar 2026 10:35:55 +0000 (11:35 +0100)] 
github: Use AWS-LC 1.70.0 for tests

2 months agofuzz: Add dependency to fuzz RADIUS message parsing
Arthur Chan [Wed, 11 Mar 2026 22:57:49 +0000 (22:57 +0000)] 
fuzz: Add dependency to fuzz RADIUS message parsing

Due to the static build, libcharon will depend on libradius as soon as
eap-radius is enabled even if not actually used.  So in order to avoid
breaking the build of fuzz_ike when enabling this in CIFuzz, enable
it now before adding the actual fuzzer.

Closes strongswan/strongswan#3028

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
2 months agovici: Prevent uninitialized memory access when finding VICI_END in message
Tobias Brunner [Fri, 13 Mar 2026 08:35:28 +0000 (09:35 +0100)] 
vici: Prevent uninitialized memory access when finding VICI_END in message

VICI_END (7) shouldn't be encoded in a message.  However, if we encounter
it, we should at least set `out` accordingly so callers can abort the
enumeration.  By not doing so previously and returning TRUE, callers
might access the possibly uninitialized name/value arguments passed to
the enumerator.

2 months agogmp: Reject public keys with public exponent e < 3
Tobias Brunner [Wed, 11 Mar 2026 17:16:53 +0000 (18:16 +0100)] 
gmp: Reject public keys with public exponent e < 3

This ensures that we don't load a key with e=1, which basically renders
RSA into a no-op.  Since keys are universally generated with e=65537 and
no reputable CA will sign keys with e=1, allowing this before didn't have
any real world impact.

2 months agoVersion bump to 6.0.5dr1 6.0.5dr1
Andreas Steffen [Mon, 23 Feb 2026 19:02:58 +0000 (20:02 +0100)] 
Version bump to 6.0.5dr1

3 months agogithub: Use AWS-LC 1.69.0 for tests
Tobias Brunner [Wed, 4 Mar 2026 15:30:48 +0000 (16:30 +0100)] 
github: Use AWS-LC 1.69.0 for tests

3 months agostring: Fix -Werror=discarded-qualifiers with GCC 15
Dustin Kirkland [Thu, 26 Feb 2026 17:25:27 +0000 (11:25 -0600)] 
string: Fix -Werror=discarded-qualifiers with GCC 15

GCC 15 tightened its built-in declarations for strchr() and strstr() so
that they now propagate const from their first argument, triggering
-Werror=discarded-qualifiers on three assignments in string.c:

  translate():
    char *match = strchr(from, *pos)
    `from` is const char *, so the result of strchr() is const char *.
    `match` is only used for pointer arithmetic (match - from), so
    declaring it const char * is correct and safe.

  strreplace():
    found = strstr(str, search)         [line ~73]
    found = strstr(pos, search)         [line ~89, while condition]
    `str`/`pos` are derived from a const char * parameter, so strstr()
    returns const char *. `found` is used as a mutable char * later
    (pos = found + slen), consistent with the existing (char*) casts
    already used throughout this function for the same reason.
    Add explicit (char*) casts to match the established pattern.

Closes strongswan/strongswan#3015

3 months agoNEWS: Add news for 6.0.5
Tobias Brunner [Tue, 3 Mar 2026 13:58:16 +0000 (14:58 +0100)] 
NEWS: Add news for 6.0.5

3 months agoUse distinct identifier for "command" group in pki/swanctl to fix apidoc
Tobias Brunner [Mon, 2 Mar 2026 15:42:38 +0000 (16:42 +0100)] 
Use distinct identifier for "command" group in pki/swanctl to fix apidoc

3 months agoFixed some typos, courtesy of codespell
Tobias Brunner [Mon, 2 Mar 2026 15:30:12 +0000 (16:30 +0100)] 
Fixed some typos, courtesy of codespell

3 months agoswanctl: Check for conflicts with existing and shared options when registering commands
Tobias Brunner [Mon, 23 Feb 2026 10:20:19 +0000 (11:20 +0100)] 
swanctl: Check for conflicts with existing and shared options when registering commands

3 months agopki: Avoid conflict between --verify and --debug
Tobias Brunner [Mon, 23 Feb 2026 10:19:35 +0000 (11:19 +0100)] 
pki: Avoid conflict between --verify and --debug

Add shared options to the man page.

3 months agoswanctl: Check for conflicts with shared options when registering commands
Tobias Brunner [Mon, 23 Feb 2026 10:13:55 +0000 (11:13 +0100)] 
swanctl: Check for conflicts with shared options when registering commands

Also suppress errors when pre-processing shared options (this was missing
here but already used in pki).

3 months agoswanctl: Avoid conflict between --uninstall and --uri
Tobias Brunner [Mon, 23 Feb 2026 10:03:52 +0000 (11:03 +0100)] 
swanctl: Avoid conflict between --uninstall and --uri

Also update the man page (including the -V change in the previous commit
and documenting the global options).

3 months agoswanctl: Assigned -V to --version since -v is now used for global --debug
Andreas Steffen [Sun, 22 Feb 2026 09:22:19 +0000 (10:22 +0100)] 
swanctl: Assigned -V to --version since -v is now used for global --debug

3 months agostream: Clarify that some methods must not be called from callbacks
Tobias Brunner [Mon, 16 Feb 2026 11:05:34 +0000 (12:05 +0100)] 
stream: Clarify that some methods must not be called from callbacks

3 months agowhitelist: Fix deadlock when handling client disconnection
seantywork [Sun, 15 Feb 2026 09:40:49 +0000 (09:40 +0000)] 
whitelist: Fix deadlock when handling client disconnection

Calling stream_t::destroy from the stream_t::on_read callback will
block the thread in watcher_t::remove because the FD is currently "in
callback".  A similar issue was fixed in the lookip plugin with
961409b66858 ("lookip: Disconnect asynchronously to avoid dead-locking
watcher unregistration").

Fixes: 85ebf6abd441 ("whitelist: Add error handling to socket reads and fix a memory leak")
3 months agokernel-netlink: Don't fallback to peer address as gateway/nexthop
Tobias Brunner [Fri, 29 Nov 2024 13:57:31 +0000 (14:57 +0100)] 
kernel-netlink: Don't fallback to peer address as gateway/nexthop

This doesn't really seem useful (perhaps it was before we started to
configure the outbound interface on our routes). And it can actually
cause the route installation to fail e.g. for routes over point-to-point
interfaces where we'd get "Error: Nexthop has invalid gateway" errors.

Note that we can't return NULL if we find an interface as e.g. the updown
plugin uses this method to determine the outbound interface (it ignores
the nexthop), which it passes to the script.  If we returned NULL, it
would pass "unknown" instead, which would cause the firewall rules to
mismatch.  While it seems that 0.0.0.0/:: is ignored as nexthop by the
kernel on the installed route, I still explicitly ignore such addresses
to avoid any unintended side-effects.

The automatic route installation in the ikev2/shunt-manual-prio scenario
had to be disabled on the clients.  The reason is that the route in table
220 won't have a nexthop set (the peers are directly connected), so when
trying to reach alice or venus via SSH, which matches the port-specific
bypass policies for which we don't install throw routes, the hosts will
do ARP requests for the target IPs instead of routing the packets via
moon.

Closes strongswan/strongswan#2548

3 months agovici: Document attributes for additional KE methods in list-sa event
Tobias Brunner [Fri, 20 Feb 2026 10:53:15 +0000 (11:53 +0100)] 
vici: Document attributes for additional KE methods in list-sa event

3 months agogithub: Replace action for TKM tests with direct "docker run" call
Tobias Brunner [Fri, 20 Feb 2026 11:34:04 +0000 (12:34 +0100)] 
github: Replace action for TKM tests with direct "docker run" call

The action causes errors because it is not compatible to the Docker
version used in the runner images.  Unfortunately, it doesn't seem
maintained anymore.  The action is simple enough, though, so instead of
switching to a fork, we just use "docker run" directly.

3 months agogithub: Add a link to the docs in the new issue config
Tobias Brunner [Tue, 17 Feb 2026 09:18:10 +0000 (10:18 +0100)] 
github: Add a link to the docs in the new issue config

Also reword the discussion link description a bit.

3 months agoMerge branch 'icmp-forwarding'
Tobias Brunner [Thu, 12 Feb 2026 15:21:46 +0000 (16:21 +0100)] 
Merge branch 'icmp-forwarding'

Adds support for ICMP error forwarding that the kernel supports properly
since v6.9 (it still sends locally generated errors from the wrong source
IP, though).

3 months agotesting: Add scenarios to test ICMP forwarding
Tobias Brunner [Thu, 15 Jan 2026 10:04:05 +0000 (11:04 +0100)] 
testing: Add scenarios to test ICMP forwarding

3 months agovici: Make ICMP forwarding configurable
Tobias Brunner [Mon, 7 Feb 2022 13:48:49 +0000 (14:48 +0100)] 
vici: Make ICMP forwarding configurable

3 months agochild-sa: Enable ICMP forwarding on SA and policies if configured
Tobias Brunner [Mon, 7 Feb 2022 13:35:39 +0000 (14:35 +0100)] 
child-sa: Enable ICMP forwarding on SA and policies if configured

3 months agochild-cfg: Add flag to enable ICMP forwarding
Tobias Brunner [Mon, 7 Feb 2022 13:21:43 +0000 (14:21 +0100)] 
child-cfg: Add flag to enable ICMP forwarding

3 months agokernel-netlink: Enable ICMP forwarding on inbound SA and out/fwd policies
Tobias Brunner [Mon, 7 Feb 2022 13:21:01 +0000 (14:21 +0100)] 
kernel-netlink: Enable ICMP forwarding on inbound SA and out/fwd policies

3 months agokernel-ipsec: Add flags to enable ICMP error forwarding
Tobias Brunner [Mon, 7 Feb 2022 13:20:39 +0000 (14:20 +0100)] 
kernel-ipsec: Add flags to enable ICMP error forwarding

For the Linux kernel, this has to be enabled on the inbound SA and the
out and fwd policies.

3 months agoipsec-types: Add a proper hash function for ipsec_sa_cfg_t
Tobias Brunner [Mon, 7 Feb 2022 13:28:19 +0000 (14:28 +0100)] 
ipsec-types: Add a proper hash function for ipsec_sa_cfg_t

While 3c1290510366 ("ipsec: Add function to compare two ipsec_sa_cfg_t
instances") added a comparison function to avoid issues with non-zeroed
padding, hashes were still calculated using chunk_hash().

3 months agobus: Prevent redundant down event on rekeyed CHILD_SA delete timeout
Martin Willi [Thu, 12 Feb 2026 07:53:01 +0000 (08:53 +0100)] 
bus: Prevent redundant down event on rekeyed CHILD_SA delete timeout

If a CHILD_SA is rekeyed using a CREATE_CHILD_SA request, a subsequent
DELETE for the old CHILD_SA may time out. Before sending this DELETE,
a CHILD_REKEYED state CHILD_SA set from child_rekey::process_i() is
immediately set to CHILD_DELETING from child_delete::build_i(). If the
IKE_SA dies due to a retransmission timeout of this DELETE, a redundant
child-down event is issued for the rekeyed CHILD_SA that has already seen a
child-rekey event.

A reproducer shows the following log and events:

    [CFG] vici rekey CHILD_SA #533
    [IKE] establishing CHILD_SA XXX{534} reqid 20
    [ENC] generating CREATE_CHILD_SA request 0 [ N(REKEY_SA) SA No KE TSi TSr ]
    [ENC] parsed CREATE_CHILD_SA response 0 [ SA No TSi TSr ]
    [IKE] rekeyed CHILD_SA XXX{533} with SPIs ca997de6_i cd27d4fe_o with XXX{534} with SPIs ced1cd01_i c460a7c9_o
     Event: child-rekey
      [OLD SA] state: REKEYING, spi-in: ca997de6
      [NEW SA] state: INSTALLED, spi-in: ced1cd01
    [IKE] closing CHILD_SA XXX{533} with SPIs ca997de6_i (352 bytes) cd27d4fe_o (264 bytes) and TS 0.0.0.0/0 === 10.11.9.40/29
    [IKE] sending DELETE for ESP CHILD_SA with SPI ca997de6
    [ENC] generating INFORMATIONAL request 1 [ D ]
    [IKE] retransmit 1 of request with message ID 1
    [IKE] retransmit 2 of request with message ID 1
    [IKE] retransmit 3 of request with message ID 1
    [IKE] retransmit 4 of request with message ID 1
    [IKE] giving up after 4 retransmits
     Event: child-updown
      [SA] state: DELETING, spi-in: ca997de6
     Event: child-updown
      [SA] state: INSTALLED, spi-in: ced1cd01

To prevent the redundant child-down event for the successfully rekeyed CHILD_SA,
check if a DELETING CHILD_SA has already removed its outbound state due to
having been rekeyed before issuing the child-down event.

Add a new exchange test exercising that a delete timeout after rekeying does
not cause a duplicate child-down event.

3 months agoRemove accidentally committed libtool script
Tobias Brunner [Mon, 9 Feb 2026 15:04:23 +0000 (16:04 +0100)] 
Remove accidentally committed libtool script

Fixes: 3e5a528aec09 ("tpm: Auto-detection of legacy TPM 2.0 devices")
3 months agoMerge branch 'swanctl-plugins'
Tobias Brunner [Fri, 6 Feb 2026 15:10:50 +0000 (16:10 +0100)] 
Merge branch 'swanctl-plugins'

Uses a separate default plugin list for swanctl (instead of just loading
all of libstrongswan's plugins) to avoid some side-effects of loaded but
unused plugins.  The load statements in the regression tests have been
updated accordingly.

A new configure option for maintainers of distributions that ship
plugins in separate packages changes the message if a plugin is not
found and reduces its log level.  This confused users of tools that don't
use modular plugin loading (e.g. pki or swanctl).

Also changes command line handling in pki and swanctl so that the shared
options can be passed before the actual command and that the debug level
also affects library/plugin initialization.

References strongswan/strongswan#2971

3 months agoswanctl: Add global --debug, --options and --uri arguments
Tobias Brunner [Fri, 30 Jan 2026 11:20:05 +0000 (12:20 +0100)] 
swanctl: Add global --debug, --options and --uri arguments

Similarly to the previous commit for pki, this allows setting these
options before the command, and by pre-parsing them we can see log
messages during the initialization.

3 months agodebug: Add helper to get the current default log level for a group
Tobias Brunner [Fri, 30 Jan 2026 11:44:53 +0000 (12:44 +0100)] 
debug: Add helper to get the current default log level for a group

3 months agopki: Add global --debug and --options arguments
Tobias Brunner [Thu, 29 Jan 2026 16:32:03 +0000 (17:32 +0100)] 
pki: Add global --debug and --options arguments

This allows setting the log level before initializing the library and
loading the plugins, as well as having the top-level command itself in
an options file.

3 months agoplugin-loader: Add option to change log message if plugin is not found
Tobias Brunner [Wed, 28 Jan 2026 14:45:23 +0000 (15:45 +0100)] 
plugin-loader: Add option to change log message if plugin is not found

Distributions like Debian/Ubuntu ship the plugins in multiple packages
that are not all installed by default.  When running tools like pki or
swanctl, which don't use modular loading with config snippets by default,
there are errors in the output if these packages and plugins are
currently not available.  In order to not alarm users, this change adds
a configure option that package maintainers can use.  It causes the log
level of the message to increase and also adds a note that mentions that
plugins are potentially available in other packages (which should be the
case unless the user tried to load a plugin, e.g. via load statement,
that is not actually built and shipped by the package maintainers).

3 months agotesting: Remove unused revocation and constraints plugins for swanctl
Tobias Brunner [Mon, 5 Jan 2026 16:23:06 +0000 (17:23 +0100)] 
testing: Remove unused revocation and constraints plugins for swanctl

swanctl doesn't do any (online) certificate validation, it just parses
and or decrypts them and passes them on to the daemon.

3 months agoswanctl: Use a custom default plugin list
Tobias Brunner [Mon, 5 Jan 2026 15:32:02 +0000 (16:32 +0100)] 
swanctl: Use a custom default plugin list

Loading all libstrongswan plugins isn't necessary as the tool only uses
the plugins to parse/decrypt credentials.  So it's similar to pki, but
it doesn't do (online) certificate validation, access tokens, or need
access to databases.

While it's usually not an issue to load unnecessary plugins, one thing
that came up recently are the new capabilities required by the agent
plugin.  Since Debian's AppArmor policy for swanctl doesn't grant them,
this produces an error message that might confuse users.

3 months agoconfigure: Load ldap plugin in pki
Tobias Brunner [Mon, 5 Jan 2026 15:27:01 +0000 (16:27 +0100)] 
configure: Load ldap plugin in pki

It's a fetcher plugin used for online certificate validation.

3 months agostream-service-unix: Remove unnecessary execute permission from sockets
Tobias Brunner [Thu, 15 Jan 2026 14:14:32 +0000 (15:14 +0100)] 
stream-service-unix: Remove unnecessary execute permission from sockets

References strongswan/strongswan#2983

3 months agofuzz-ike: Initialize libcharon as logging will cause crashes otherwise
Tobias Brunner [Fri, 6 Feb 2026 07:12:52 +0000 (08:12 +0100)] 
fuzz-ike: Initialize libcharon as logging will cause crashes otherwise

The bus.h header file redirects DBG* macros to the bus but that won't be
available unless libcharon is initialized.

3 months agotesting: Add a reauthentication to ikev2/dhcp-static-client-id
Tobias Brunner [Thu, 5 Feb 2026 16:53:58 +0000 (17:53 +0100)] 
testing: Add a reauthentication to ikev2/dhcp-static-client-id

This verifies that we don't release the lease when the old SA is
deleted during the reauthentication.

3 months agodhcp: Don't release the address via DHCP if it's still used
Tobias Brunner [Thu, 18 Dec 2025 14:51:02 +0000 (15:51 +0100)] 
dhcp: Don't release the address via DHCP if it's still used

This is useful during make-before-break reauthentication, where the
new SA is created before the old one is terminated and the virtual IP
gets released.

This also changes the hash() and equals() functions to avoid potential
collisions.

References strongswan/strongswan#2967

3 months agoMerge branch 'cifuzz'
Tobias Brunner [Wed, 4 Feb 2026 11:38:37 +0000 (12:38 +0100)] 
Merge branch 'cifuzz'

Add CIFuzz on GitHub.

Closes strongswan/strongswan#2993

3 months agogithub: Also run UBSan with CIFuzz
Tobias Brunner [Fri, 30 Jan 2026 14:06:14 +0000 (15:06 +0100)] 
github: Also run UBSan with CIFuzz

3 months agogithub: Add latest CIFuzz
Arthur Chan [Thu, 29 Jan 2026 08:33:30 +0000 (08:33 +0000)] 
github: Add latest CIFuzz

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
4 months agopubkey-authenticator: Avoid conflict with config switch based on EAP-Identity
Tobias Brunner [Thu, 8 Jan 2026 07:59:11 +0000 (08:59 +0100)] 
pubkey-authenticator: Avoid conflict with config switch based on EAP-Identity

The referenced commit ignored that INVALID_ARG was returned by this
authenticator if an unsupported signature scheme is encountered.  This
caused a crash in find_alternative_eap_cfg() as no EAP identity is
stored in the current auth config.

Since we don't distinguish the situation outside of the authenticator,
we can just return FAILED.

Closes strongswan/strongswan#2979

Fixes: 2f2e4abe3c52 ("ikev2: Add support to switch peer configs based on EAP-Identities")
4 months agogithub: Use AWS-LC 1.67.0 for tests
Tobias Brunner [Wed, 28 Jan 2026 10:30:30 +0000 (11:30 +0100)] 
github: Use AWS-LC 1.67.0 for tests

4 months agogithub: Use OpenSSL 3.6.1 for tests
Tobias Brunner [Wed, 28 Jan 2026 10:27:53 +0000 (11:27 +0100)] 
github: Use OpenSSL 3.6.1 for tests

4 months agoike-init: Simplify adding extension notifies to IKE_SA_INIT
Tobias Brunner [Mon, 20 Oct 2025 15:45:39 +0000 (17:45 +0200)] 
ike-init: Simplify adding extension notifies to IKE_SA_INIT

4 months agooss-fuzz: Add new fuzzer for libcharon IKE message parser
Arthur Chan [Wed, 21 Jan 2026 05:13:26 +0000 (05:13 +0000)] 
oss-fuzz: Add new fuzzer for libcharon IKE message parser

Closes strongswan/strongswan#2988

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
4 months agoappveyor: Reduce runtime by using lld instead of ld
Tobias Brunner [Tue, 20 Jan 2026 14:21:12 +0000 (15:21 +0100)] 
appveyor: Reduce runtime by using lld instead of ld

In particular with the 2019 image, the time required often exceeded the
maximum of 60 minutes.  Using lld reduces the runtime quite a bit (it's
still close to the limit, though).

This doesn't work with the old OpenSSL version we use with the 2015
image (that libeay32.lib file just doesn't seem to work), so continue
to use ld (the build on that image is the quickest anyway).

4 months agoarray: Handle recursive calls to array_sort() if qsort_r() is not supported
Tobias Brunner [Tue, 20 Jan 2026 09:58:01 +0000 (10:58 +0100)] 
array: Handle recursive calls to array_sort() if qsort_r() is not supported

Such a recursive call occurs when sorting the array of Child SAs inside
an IKE SA that causes comparisons of the child configs and their
proposals, which in turn creates a merged array of all transform types
and that uses array_sort() and array_bsearch().

Closes strongswan/strongswan#2926

Fixes: 8e7f379f716c ("ike-sa: Sort CHILD_SAs by CPU ID")
4 months agocharon-cmd: Add support for childless IKE SA initiation
Tobias Brunner [Tue, 9 Dec 2025 09:08:35 +0000 (10:08 +0100)] 
charon-cmd: Add support for childless IKE SA initiation

References strongswan/strongswan#1594

4 months agocharon-cmd: Only use loose identity matching if no IDr is configured
Tobias Brunner [Thu, 2 Oct 2025 08:47:36 +0000 (10:47 +0200)] 
charon-cmd: Only use loose identity matching if no IDr is configured

4 months agocharon-cmd: Add support for PSK authentication with IKEv2
Tobias Brunner [Thu, 22 May 2025 09:30:42 +0000 (11:30 +0200)] 
charon-cmd: Add support for PSK authentication with IKEv2

Can be useful for testing purposes (e.g. some public test servers use
PSKs).

4 months agotrap-manager: Use latest seq when creating an acquire entry
Jean-François Hren [Mon, 5 Jan 2026 08:50:53 +0000 (09:50 +0100)] 
trap-manager: Use latest seq when creating an acquire entry

Closes strongswan/strongswan#2975

Fixes: 79815b4e675a ("trap-manager: Set seq. no. for CHILD_SAs not initiated by an acquire")
4 months agoidentification: Add support for organizationIdentifier in DNs
Tobias Brunner [Mon, 5 Jan 2026 09:50:24 +0000 (10:50 +0100)] 
identification: Add support for organizationIdentifier in DNs

These are e.g. used in eIDAS certificates.

5 months agoagent: Fix compiler warning when building with clang 6.0.4
Tobias Brunner [Fri, 12 Dec 2025 14:59:38 +0000 (15:59 +0100)] 
agent: Fix compiler warning when building with clang

Fixes: 8b467ad39a76 ("agent: Add option to open socket as specific user")
5 months agoip-packet: Fix compiler warning seen on FreeBSD 15
Tobias Brunner [Fri, 12 Dec 2025 07:10:13 +0000 (08:10 +0100)] 
ip-packet: Fix compiler warning seen on FreeBSD 15

We explicitly use untoh16() so this warning isn't relevant:

  ip_packet.c:313:42: error: taking address of packed member 'ip_len' of class or structure 'ip' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]

5 months agocirrus: Use FreeBSD 15.0 and 14.3
Tobias Brunner [Thu, 11 Dec 2025 16:36:00 +0000 (17:36 +0100)] 
cirrus: Use FreeBSD 15.0 and 14.3

5 months agoUse Botan 3.10.0 for tests
Tobias Brunner [Thu, 11 Dec 2025 16:25:12 +0000 (17:25 +0100)] 
Use Botan 3.10.0 for tests

Clean up leak-detective whitelist for newer Botan versions but add
`botan_private_key_load` as `botan_privkey_load*` won't show up anymore
without bfd-backtraces due to inlining if we don't call it directly.

Ref: https://github.com/randombit/botan/discussions/4868

5 months agogithub: Use AWS-LC 1.65.1 for tests
Tobias Brunner [Tue, 2 Dec 2025 08:10:37 +0000 (09:10 +0100)] 
github: Use AWS-LC 1.65.1 for tests

5 months agonm: Version bump to 1.6.4
Tobias Brunner [Fri, 12 Dec 2025 14:35:57 +0000 (15:35 +0100)] 
nm: Version bump to 1.6.4

5 months agoVersion bump to 6.0.4
Andreas Steffen [Fri, 12 Dec 2025 14:32:29 +0000 (15:32 +0100)] 
Version bump to 6.0.4

5 months agoNEWS: Add news for 6.0.4
Tobias Brunner [Wed, 10 Dec 2025 17:33:49 +0000 (18:33 +0100)] 
NEWS: Add news for 6.0.4

5 months agonm: Pass back the username auth-dialog runs as to access ssh-agent socket
Tobias Brunner [Thu, 4 Dec 2025 12:56:31 +0000 (13:56 +0100)] 
nm: Pass back the username auth-dialog runs as to access ssh-agent socket

This ensures we access the socket as user who NM ran the auth-dialog for,
especially for system-wide connections where the connection does not
mention a user.

We also make sure we don't use the cached socket and user of a previous
connection attempt, because system-wide connections might be used by
different users.

5 months agocharon-nm: Pass configured user when connecting to SSH/GPG agent
Tobias Brunner [Tue, 2 Dec 2025 15:17:36 +0000 (16:17 +0100)] 
charon-nm: Pass configured user when connecting to SSH/GPG agent

This prevents an attack similar to the one fixed previously where a
user passes the path to credentials of another user, in this case the
path to the agent socket of that user.

5 months agoagent: Add option to open socket as specific user
Tobias Brunner [Tue, 2 Dec 2025 15:15:42 +0000 (16:15 +0100)] 
agent: Add option to open socket as specific user

This can prevent an attack where user A passes the path to user B's
ssh-agent socket to the daemon that is running as root.

5 months agonm: Create safe copies of files for user-specific connections
Tobias Brunner [Wed, 26 Nov 2025 12:55:54 +0000 (13:55 +0100)] 
nm: Create safe copies of files for user-specific connections

This ensures that only certificates/private keys accessible by the
configured user are accessed and prevents attackers from misusing
other user's credentials.

Also removed setting NM_VERSION_MIN_REQUIRED, which suppresses deprecation
warnings that were added with newer API versions, and
NM_VERSION_MAX_ALLOWED, which warns if using functions added in newer
API versions, so we always build against the latest API available.

But we check explicitly for the required function so this works with
older NM versions and automatically will use it if the function is
backported.

Note that we can't use BUILD_FROM_FILE to read the temporary files as that
uses mmap() which SELinux policies prevent us from using at the location
these files are stored ([/var]/run/NetworkManager/cert/).

Fixes: CVE-2025-9615
5 months agochild-rekey: Prevent crash if peer rekeys a Child SA twice before sending a delete
Tobias Brunner [Mon, 24 Nov 2025 11:24:21 +0000 (12:24 +0100)] 
child-rekey: Prevent crash if peer rekeys a Child SA twice before sending a delete

Some (Windows) peers have been seen to initiate a second rekeying for the
same Child SA.  Presumably, this happens if a rekey request from us for
the same old Child SA arrives while it waits for the response to its
first rekey request.  Once we receive the delete for the old SA, we
conclude the rekeying with the second replacement.  However, the first
replacement remained linked to the old SA.  So this change prevents a
crash once the peer sends a delete for that first replacement (which it
seems to do after about 5 minutes).

References strongswan/strongswan#2944
Closes strongswan/strongswan#2945

5 months agoMerge branch 'master' into testing-per-cpu-sas 6.0.4rc1
Andreas Steffen [Mon, 8 Dec 2025 07:46:51 +0000 (08:46 +0100)] 
Merge branch 'master' into testing-per-cpu-sas

5 months agoVersion bump to 6.0.4rc1
Andreas Steffen [Mon, 8 Dec 2025 07:22:18 +0000 (08:22 +0100)] 
Version bump to 6.0.4rc1

6 months agotesting: Make per-CPU SAs scenarios more predictable by pinning IRQs to vCPUs
Tobias Brunner [Wed, 3 Dec 2025 10:40:17 +0000 (11:40 +0100)] 
testing: Make per-CPU SAs scenarios more predictable by pinning IRQs to vCPUs

This ensures that packets on sun are processed on a particular CPU and
not randomly on one, which causes expected SAs not to get created or
other weird things.

6 months agocredential-manager: Fix leaked signature params if self-signed cert is untrusted
Jean-François Hren [Mon, 1 Dec 2025 16:02:39 +0000 (17:02 +0100)] 
credential-manager: Fix leaked signature params if self-signed cert is untrusted

Closes strongswan/strongswan#2954

6 months agogithub: Use AWS-LC 1.65.0 for tests
Tobias Brunner [Fri, 21 Nov 2025 09:51:38 +0000 (10:51 +0100)] 
github: Use AWS-LC 1.65.0 for tests

6 months agoUse wolfSSL 5.8.4 for tests
Tobias Brunner [Fri, 21 Nov 2025 09:49:18 +0000 (10:49 +0100)] 
Use wolfSSL 5.8.4 for tests

Also remove the --enable-md4 option.  We never supported MD4 via wolfSSL,
as it's not available via the hash API we use (would require explicit
MD4-specific functions and structures).

6 months agoMerge branch 'swanctl-names'
Tobias Brunner [Thu, 20 Nov 2025 14:54:57 +0000 (15:54 +0100)] 
Merge branch 'swanctl-names'

Increases buffers in settings and swanctl to allow longer connection
names (up to the limit of 256 characters imposed by VICI).  The limit
for names is now also enforced when generating VICI messages.

Closes strongswan/strongswan#2936