Commit Graph

17549 Commits

Author SHA1 Message Date
Tobias Brunner 692feffaf3 lgtm: Fix building dependencies (in particular tpm2-tss)
This was moved to a separate step with 0ff939585e ("travis: Bump tpm2-tss
to 2.4.1") so packages are installed before these dependencies are built.
However, on LGTM, packages can't be installed explicitly, so `deps` is
a no-op and we still have to list some dependencies in the config.
2020-09-22 12:24:44 +02:00
Noel Kuntze d1d5659ead ike-vendor: Add option to send Cisco FLexVPN vendor ID
A new global option enables sending this vendor ID to prevent Cisco
devices from narrowing the initiator's local traffic selector to the
requested virtual IP, so e.g. 0.0.0.0/0 can be used instead.

This has been tested with a "tunnel mode ipsec ipv4" Cisco template but
should also work for GRE encapsulation.

Closes strongswan/strongswan#180.
2020-09-10 12:01:44 +02:00
Tobias Brunner dc0c20600f libipsec: Enable code coverage
Same as with libtls.
2020-09-09 13:25:30 +02:00
Tobias Brunner ed1ba70894 libtls: Enable code coverage
While the test runner was already correctly set up, the library itself
was not and no coverage was reported for any of its files.
2020-09-09 13:25:30 +02:00
Tobias Brunner d5d6d671fb leak-detective: Whitelist OPENSSL_init_ssl()
These leaks are reported with OpenSSL 1.1.0+ if the mysql plugin is loaded.
2020-09-09 13:25:30 +02:00
Tobias Brunner fd5cf31108 travis: Read project/organization for SonarCloud from environment variable 2020-09-09 13:25:30 +02:00
Tobias Brunner 76425800c4 Add project config for SonarCloud to ignore some files/rules
These settings have already been configured in the UI, but it might be
helpful to have them here so it's easier to set up the analysis of forks.
2020-09-09 13:25:30 +02:00
Tobias Brunner 6638191cd7 testing: Increase memory of alice by 20 MiB
It's ever so close with strongTNC, sometimes the OOM killer got triggered
and the tests failed, or even worse, the whole guest system got stuck.
This might just be enough for now.
2020-09-04 15:48:12 +02:00
Tobias Brunner 64148f046e testing: Fix dependency issue with strongTNC
Apparently, djangorestframework-camel-case, in the referenced version,
uses `six` but does not itself require/install it (later versions removed
Python 2 support altogether).
2020-09-04 14:56:58 +02:00
Tobias Brunner 565f022b5a Merge branch 'testing-buster'
Use Debian buster as base image for the testing environment.
2020-09-03 15:53:14 +02:00
Tobias Brunner 210c1e2628 testing: Fix route-based/net2net-xfrmi-ike scenario
On newer systems, the upper hard limit for open file descriptors (see
`ulimit -H -n`) was increased from 4096 to 524288.  Due to how python-daemon
closes potentially open file descriptors (basically stores them in a set,
removes those excluded by config, and loops through all of them), the updown
script was either killed immediately (by the OOM killer) or not ready yet
when updown events occurred.
2020-09-03 15:46:46 +02:00
Tobias Brunner 1496991078 leak-detective: Whitelist leaks that occur on Debian buster 2020-09-03 15:24:37 +02:00
Tobias Brunner 5bba0ec0f7 testing: Use Debian buster as base image 2020-09-03 15:24:37 +02:00
Tobias Brunner 1f97415fe7 testing: Use latest x509-ada release
This fixes an issue with newer compiler versions where crashes would be
caused if functions of the generated C X.509 parser are not aligned.
2020-09-03 15:24:37 +02:00
Tobias Brunner fb78b0e533 testing: Add man, valgrind and strace to base image 2020-09-03 13:34:19 +02:00
Tobias Brunner dcd8327933 testing: Install vici Python module manually
easy_install is not included in Debian's python-setuptools package
anymore, so we install it manually using setup.py.
2020-09-03 13:34:19 +02:00
Tobias Brunner d9785b36a3 testing: Replace deprecated/removed `pip install --download` command
It was deprecated for a while and has been replaced by `pip download`.
2020-09-03 13:34:19 +02:00
Tobias Brunner 94eebc9c2c testing: Use legacy iptables on Debian buster
The iptables-nft wrapper that uses the nftables framework can't handle
the CLUSTERIP target (plus we'd require nftables in the kernel).
2020-09-03 13:34:19 +02:00
Tobias Brunner 5c4ebbdde8 testing: Increase maximum guest image size
Seems that each Debian release increases the image size by about 200 MiB.
But increase it a bit more so we have room for logs/tools/debug symbols.
2020-09-03 13:34:19 +02:00
Tobias Brunner 3d1e2c56df testing: Use pkill to reload rsyslogd config/recreate log files
The PID location changes with newer Debian releases so it's more
portable this way.
2020-09-03 13:34:19 +02:00
Tobias Brunner d538b22afe testing: Remove deprecated UsePrivilegeSeparation option from sshd_config 2020-09-03 13:34:19 +02:00
Tobias Brunner 0d84b32e82 testing: Add Linux 5.8 kernel config
Enables TCP encap for ESP.
2020-09-03 13:34:19 +02:00
Tobias Brunner 5747ec4eae testing: Use host's /dev/urandom as /dev/random on guests via VirtIO RNG
Newer versions of systemd etc. seem to require quite a lot of entropy
from /dev/random while booting, which can block and therefore delay the
start of other services (in particular sshd) by more than a minute.
Using the host's /dev/urandom via VirtIO RNG, we can avoid blocking the
guests.

The required kernel options are added for kernel versions 5.4+.
2020-09-03 13:34:19 +02:00
Tobias Brunner 766017a8d3 libimcv: Add Debian 10.5 to IMV database 2020-09-03 13:34:19 +02:00
Tobias Brunner ad7d712cb5 testing: Support build with Debian buster base image 2020-09-03 13:33:32 +02:00
Tobias Brunner e96f58568e travis: Bump wolfSSL to 4.5.0 2020-08-31 17:49:10 +02:00
Tobias Brunner bdd058e36c imv-scanner: Fix potential buffer overflow
While `pos` was moved to the end, `len` was not adjusted (i.e. set to 0)
so later calls could write beyond the buffer.  However, the last port
written might have been incomplete, so instead we just reset the string.
2020-08-18 14:05:04 +02:00
Tobias Brunner 3f8eb2ebdf aesni: Remove useless algorithm assignments 2020-08-18 13:17:24 +02:00
Tobias Brunner 0ce2e00d94 vici: Don't use pytest-pycodestyle with Python 3.5
This causes problems due to a deprecation error during the Ubuntu Xenial
build on Travis.
2020-08-17 15:22:34 +02:00
Tobias Brunner 03a495f6fc travis: Bump tpm2-tss to 2.4.2 2020-08-17 13:45:15 +02:00
Andreas Steffen 2205c75bad Version bump to 5.9.0 2020-07-29 13:08:09 +02:00
Tobias Brunner ce5f9b83f6 NEWS: Add news for 5.9.0 2020-07-24 16:54:57 +02:00
Tobias Brunner 61af9a3478 vici: Fix typos in comments 2020-07-23 14:50:17 +02:00
Andreas Steffen 2eec7efd46 Version bump to 5.9.0rc1 2020-07-21 22:43:36 +02:00
Tobias Brunner 544ff81911 configure: Ignore unknown Git version number
Don't abort the script if the version is reported as UNKNOWN, which happens
on CI hosts where the repository is only cloned with a certain depth (which
may not include the latest tag).

Also, never map VERSION to UNKNOWN.

Fixes: 2e522952c7 ("configure: Optionally use version information obtained from Git in executables")
2020-07-21 12:49:13 +02:00
Tobias Brunner 59455137b4 Use Botan 2.15.0 for tests 2020-07-20 16:58:03 +02:00
Tobias Brunner edc7752802 unit-tests: Fix cancel_onoff test
If it takes a while to start one of the threads, another thread might already
have passed the usleep() call previously used and re-enabled cancelability
so that the loop that checked for it would never terminate.
2020-07-20 15:49:44 +02:00
Tobias Brunner 8a4e30ccef unit-tests: Print a header for each test function/iteration if verbosity is >= 0 2020-07-20 14:29:28 +02:00
Tobias Brunner 5c43a5bfa7 unit-tests: Add ability to filter test cases and functions 2020-07-20 14:29:12 +02:00
Tobias Brunner 2e522952c7 configure: Optionally use version information obtained from Git in executables
The variable GIT_VERSION is always defined, either obtained from Git or
a file that is embedded in tarballs when they are built.  Optionally,
that version is declared as VERSION in config.h so it will be used e.g. in
the daemons when they print the version number.

There is a check that should catch missing tags (i.e. if the version number
in AC_INIT() isn't a prefix of the version obtained via Git).
2020-07-20 14:10:52 +02:00
Tobias Brunner f77e8c171c openssl: Use consistent ifdefs to disable x25519/448
When compiling with OPENSSL_NO_ECDH but without OPENSSL_NO_EC the build
failed.
2020-07-20 14:10:05 +02:00
Tobias Brunner 6f9d5ea0f1 Merge branch 'vici-ca-certs'
These changes store all CA certificates in vici_authority_t, which avoids
issues with unloading authority sections or clearing credentials.

Closes strongswan/strongswan#172.
2020-07-20 14:07:47 +02:00
Tobias Brunner 3c5e7eaa88 vici: Keep track of all CA certificates in vici_authority_t
This way we only have one reference for each CA certificate, whether it
is loaded in an authority section, a connection or via load-certs() command.
It also avoids enumerating CA certificates multiple times if they are
loaded in different ways.
2020-07-20 14:05:39 +02:00
Tobias Brunner 3d3d5235aa object: Add helper for callbacks with two void pointers 2020-07-20 14:05:39 +02:00
Tobias Brunner d8a2c58229 vici: Make attribute certificates untrusted again
Fixes: 334119b843 ("Share vici_cert_info.c with vici_cred.c")
2020-07-20 14:05:39 +02:00
Tobias Brunner 6fc1b2c3d3 vici: Clear credential cache when unloading an authority section 2020-07-20 14:05:38 +02:00
Tobias Brunner 46ff268885 vici: Directly provide CA certificates in authority sections
With the previous approach, CA certificates that were not re-loaded via
load-cert() (e.g. from tokens or via absolute paths) would not be available
anymore after the clear-creds() command was used.  This avoids this
issue, but can cause duplicate CA certificates to get stored and enumerated,
so there might be a scaling factor.
2020-07-20 14:05:38 +02:00
Tobias Brunner 306c0c9f8e certificate: Extract helper function to filter certificates 2020-07-20 14:05:38 +02:00
Tobias Brunner dd7505af3e Merge branch 'ordered-hashtable'
This changes the hashtable implementation to that it maintains insertion
order.  This is then used in the vici plugin to store connections in a
hash table instead of a linked list, which makes managing them quite a
bit faster if there are lots of connections.

The old implementation is extracted into a new class (hashlist_t), which
optionally supports sorting keys and provides the previous get_match()
function.
2020-07-20 14:03:27 +02:00
Tobias Brunner 93b2c2066f hashtable: Use quadratic probing
This reduces the clustering problem (primary clustering) but is not
completely free of it (secondary clustering) it still reduces the maximum
and average probing lengths.
2020-07-20 13:50:11 +02:00