Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NCL-2292 - Upgrade strongswan to 5.9.6 #5

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
1bb0500
Use Botan 2.19.1 for tests
tobiasbrunner Jan 20, 2022
e3d1766
addrblock: Allow limiting validation depth of issuer addrblock extens…
martinwilli Jan 12, 2022
9877ce6
sys-logger: Optionally support mapping strongSwan loglevels to syslog…
martinwilli Jan 20, 2022
912d052
SECURITY: Fix link to PGP key
tobiasbrunner Jan 25, 2022
956b25a
proposal: Add ESN transform to default ESP AEAD proposal
martinwilli Jan 31, 2022
34a6cb8
openssl: Return correct number of plugin features if ECDH groups are …
tobiasbrunner Feb 4, 2022
7314e09
appveyor: Install autotools package on 2019 image
tobiasbrunner Feb 4, 2022
b47e991
testing: Print the actual start time of a command for `do-tests -t`
tobiasbrunner Feb 9, 2022
801bb85
error-notify: Handle missing alerts
tobiasbrunner Feb 11, 2022
d6879ef
ha: Streamline handling of conditions and extensions
spellingmistake Feb 8, 2022
aaa505d
ike-natd: Fake NAT situation or disable NAT-D if source IP is undeter…
tobiasbrunner Jun 29, 2021
90b1d09
ike-mobike: Make task a no-op if MOBIKE is not supported
tobiasbrunner Jan 31, 2022
011de0f
ike-natd: Queue DPD after faking local NAT to check if UDP-encap can …
tobiasbrunner Jan 31, 2022
3f7d40d
Merge branch 'natd-fixes'
tobiasbrunner Feb 15, 2022
e4b4aab
libtls: Enforce client/server identity when looking for public key
tobiasbrunner Feb 2, 2022
42704f6
tls-test: Add option to specify a specific remote identity
tobiasbrunner Feb 2, 2022
eccfd27
tls-peer: Simplify identity check for server certificate
tobiasbrunner Feb 4, 2022
963adc7
xof: Fix typo in documentation for set_seed()
tobiasbrunner Feb 9, 2022
9e39782
mgf1: Fix Doxygen group for XOF implementation
tobiasbrunner Feb 11, 2022
e694384
Use wolfSSL 5.2.0 for tests
tobiasbrunner Feb 22, 2022
3eecd40
openssl: Don't unload providers
tobiasbrunner Feb 23, 2022
2ade431
tls-server: Use correct error alerts if client doesn't send a certifi…
tobiasbrunner Mar 1, 2022
c8045f8
testing: Increase memory on winnetou even more
tobiasbrunner Mar 1, 2022
b2cf5af
README: Added link to docs.strongswan.org
strongX509 Mar 2, 2022
012e4cd
kernel-netlink: Remove unimplemented XFRM_OFFLOAD_IPV6 flag
rleon Feb 21, 2022
5de6ab8
kernel-pfkey: Only install exclude route if not routing via outbound …
tobiasbrunner Feb 11, 2022
8a76c5a
kernel-pfkey: Don't install exclude routes for locally connected peers
tobiasbrunner Feb 16, 2022
8100f2f
Merge branch 'pfkey-exclude-routes'
tobiasbrunner Mar 15, 2022
3c02868
traffic-selector: Avoid out-of-bound array access when calculating range
tobiasbrunner Mar 16, 2022
63260a1
lgtm: Fix query for chunk_from_chars()
tobiasbrunner Apr 14, 2022
902fbd1
receiver: Use a time based limit to switch COOKIE secrets
tobiasbrunner Jun 4, 2021
d8104b7
receiver: Add per-IP cookie threshold
tobiasbrunner Mar 18, 2022
b866ee8
ike: Track unprocessed initial IKE messages like half-open IKE_SAs
tobiasbrunner Jun 4, 2021
93d8177
cirrus: Use FreeBSD 12.3
tobiasbrunner Apr 14, 2022
366ac36
ike: Don't reset optional CHILD_SA properties when migrating child-cr…
tobiasbrunner May 20, 2021
7f30e1a
ike-sa: Use a struct to pass optional arguments when initiating CHILD…
tobiasbrunner May 19, 2021
9983326
kernel-netlink: Read protocol of acquire not from template
tobiasbrunner May 28, 2021
3b699c7
kernel-listener: Use a struct to pass data from acquires
tobiasbrunner Dec 16, 2021
511033b
child-create: Just abort CREATE_CHILD_SA request if nonce creation fails
tobiasbrunner May 20, 2021
a5430e1
child-create: Abort initiating a duplicate CHILD_SA
tobiasbrunner May 20, 2021
927103e
enum: Allow specifying the name used when none of the flags are set
tobiasbrunner Dec 17, 2021
4f4d402
ike: Treat action_t as flags so 'start' and 'trap' can be combined
tobiasbrunner Dec 16, 2021
7137fd9
enum: Add helper to parse enum flags from strings
tobiasbrunner Dec 17, 2021
c00c5e5
vici: Make combination of 'trap' and 'start' configurable
tobiasbrunner Dec 16, 2021
fe5f273
configure: Add option to link against libselinux
tobiasbrunner Dec 17, 2021
decfe44
sec-label: Add class to represent security labels
tobiasbrunner Dec 20, 2021
2dd60e4
sec-label: Add enum for security label mode
tobiasbrunner Jan 27, 2022
ebb9948
leak-detective: Whitelist selinux_check_access()
tobiasbrunner Feb 4, 2022
d71d181
traffic-selector: Add TS_SECLABEL type
tobiasbrunner Jan 10, 2022
a44de0b
traffic-selector-substructure: Add support for TS_SECLABEL
tobiasbrunner Jan 10, 2022
f4c0ec0
ts-payload: Add support for TS of type TS_SECLABEL
tobiasbrunner Jan 10, 2022
c4e2b76
encoding: Remove unused TS_TYPE and ADDRESS encodings
tobiasbrunner Jan 13, 2022
bf0542c
kernel-netlink: Add support for optional security label on SAs and po…
tobiasbrunner Dec 20, 2021
ef72ac8
child-cfg: Add optional security label and mode
tobiasbrunner Dec 20, 2021
63d4bd0
child-cfg: Add method to select a security label
tobiasbrunner Jan 11, 2022
0372995
peer-cfg: Consider security labels when selecting child configs
tobiasbrunner Jan 10, 2022
6cb83c3
kernel-interface: Optionally consider security label when allocating …
tobiasbrunner Dec 20, 2021
139d655
child-sa: Add support for security labels
tobiasbrunner Dec 20, 2021
7a8d110
child-create: Consider security label when comparing CHILD_SAs
tobiasbrunner Dec 20, 2021
f9b895b
child-create: Add support to handle security labels
tobiasbrunner Feb 2, 2022
9619b1e
child-sa: Support dynamically updating trap policies
tobiasbrunner Feb 3, 2022
1f06035
kernel-wfp: Use new UDP ports in update_sa()
tobiasbrunner Feb 3, 2022
1b3af3e
kernel-interface: Add support to change the reqid in update_sa()
tobiasbrunner Feb 3, 2022
96ecc39
kernel-netlink: Allow reqid updates for policies again
tobiasbrunner Feb 4, 2022
8f4cfe9
child-sa: Allocate a new reqid if dynamic traffic selectors are updated
tobiasbrunner Feb 3, 2022
3c65cf6
trap-manager: Add facility to install externally managed trap policies
tobiasbrunner Feb 1, 2022
065685d
ike-sa: Add helper to determine an IKE_SA's dynamic hosts
tobiasbrunner Feb 2, 2022
b00a4e7
selinux: Add plugin to install trap policies with generic labels
tobiasbrunner Feb 2, 2022
92f54e5
child-rekey: Maintain security label during rekeying
tobiasbrunner Dec 20, 2021
3f3838d
ike-sa: Accept optional security label when initiating CHILD_SAs
tobiasbrunner Dec 20, 2021
52a05d7
kernel-interface: Optionally pass security label with an acquire
tobiasbrunner Dec 21, 2021
81c3628
kernel-handler: Log security label received with acquire
tobiasbrunner Dec 21, 2021
0a67379
trap-manager: Add support to handle acquires with security labels
tobiasbrunner Dec 21, 2021
f52e565
kernel-netlink: Forward labels from acquires
tobiasbrunner Dec 21, 2021
7cf6f29
vici: Make security labels and mode configurable
tobiasbrunner Dec 21, 2021
2994347
vici: Report security label on CHILD_SA, policies and configs
tobiasbrunner Dec 21, 2021
b67f7fb
swanctl: Report labels in --list-* commands
tobiasbrunner Dec 21, 2021
994d9d3
testing: Copy comments to test log
tobiasbrunner Jun 2, 2021
b1c7fac
vici: Add options to only return specific CHILD_SAs in list-sas()
tobiasbrunner Jun 2, 2021
955b526
swanctl: Add options to filter CHILD_SAs in --list-sas
tobiasbrunner Jun 2, 2021
6910347
testing: Add DSCP scenario that uses simple labels
tobiasbrunner Apr 14, 2022
8b8a2ee
Merge branch 'labeled-ipsec'
tobiasbrunner Apr 14, 2022
40a0961
crypto: Add interface for key derivation functions
tobiasbrunner Feb 9, 2022
e93882c
transform: Add private transform for KDFs
tobiasbrunner Feb 9, 2022
35ad267
pkcs5: Rename kdf_t to avoid conflict
tobiasbrunner Feb 9, 2022
fbb0bde
crypto-factory: Add constructor and methods to create KDFs
tobiasbrunner Feb 9, 2022
07bf428
stroke: List registered KDFs
tobiasbrunner Feb 9, 2022
ec17fa2
vici: Report registered KDFs
tobiasbrunner Feb 9, 2022
0c6baa8
crypto-tester: Add facility to test KDFs
tobiasbrunner Feb 10, 2022
02f7d63
crypto-factory: Use actual plugin name when testing during construction
tobiasbrunner Feb 16, 2022
86d5268
test-vectors: Add support for KDF test vectors
tobiasbrunner Feb 11, 2022
961cb78
plugin-feature: Remove 'default' case in plugin_feature_un|load()
tobiasbrunner Feb 11, 2022
71ba969
plugin-feature: Add plugin feature for KDFs
tobiasbrunner Feb 11, 2022
ce43136
test-vectors: Add test vectors for prf+
tobiasbrunner Feb 11, 2022
9e228de
kdf: Add plugin that provides a default prf+ implementation
tobiasbrunner Feb 11, 2022
2b9b579
openssl: Add a prf+ implementation based on OpenSSL's HKDF implementa…
tobiasbrunner Feb 11, 2022
00cfc05
keymat_v2: Refactor IKE key derivation so it only needs one prf+ call
tobiasbrunner Feb 14, 2022
742134c
keymat_v2: Refactor CHILD_SA key derivation so it only needs one prf+…
tobiasbrunner Feb 14, 2022
3a52fc8
testing: Load kdf plugin in all scenarios that require it
tobiasbrunner Feb 14, 2022
5cc47c1
android: Build and load kdf plugin for prf+
tobiasbrunner Feb 15, 2022
08e3113
appveyor: Enable kdf plugin on old images with OpenSSL 1.0.2/1.1.0
tobiasbrunner Feb 17, 2022
7161c87
keymat_v2: Use plugin-provided prf+ to derive keys
tobiasbrunner Feb 14, 2022
df16d79
tls-hkdf: Use plugin-provided prf+
tobiasbrunner Feb 14, 2022
be07b9d
unit-tests: Use plugin-provided prf+ in unit test
tobiasbrunner Feb 15, 2022
9cb3c10
keymat_v1: Derive CHILD_SA keys without using prf_plus_t
tobiasbrunner Feb 15, 2022
f0957d1
kdf: Implement prf+ directly without relying on prf_plus_t
tobiasbrunner Feb 15, 2022
f535f1e
crypto: Remove unused prf_plus_t
tobiasbrunner Feb 15, 2022
cb8f924
botan: Implement prf+ via Botan's HKDF implementation
tobiasbrunner Feb 16, 2022
96c7692
wolfssl: Implement prf+ via wolfSSL's HKDF implementation
tobiasbrunner Feb 16, 2022
7bde56a
crypto: Adapt kdf_t interface to support KDFs with fixed output length
tobiasbrunner Mar 14, 2022
37dbc87
crypto: Add new KDF type for IKEv2 PRFs
tobiasbrunner Mar 14, 2022
ad0e94b
test-vectors: Add vectors for HMAC-based IKEv2 PRFs
tobiasbrunner Mar 14, 2022
0339ce3
kdf: Implement wrapper for IKEv2 PRFs
tobiasbrunner Mar 14, 2022
e0fc786
openssl: Implement HMAC-based IKEv2 PRFs via OpenSSL's HKDF implement…
tobiasbrunner Mar 14, 2022
7498769
botan: Implement HMAC-based IKEv2 PRFs via Botan's HKDF implementation
tobiasbrunner Mar 15, 2022
56afc6e
wolfssl: Implement HMAC-based IKEv2 PRFs via wolfSSL's HKDF implement…
tobiasbrunner Mar 15, 2022
743b486
unit-tests: Hand out an actual shared secret and pubkey in mock KE im…
tobiasbrunner Mar 15, 2022
f619b83
keymat_v2: Use plugin-provided KDF_PRF to derive SKEYSEED
tobiasbrunner Mar 15, 2022
94a3563
Merge branch 'ikev2-kdf-modularization'
tobiasbrunner Apr 14, 2022
1c1213f
openssl: Move shared secret calculation to get_shared_secret()
tobiasbrunner Jul 23, 2021
519bc22
leak-detective: Whitelist OpenSSL 3.0 functions
tobiasbrunner Feb 23, 2022
13efce4
openssl: PRF_KEYED_SHA1 might not be supported
tobiasbrunner Feb 24, 2022
f5710c9
openssl: Fixes for ECDH with OpenSSL 3.0
tobiasbrunner Feb 24, 2022
36cf74f
openssl: Fixes for DH with OpenSSL 3.0
tobiasbrunner Feb 25, 2022
21b586c
openssl: Fixes for RSA with OpenSSL 3.0
tobiasbrunner Feb 28, 2022
544fb1c
pkcs8: Parse the decrypted PKCS#8 structure via regular builders
tobiasbrunner Mar 4, 2022
be0ce6d
configure: Move pkcs8 plugin after plugins that can parse PKCS#8 dire…
tobiasbrunner Apr 14, 2022
293a912
openssl: Fixes for ECDSA with OpenSSL 3.0
tobiasbrunner Mar 3, 2022
db0c53c
openssl: Fixes for HMAC with OpenSSL 3.0
tobiasbrunner Mar 4, 2022
f26639d
openssl: Remove checks and legacy compatibility code for OpenSSL < 1.0.2
tobiasbrunner Mar 4, 2022
a8bab0e
openssl: Move ENGINE-specific code into a separate file
tobiasbrunner Mar 4, 2022
7d99b29
unit-tests: Add support for more than one warning per test case
tobiasbrunner Mar 4, 2022
76ff49b
unit-tests: Add environment variable to skip IPv6 stream tests
tobiasbrunner Mar 16, 2022
a5cfa57
github: Add a build against OpenSSL 3.0
tobiasbrunner Mar 4, 2022
9aa7e12
Merge branch 'openssl-3.0'
tobiasbrunner Apr 14, 2022
7df7100
Version bump to 5.9.6rc1
strongX509 Apr 16, 2022
312437b
github: Use run_number instead run_id as external-id for LGTM
tobiasbrunner Apr 19, 2022
f4d6539
ikev2: Maintain labels during make-before-break reauthentication
tobiasbrunner Apr 20, 2022
c508b90
openssl: Fix typo in comment
tobiasbrunner Apr 21, 2022
2283a19
kdf: Fix Doxygen comments
tobiasbrunner Apr 21, 2022
352fa96
gcrypt: Initialize variables when en-/decrypting with RSA to avoid wa…
tobiasbrunner Apr 21, 2022
a6a0fa9
tls-crypto: Initialize cipher suites arrays to avoid warnings
tobiasbrunner Apr 21, 2022
8ce4105
NEWS: Add news for 5.9.6
tobiasbrunner Apr 22, 2022
c9d4710
Use mallinfo2() if available
tobiasbrunner Apr 25, 2022
4cf8cd0
Version bump to 5.9.6
strongX509 Apr 28, 2022
39aef1e
Merge tag '5.9.6' of https://github.com/strongswan/strongswan into bu…
akodithy Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ install:
IF "%IMG%" == "2019" set OPENSSL=OpenSSL-v111
set OPENSSL_DIR=/c/%OPENSSL%-%TEST%
C:\%OPENSSL%-%TEST%\bin\openssl.exe version -a
# newer versions of msys2 don't provide autotools via base-devel anymore
- IF "%IMG%" == "2019" %MSYS_SH% --login -c ". /etc/profile && pacman --noconfirm -S --needed autotools"

