18766 Commits

Author SHA1 Message Date
Tobias Brunner
bbbd15dd5c pkcs12: Make sure to wipe potentially decrypted PKCS#7 data 2023-07-26 15:08:33 +02:00
Tobias Brunner
b4694aef49 pkcs7: Make sure to wipe decrypted content 2023-07-26 15:08:33 +02:00
Tobias Brunner
ad8484a6cc aesni: Make sure to wipe salt 2023-07-26 15:08:33 +02:00
Tobias Brunner
9bda4a4415 ccm: Make sure to wipe salt 2023-07-26 15:08:33 +02:00
Tobias Brunner
0abb37b830 gcm: Make sure to wipe salt and H 2023-07-26 15:08:33 +02:00
Tobias Brunner
e8f8d32494 charon-nm: Use configured interface name if available
If connection.interface-name is configured, we use that instead of the
randomly generated name.

References strongswan/strongswan#1747
2023-07-26 15:07:36 +02:00
Tobias Brunner
27a7537d10 charon-nm: Also log basic connection details 2023-07-26 15:07:22 +02:00
Tobias Brunner
69e0c1161d charon-nm: Actually use the created XFRM interface
The created XFRM interface was not actually used (no interface IDs on the
SAs, no routes via interface).  It was basically treated like the dummy
TUN device.  To actually install the routes via XFRM interface, we have
to create it before we install the SAs and policies, signal_ip_config()
happens too late.  We also have to mark the ESP packets the same as IKE
the packets to avoid a routing loop if the server's IP is included in
the remote traffic selector (in particular if it's 0.0.0.0/0 or ::/0).

Fixes: 58f278f93239 ("charon-nm: Use an XFRM interface if available")
2023-07-26 15:07:22 +02:00
Tobias Brunner
36b1a6d76c Use Botan 3.1.1 for tests
The all-zero Ed25519 public key is rejected by botan_pubkey_check_key()
when the key is loaded.

Note that Botan 3 requires GCC 11 or CLANG 14, i.e. can't easily be built
on Debian bullseye or Ubuntu 20.04.

The thread-local storage function gets flagged via various botan FFI
functions when using Botan 3, whitelist that instead of all of them.
2023-07-26 13:09:22 +02:00
Tobias Brunner
1762040ef8 Merge branch 'testing-bookworm'
Use Debian bookworm as base image for testing.
2023-07-26 13:07:37 +02:00
Tobias Brunner
4ba857930c testing: Format total time in a more readable way 2023-07-26 13:06:40 +02:00
Tobias Brunner
99bd7ca2fd testing: Change memory allocation for alice and winnetou and switch to MiB
The services running on alice seem to require a bit more memory with
Debian bookworm, so increase the memory allocation.  But at the same
time reduce winnetou's allocation by the same amount as it really doesn't
require that much memory.

The unit change makes it easier to read.
2023-07-20 15:59:49 +02:00
Tobias Brunner
732909ce1e testing: Hardcode /testresults mount point in winnetou's fstab
Because do-tests runs the restore-defaults script, fstab would get reset
to the default version and the mount point wouldn't be available anymore
after stopping and restarting the guests (unless the guest images were
rebuilt in between).
2023-07-20 15:59:21 +02:00
Tobias Brunner
872781734d testing: Copy guest-specific files after default files
This allows overriding some files per guest.
2023-07-20 15:59:21 +02:00
Tobias Brunner
79ad33bfba testing: Use Debian 12 (bookworm) 2023-07-13 12:41:51 +02:00
Tobias Brunner
043e10ebb8 testing: Use Debian bookworm to test TKM 2023-07-13 12:41:51 +02:00
Tobias Brunner
dee9bfb682 testing: Update TKM dependencies to fix compilation with newer GNAT versions 2023-07-13 10:48:53 +02:00
Tobias Brunner
6f7fdcadd1 testing: Add support for Debian bookworm base images
By default, rsyslog is not installed anymore to avoid storing everything
twice (since journald is the default).  If this becomes an issue, we
could delete /var/log/journal to only log via rsyslog.
2023-07-13 10:48:53 +02:00
Tobias Brunner
21bf3e41f9 testing: Use venv for strongTNC
Also updated to a newer version to fix dependency issues.
2023-07-13 10:48:53 +02:00
Tobias Brunner
9b8f26b407 testing: Install python-daemon via Debian package
System-wide installation via pip isn't easily possible anymore on Debian
bookworm, so just use the Debian package for this (is available in old
releases as well).
2023-07-13 10:48:53 +02:00
Tobias Brunner
55273157b0 libimcv: Add Debian 12 (bookworm) to database
Because libcrypto and libssl are measured, we need a new group for Debian
versions with OpenSSL 3 (I've rather added a suffix to the old group as
that could eventually get removed, although we might need a 3.1 variant
in the future - maybe we should measure some other files?).
2023-07-13 10:48:53 +02:00
Tobias Brunner
995d7785b9 testing: Fix vici updown script on Debian bookworm
OOM-killer is now already triggered with `import daemon`, so set the
limit before that.  Also some PEP8 fixes (including an exclusion for
the above fix as that causes imports to not be at the beginning of the
file).
2023-07-13 10:48:53 +02:00
Tobias Brunner
744955f8ce testing: Whitelist all Git repositories in the root image
Without this, Git refuses to operate on the build dirs that are mounted
with weird ownership.  When running as root in the chroot, Git checks
SUDO_UID, which won't match.
2023-07-13 10:48:53 +02:00
Tobias Brunner
e0f0f812c7 testing: Create traditional RSA keys with OpenSSL 3
This is necessary because TKM can't read PKCS#8 files and in some
scenarios we don't have the pkcs8 plugin loaded that would be required
to read/decrypt the non-traditional files.
2023-07-13 10:48:53 +02:00
Tobias Brunner
6b8b67be81 testing: Fix systemctl wrapper and adapt enabling services on winnetou
The wrapper called the command twice for any unit but "strongswan" and
it didn't return the correct exit code.  This was noticed when an
if-updown script tried to check if systemd-resolved is active and always
succeeded, which caused failing attempts to configure it.

But now that the return code is correct, trying to enable bind9 won't
fail silently anymore if the unit doesn't exist (similar on older systems
for named), so this is adapted.
2023-07-13 10:48:53 +02:00
Tobias Brunner
c1dbce29ed testing: Remove support for Debian stretch 2023-07-13 10:48:53 +02:00
Tobias Brunner
fbc25f1c25 leak-detective: Whitelist C++'s __cxa_get_globals() 2023-07-13 10:48:53 +02:00
Tobias Brunner
e604947df8 testing: Switch to MDB backend for OpenLDAP (slapd)
The BDB and HDB backends were long deprecated and have finally been
removed with OpenLDAP 2.5 that's shipped with Debian bookworm.
2023-07-13 10:48:53 +02:00
Tobias Brunner
ab13c1c808 testing: Configure curve25519-sha256 as key exchange for SSH
With Debian bookworm, the PQC KE sntrup761x25519-sha512 is negotiated, by
default.  This increases the overhead significantly, in particular, the
size of the KE message, which wouldn't get through IPsec tunnels without
MSS clamping.
2023-07-13 10:48:53 +02:00
Tobias Brunner
0e621f60f8 sonarcloud: Update filter rules as recommended 2023-07-12 11:21:27 +02:00
Tobias Brunner
46d98bc249 testing: Fix example configure options for charon-tkm Docker build
Fixes: b1ce8772367f ("charon-tkm: Use built-in plugins instead of OpenSSL")
2023-07-11 18:02:13 +02:00
Tobias Brunner
4c2747fbfc Use wolfSSL 5.6.3 for tests 2023-06-21 15:31:53 +02:00
Tobias Brunner
2e88ab0069 dhcp: Fix warning with newer compilers 2023-06-19 14:56:24 +02:00
Tobias Brunner
8238ad480a resolve: Maintain order of DNS servers also when installing in resolv.conf
This always writes the complete set of DNS servers to make modifications
simpler.
2023-06-19 14:56:24 +02:00
Tobias Brunner
6440975bb4 resolve: Try to maintain the order of DNS servers if using resolvconf
Since 17fd304e60df ("resolve: Don't install individual servers via
resolvconf"), DNS servers were sorted if getting installed via resolvconf.
In some setups the order might be important (even though relying on it
isn't a good idea in general as stub resolvers are free to use all of
the servers as they please).
2023-06-19 14:56:24 +02:00
Tobias Brunner
2d1006963e charon-svc: Add missing closing parenthesis in version output 2023-06-19 14:55:48 +02:00
Tobias Brunner
43975f33ef Use wolfSSL 5.6.2 for tests
ECC keys can now be smaller so we can't access the private key directly
anymore.
2023-06-13 10:13:29 +02:00
Andreas Steffen
4e1dc0a224 Version bump to 5.9.11 5.9.11 2023-06-12 07:50:02 +02:00
Andreas Steffen
0ba7aefdc9 Version bump to 5.9.11rc1 5.9.11rc1 2023-06-08 10:42:17 +02:00
Tobias Brunner
285ebb24e3 NEWS: Add news for 5.9.11 2023-06-02 17:52:28 +02:00
Tobias Brunner
c593443432 pki: Add --label options to --est* command synopsis
Also fixes some formatting in the man pages.
2023-06-02 12:56:03 +02:00
Tobias Brunner
03c08423dd github: Use new cache storage properties for sonarcloud 2023-06-02 11:37:06 +02:00
Tobias Brunner
89ce398c3d openssl: Fix memory leak if FIPS provider isn't available 2023-06-02 11:27:39 +02:00
Tobias Brunner
ee9a663b01 Fixed some typos, courtesy of codespell 2023-06-02 10:36:47 +02:00
Tobias Brunner
efdcbd13cb credential-manager: Improve selection of local certificate and trust chain
The previous code was problematic if a certificate request for a known
but unrelated CA was received and the local trust chain was incomplete.
Due to the received anchor, the incomplete trust chain was dismissed and
any intermediate CA certificates were, therefore, not sent to the peer.

This new approach doesn't dismiss an incomplete trust chain, but prefers
one that can be resolved to a received anchor.  If no such chain is found,
the first one is used.
2023-06-02 10:04:39 +02:00
Tobias Brunner
0e88b8a817 github: Use OpenSSL 3.1.1 for tests 2023-05-31 15:45:02 +02:00
Tobias Brunner
e3cb756dbf Merge branch 'libipsec-raw-esp'
This adds support for sending/receiving ESP packets without UDP
encapsulation to libipsec and kernel-libipsec.  Only Linux is currently
supported and the feature is disabled by default.
2023-05-23 13:19:57 +02:00
Tobias Brunner
5db9b26e32 testing: Add libipsec scenarios that exchange raw ESP packets 2023-05-23 13:19:47 +02:00
Tobias Brunner
e306fa5f73 kernel-libipsec: Add support to send/receive raw ESP packets
This is currently only supported on Linux and with the appropriate
permissions.

Since it's experimental, it's disabled by default.

The log messages for each sent and received ESP message are logged in NET
like the ones in the socket-default plugin for UDP-encapsulated messages.
2023-05-23 13:19:47 +02:00
Tobias Brunner
29e8cb3f90 libipsec: Move restrictions regarding UDP encapsulation to users 2023-05-23 13:19:47 +02:00