build_script:
- '%MSYS_SH% --login -c ". /etc/profile && cd $APPVEYOR_BUILD_FOLDER && ./scripts/test.sh deps"'
Expand Down
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ task:
- name: FreeBSD 13.0
freebsd_instance:
image_family: freebsd-13-0
- name: FreeBSD 12.2
- name: FreeBSD 12.3
freebsd_instance:
image_family: freebsd-12-2
image_family: freebsd-12-3

env:
TESTS_REDUCED_KEYLENGTHS: yes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- env:
LGTM_TOKEN: ${{ secrets.LGTM_TOKEN }}
LGTM_PROJECT: ${{ secrets.LGTM_PROJECT }}
BUILD_NUMBER: ${{ github.run_id }}
BUILD_NUMBER: ${{ github.run_number }}
COMMIT_ID: ${{ github.sha }}
COMMIT_BASE: ${{ github.event.before }}
uses: ./.github/actions/default
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
test: [ botan, wolfssl, openssl, gcrypt ]
test: [ botan, wolfssl, openssl, openssl-3, gcrypt ]
leak-detective: [ no, yes ]
env:
LEAK_DETECTIVE: ${{ matrix.leak-detective || 'no' }}
Expand Down
4 changes: 2 additions & 2 deletions .lgtm/cpp-queries/chunk_from_chars.ql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ChunkFromChars extends Expr {
this = any(MacroInvocation mi |
mi.getOutermostMacroAccess().getMacroName() = "chunk_from_chars"
/* ignore global static uses of the macro */
and exists (Block b | mi.getExpr().getEnclosingBlock() = b)
and exists (BlockStmt b | mi.getExpr().getEnclosingBlock() = b)
).getExpr()
}
}
Expand All @@ -40,7 +40,7 @@ class ChunkFromCharsUsage extends DataFlow::Configuration {
}
}

Block enclosingBlock(Block b) {
BlockStmt enclosingBlock(BlockStmt b) {
result = b.getEnclosingBlock()
}

Expand Down
2 changes: 1 addition & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include $(CLEAR_VARS)
# this is the list of plugins that are built into libstrongswan and charon
# also these plugins are loaded by default (if not changed in strongswan.conf)
strongswan_CHARON_PLUGINS := android-log openssl fips-prf random nonce pubkey \
pkcs1 pkcs8 pem xcbc hmac kernel-netlink socket-default android-dns \
pkcs1 pkcs8 pem xcbc hmac kdf kernel-netlink socket-default android-dns \
stroke eap-identity eap-mschapv2 eap-md5 eap-gtc

ifneq ($(strongswan_BUILD_SCEPCLIENT),)
Expand Down
45 changes: 45 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
strongswan-5.9.6
----------------

- The IKEv2 key derivation, in particular prf+, has been modularized to simplify
certification (e.g. FIPS-140) via an already certified third-party library.
The botan, openssl and wolfssl plugins implement the key derivation for
HMAC-based PRFs via their respective HKDF implementation. A generic
implementation is provided by the new kdf plugin.

- Labeled IPsec with IKEv2 is supported in an SELinux and a proprietary simple
mode. In SELinux mode, traffic that matches a trap policy with generic
context (e.g. system_u:object_r:ipsec_spd_t:s0) triggers the negotiation of
CHILD_SAs with a specific label. With the simple mode, labels are not set on
SAs/policies but can be used as identifier to select specific child configs.

- DoS protection has been improved: COOKIE secrets are now switched based on a
time limit (2 min.), a new per-IP threshold (default 3) is used to trigger
them, and unprocessed IKE_SA_INITs are already counted as half-open IKE_SAs.

- Initiating duplicate CHILD_SAs within the same IKE_SA is largely prevented.

- Immediately initiating a CHILD_SA with trap policies is now possible via
`start_action=trap|start`.

- If the source address is unknown when initiating an IKEv2 SA, a NAT situation
is now forced for IPv4 (for IPv6, NAT-T is disabled) to avoid causing
asymmetric enabling of UDP-encapsulation.

- Installing unnecessary exclude routes for VPN servers on FreeBSD is avoided.

- The new `map_level` option for syslog loggers allows mapping log levels
to syslog levels starting at the specified number.

- The addrblock plugin allows limiting the validation depth of issuer addrblock
extensions.

- The default AEAD ESP proposal (sent since 5.9.0) now includes `noesn` to make
it standards-compliant.

- Individual CHILD_SAs can be queried via the `list-sas` vici command (or
`swanctl --list-sas ), either by unique ID or name.

- Compatibility with OpenSSL 3.0 has been improved.


strongswan-5.9.5
----------------

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ This document is just a short introduction of the strongSwan **swanctl** command
which uses the modern [**vici**](src/libcharon/plugins/vici/README.md) *Versatile
IKE Configuration Interface*. The deprecated **ipsec** command using the legacy
**stroke** configuration interface is described [**here**](README_LEGACY.md).
For more detailed information consult the man pages and
[**our wiki**](https://wiki.strongswan.org).
For more detailed information consult the man pages, our new
[**documentation site**](https://docs.strongswan.org) and the legacy
[**wiki**](https://wiki.strongswan.org).


## Quickstart ##
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Reporting a Vulnerability

Please report any security-relevant flaw to [email protected]. Whenever
possible encrypt your email with the [PGP key](https://pgp.key-server.io/0x1EB41ECF25A536E4)
possible encrypt your email with the [PGP key](https://download.strongswan.org/STRONGSWAN-SECURITY-PGP-KEY)
with key ID 0x1EB41ECF25A536E4.

## Severity Classification
Expand Down
11 changes: 11 additions & 0 deletions conf/options/charon-logging.opt
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,14 @@ charon.syslog.<facility>.ike_name = no

charon.syslog.<facility>.log_level = no
Add the log level of each message after the subsystem (e.g. [IKE2]).

charon.syslog.<facility>.map_level = -1
Map strongSwan specific loglevels to syslog loglevels.

The default setting of -1 passes all messages to syslog using a log
level of LOG_INFO. A non-negative value maps the strongSwan specific
loglevels (0..4) to the syslog level starting at the specified number.
For example, a value of 5 (LOG_NOTICE) maps strongSwan loglevel 0 to
LOG_NOTICE, level 1 to LOG_INFO, and levels 2, 3 and 4 to LOG_DEBUG.
This allows (additional) filtering of log messages on the syslog
server.
12 changes: 9 additions & 3 deletions conf/options/charon.opt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ charon.accept_unencrypted_mainmode_messages = no
example, some SonicWall boxes).

charon.block_threshold = 5
Maximum number of half-open IKE_SAs for a single peer IP.
Maximum number of half-open IKE_SAs (including unprocessed IKE_SA_INITs)
for a single peer IP.

charon.cert_cache = yes
Whether relations in validated certificate chains should be cached in
Expand Down Expand Up @@ -69,8 +70,13 @@ charon.cisco_unity = no
charon.close_ike_on_child_failure = no
Close the IKE_SA if setup of the CHILD_SA along with IKE_AUTH failed.

charon.cookie_threshold = 10
Number of half-open IKE_SAs that activate the cookie mechanism.
charon.cookie_threshold = 30
Number of half-open IKE_SAs (including unprocessed IKE_SA_INITs) that
activate the cookie mechanism.

charon.cookie_threshold_ip = 3
Number of half-open IKE_SAs (including unprocessed IKE_SA_INITs) for a
single peer IP that activate the cookie mechanism.

charon.crypto_test.bench = no
Benchmark crypto algorithms and order them by efficiency.
Expand Down
14 changes: 14 additions & 0 deletions conf/plugins/addrblock.opt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,17 @@ charon.plugins.addrblock.strict = yes
to no, subject certificates issued without the addrblock extension are
accepted without any traffic selector checks and no policy is enforced
by the plugin.

charon.plugins.addrblock.depth = -1
How deep towards the root CA to validate issuer cert addrblock extensions.

RFC3779 requires that all addrblocks claimed by a certificate must be
contained in the addrblock extension of the issuer certificate, up to
the root CA. The default depth setting of -1 enforces this.

In practice, third party (root) CAs may not contain the extension, making
the addrblock extension unusable under such CAs. By limiting the validation
depth, only a certain level of issuer certificates are validated for proper
addrblock extensions: A depth of 0 does not check any issuer certificate
extensions, a depth of 1 only the direct issuer of the end entity
certificate is checkend, and so on.
21 changes: 18 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# initialize & set some vars
# ============================

AC_INIT([strongSwan],[5.9.5])
AC_INIT([strongSwan],[5.9.6])
AM_INIT_AUTOMAKE(m4_esyscmd([
echo tar-ustar
echo subdir-objects
Expand Down Expand Up @@ -148,6 +148,7 @@ ARG_ENABL_SET([gcrypt], [enables the libgcrypt plugin.])
ARG_DISBL_SET([gmp], [disable GNU MP (libgmp) based crypto implementation plugin.])
ARG_DISBL_SET([curve25519], [disable Curve25519 Diffie-Hellman plugin.])
ARG_DISBL_SET([hmac], [disable HMAC crypto implementation plugin.])
ARG_DISBL_SET([kdf], [disable KDF (prf+) implementation plugin.])
ARG_ENABL_SET([md4], [enable MD4 software implementation plugin.])
ARG_DISBL_SET([md5], [disable MD5 software implementation plugin.])
ARG_ENABL_SET([mgf1], [enable the MGF1 software implementation plugin.])
Expand Down Expand Up @@ -323,6 +324,7 @@ ARG_ENABL_SET([python-eggs], [enable build of provided python eggs.])
ARG_ENABL_SET([python-eggs-install],[enable installation of provided python eggs.])
ARG_ENABL_SET([perl-cpan], [enable build of provided perl CPAN module.])
ARG_ENABL_SET([perl-cpan-install],[enable installation of provided CPAN module.])
ARG_ENABL_SET([selinux], [enable SELinux support for labeled IPsec.])
ARG_ENABL_SET([tss-trousers], [enable the use of the TrouSerS Trusted Software Stack])
ARG_ENABL_SET([tss-tss2], [enable the use of the TSS 2.0 Trusted Software Stack])

Expand Down Expand Up @@ -668,7 +670,7 @@ AC_CHECK_FUNC(
]
)

AC_CHECK_FUNCS(prctl mallinfo getpass closefrom getpwnam_r getgrnam_r getpwuid_r chown)
AC_CHECK_FUNCS(prctl mallinfo mallinfo2 getpass closefrom getpwnam_r getgrnam_r getpwuid_r chown)
AC_CHECK_FUNCS(fmemopen funopen mmap memrchr setlinebuf strptime dirfd sigwaitinfo explicit_bzero)

AC_CHECK_FUNC([syslog], [
Expand Down Expand Up @@ -1250,6 +1252,13 @@ if test x$capabilities = xlibcap; then
AC_DEFINE([CAPABILITIES_LIBCAP], [], [have libpcap library])
fi

if test x$selinux = xtrue; then
PKG_CHECK_MODULES(selinux, [libselinux])
AC_SUBST(selinux_CFLAGS)
AC_SUBST(selinux_LIBS)
AC_DEFINE([USE_SELINUX], [], [build with support for SELinux])
fi

if test x$integrity_test = xtrue; then
AC_MSG_CHECKING([for dladdr()])
AC_COMPILE_IFELSE(
Expand Down Expand Up @@ -1473,7 +1482,6 @@ ADD_PLUGIN([acert], [s charon])
ADD_PLUGIN([pubkey], [s charon pki cmd aikgen])
ADD_PLUGIN([pkcs1], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
ADD_PLUGIN([pkcs7], [s charon scepclient pki scripts nm cmd])
ADD_PLUGIN([pkcs8], [s charon scepclient pki scripts manager medsrv attest nm cmd])
ADD_PLUGIN([pkcs12], [s charon scepclient pki scripts cmd])
ADD_PLUGIN([pgp], [s charon])
ADD_PLUGIN([dnskey], [s charon pki])
Expand All @@ -1486,6 +1494,7 @@ ADD_PLUGIN([openssl], [s charon scepclient pki scripts manager meds
ADD_PLUGIN([wolfssl], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen])
ADD_PLUGIN([gcrypt], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen])
ADD_PLUGIN([botan], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen])
ADD_PLUGIN([pkcs8], [s charon scepclient pki scripts manager medsrv attest nm cmd])
ADD_PLUGIN([af-alg], [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
ADD_PLUGIN([fips-prf], [s charon nm cmd])
ADD_PLUGIN([gmp], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
Expand All @@ -1496,6 +1505,7 @@ ADD_PLUGIN([chapoly], [s charon scripts nm cmd])
ADD_PLUGIN([xcbc], [s charon nm cmd])
ADD_PLUGIN([cmac], [s charon nm cmd])
ADD_PLUGIN([hmac], [s charon pki scripts nm cmd])
ADD_PLUGIN([kdf], [s charon pki scripts nm cmd])
ADD_PLUGIN([ctr], [s charon scripts nm cmd])
ADD_PLUGIN([ccm], [s charon scripts nm cmd])
ADD_PLUGIN([gcm], [s charon scripts nm cmd])
Expand All @@ -1519,6 +1529,7 @@ ADD_PLUGIN([kernel-pfkey], [c charon starter nm cmd])
ADD_PLUGIN([kernel-pfroute], [c charon starter nm cmd])
ADD_PLUGIN([kernel-syscfg], [c charon starter nm cmd])
ADD_PLUGIN([kernel-netlink], [c charon starter nm cmd])
ADD_PLUGIN([selinux], [c charon starter nm cmd])
ADD_PLUGIN([resolve], [c charon cmd])
ADD_PLUGIN([save-keys], [c])
ADD_PLUGIN([socket-default], [c charon nm cmd])
Expand Down Expand Up @@ -1651,6 +1662,7 @@ AM_CONDITIONAL(USE_DNSKEY, test x$dnskey = xtrue)
AM_CONDITIONAL(USE_SSHKEY, test x$sshkey = xtrue)
AM_CONDITIONAL(USE_PEM, test x$pem = xtrue)
AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
AM_CONDITIONAL(USE_KDF, test x$kdf = xtrue)
AM_CONDITIONAL(USE_CMAC, test x$cmac = xtrue)
AM_CONDITIONAL(USE_XCBC, test x$xcbc = xtrue)
AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
Expand Down Expand Up @@ -1768,6 +1780,7 @@ AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
AM_CONDITIONAL(USE_ATTR_SQL, test x$attr_sql = xtrue)
AM_CONDITIONAL(USE_WINDOWS_DNS, test x$windows_dns = xtrue)
AM_CONDITIONAL(USE_COUNTERS, test x$counters = xtrue)
AM_CONDITIONAL(USE_SELINUX, test x$selinux = xtrue)

# other options
# ---------------
Expand Down Expand Up @@ -1917,6 +1930,7 @@ AC_CONFIG_FILES([
src/libstrongswan/plugins/random/Makefile
src/libstrongswan/plugins/nonce/Makefile
src/libstrongswan/plugins/hmac/Makefile
src/libstrongswan/plugins/kdf/Makefile
src/libstrongswan/plugins/xcbc/Makefile
src/libstrongswan/plugins/x509/Makefile
src/libstrongswan/plugins/revocation/Makefile
Expand Down Expand Up @@ -2073,6 +2087,7 @@ AC_CONFIG_FILES([
src/libcharon/plugins/attr/Makefile
src/libcharon/plugins/attr_sql/Makefile
src/libcharon/plugins/windows_dns/Makefile
src/libcharon/plugins/selinux/Makefile
src/libcharon/tests/Makefile
src/libtpmtss/Makefile
src/libtpmtss/plugins/tpm/Makefile
Expand Down
13 changes: 8 additions & 5 deletions scripts/malloc_speed.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <library.h>
#include <utils/debug.h>

#ifdef HAVE_MALLINFO
#if defined(HAVE_MALLINFO2) || defined (HAVE_MALLINFO)
#include <malloc.h>
#endif /* HAVE_MALLINFO */
#endif

static void start_timing(struct timespec *start)
{
Expand All @@ -38,12 +38,15 @@ static double end_timing(struct timespec *start)

static void print_mallinfo()
{
#ifdef HAVE_MALLINFO
#ifdef HAVE_MALLINFO2
struct mallinfo2 mi = mallinfo2();
printf("malloc: sbrk %zu, mmap %zu, used %zu, free %zu\n",
mi.arena, mi.hblkhd, mi.uordblks, mi.fordblks);
#elif defined(HAVE_MALLINFO)
struct mallinfo mi = mallinfo();

printf("malloc: sbrk %d, mmap %d, used %d, free %d\n",
mi.arena, mi.hblkhd, mi.uordblks, mi.fordblks);
#endif /* HAVE_MALLINFO */
#endif
}

#define ALLOCS 1024
Expand Down
Loading
Loading