aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
Commit message (Collapse)AuthorAgeFilesLines
* gmp: Fix RSA signature verification for m >= nTobias Brunner2017-08-141-3/+9
| | | | | | | | By definition, m must be <= n-1, we didn't enforce that and because mpz_export() returns NULL if the passed value is zero a crash could have been triggered with m == n. Fixes CVE-2017-11185.
* Fixed some typos, courtesy of codespellTobias Brunner2017-08-072-2/+2
|
* sha2: Write final hash directly to output bufferTobias Brunner2017-08-071-56/+26
| | | | | | This avoids having the last output in internal memory that's not wiped. References #2388.
* prf-plus: Wipe seed and internal bufferTobias Brunner2017-08-071-2/+2
| | | | | | | The buffer contains key material we handed out last and the seed can contain the DH secret. References #2388.
* child-sa: Allow requesting different unique marks for in/outEyal Birger2017-08-072-2/+17
| | | | | | | | | | | | | | | | | | | | When requiring unique flags for CHILD_SAs, allow the configuration to request different marks for each direction by using the %unique-dir keyword. This is useful when different marks are desired for each direction but the number of peers is not predefined. An example use case is when implementing a site-to-site route-based VPN without VTI devices. A use of 0.0.0.0/0 - 0.0.0.0/0 traffic selectors with identical in/out marks results in outbound traffic being wrongfully matched against the 'fwd' policy - for which the underlay 'template' does not match - and dropped. Using different marks for each direction avoids this issue as the 'fwd' policy uses the 'in' mark will not match outbound traffic. Closes strongswan/strongswan#78.
* unit-tests: Double escape backslashes in Windows paths in settings testTobias Brunner2017-07-281-2/+6
| | | | | That's required when these are used as include paths in settings file strings.
* unit-tests: iv_gen_seq has a dependency on RNG_STRONGTobias Brunner2017-07-281-1/+1
| | | | We currently don't have an RNG in Windows builds.
* credential-manager: Log issuer identity if not foundTobias Brunner2017-07-271-0/+2
|
* auth-cfg: Don't limit subjectAltName check to received certificatesTobias Brunner2017-07-271-1/+1
| | | | Otherwise this won't work if the certificate is only locally available.
* curl: Enable following redirectsTobias Brunner2017-07-271-0/+9
| | | | | | | The maximum number of redirects can be limited. The functionality can also be disabled. Fixes #2366.
* imv-swima: Implemented SW event processingAndreas Steffen2017-07-081-2/+12
|
* x509: Correctly encode nonce in OCSP requestTobias Brunner2017-07-071-1/+2
| | | | | The nonce value is encoded as OCTET STRING, however, the extension values themselves must also be encoded as OCTET STRING.
* utils: Make second argument to memxor() constTobias Brunner2017-07-052-2/+2
|
* android: Enable revocation pluginTobias Brunner2017-07-031-0/+2
|
* android: Use LOCAL_LDLIBS to link libdlTobias Brunner2017-07-031-1/+1
| | | | Newer NDKs fail otherwise as there is no actual module anymore.
* configure: Enable coverage for all plugins via PLUGIN_CFLAGSTobias Brunner2017-06-203-6/+3
|
* openssl: Properly handle flags in key usage extensionTobias Brunner2017-06-141-8/+6
|
* x509: nameConstraints sequence does not require a loopAndreas Steffen2017-05-291-2/+1
| | | | Fixes: CVE-2017-9023
* unit-tests: Updated asn1-parser testsAndreas Steffen2017-05-291-1/+105
|
* asn1-parser: Fix CHOICE parsingAndreas Steffen2017-05-293-75/+134
| | | | Fixes: CVE-2017-9023
* gmp: Make sure the modulus is odd and the exponent not zeroTobias Brunner2017-05-291-1/+6
| | | | | | | | | Unlike mpz_powm() its secure replacement mpz_powm_sec() has the additional requirement that the exponent must be > 0 and the modulus has to be odd. Otherwise, it will crash with a floating-point exception. Fixes: CVE-2017-9022 Fixes: 3e35a6e7a1b0 ("Use side-channel secured mpz_powm_sec of libgmp 5, if available")
* leak-detective: Whitelisted memory leaks in FHH IMCs and IMVsAndreas Steffen2017-05-291-0/+3
|
* Fixed some typos, courtesy of codespellTobias Brunner2017-05-261-1/+1
|
* linked-list: Change return value of find_first() and signature of its callbackTobias Brunner2017-05-267-73/+161
| | | | This avoids the unportable five pointer hack.
* linked-list: Change interface of callback for invoke_function()Tobias Brunner2017-05-263-16/+21
| | | | This avoids the unportable five pointer hack.
* linked-list: invoke_offset() doesn't take any additional arguments anymoreTobias Brunner2017-05-263-18/+16
|
* Change interface for enumerator_create_filter() callbackTobias Brunner2017-05-2613-359/+517
| | | | | This avoids the unportable 5 pointer hack, but requires enumerating in the callback.
* Migrate all enumerators to venumerate() interface changeTobias Brunner2017-05-2623-304/+409
|
* enumerator: Add venumerate() method to enumerator_t that takes a va_listTobias Brunner2017-05-262-8/+51
| | | | | | | | | | This will allow us to implement e.g. enumerator_cleaner without having to use that unportable 5 pointer forwarding or having to define a callback for each instance. A generic implementation for enumerate() is provided so only venumerate() has to be implemented, which may be simplified by using the VA_ARGS_VGET() macro.
* utils: Add helper macros to read variadic arguments into local variablesTobias Brunner2017-05-261-2/+46
|
* unit-tests: Fix test_chunk_eq() if arguments have side-effectsTobias Brunner2017-05-241-1/+1
|
* asn1: Make sure the first argument to sscanf() is null-terminatedTobias Brunner2017-05-231-7/+9
|
* x509: Fix leak when parsing CDPs if an invalid one follows valid onesTobias Brunner2017-05-231-2/+2
|
* pem: Ensure a value before checking Proc-Type in PEM headerTobias Brunner2017-05-231-1/+1
|
* chunk: Correctly parse Base64 text where four = follow in a rowTobias Brunner2017-05-231-1/+1
| | | | | | | That's not correct Base64 but invalid data could trigger this. Since outlen would get reduced four times, but is only ever increased three times per iteration, this could result in an integer underflow and then a potential buffer overflow.
* plugin-loader: Disable some logging output when building fuzz targetsTobias Brunner2017-05-231-4/+19
| | | | | This avoids evaluating %N. An alternative would be to define a printf-hook for plugin features.
* x509: Manually print CRL/OCSP URIs when fuzzingTobias Brunner2017-05-231-8/+25
| | | | This avoids a warning about the custom %Y printf specifier.
* processor: Move priority threads assignment to set_threads()Tobias Brunner2017-05-231-4/+9
| | | | | | This avoids the evaluation of %N even if the thread pool is never used. We need to avoid as many custom printf specifiers as possible when fuzzing our code to avoid excessive log messages.
* Add plugin constructor registration for all libraries that provide pluginsTobias Brunner2017-05-232-0/+16
| | | | | | | | | | | | | | Unfortunately, we can't just add the generated C file to the sources in Makefile.am as the linker would remove that object file when it notices that no symbol in it is ever referenced. So we include it in the file that contains the library initialization, which will definitely be referenced by the executable. This allows building an almost stand-alone static version of e.g. charon when building with `--enable-monolithic --enable-static --disable-shared` (without `--disable-shared` libtool will only build a version that links the libraries dynamically). External libraries (e.g. gmp or openssl) are not linked statically this way, though.
* plugin-constructors: Add script to generate constructor registrationTobias Brunner2017-05-232-0/+61
| | | | Using a Python script so this works in cross-compilation situations.
* plugin-loader: Add facility to register plugin constructorsTobias Brunner2017-05-232-3/+69
| | | | | | | | | | | | | | Enabled when building monolithically and statically. This should allow us to work around the -whole-archive issue with libtool. If the libraries register the plugin constructors they provide they reference the constructors and will therefore prevent the linker from removing these seemingly unused symbols from the final executable. For use cases where dlsym() can be used, e.g. because the static libraries are manually linked with -whole-archive (Linux) or -force-load (Apple), this can be disabled by passing ss_cv_static_plugin_constructors=no to the configure script.
* library: Add compile option to disable memwipe() checkTobias Brunner2017-05-231-0/+6
|
* pem: Don't read beyond line endsTobias Brunner2017-05-231-2/+2
|
* x509: Fix leak if there is an empty CDPTobias Brunner2017-05-231-1/+7
|
* x509: Fix leak if a certificate contains multiple authorityKeyIdentifiersTobias Brunner2017-05-231-0/+1
|
* credential-manager: Prefer local over global setsAdrian-Ken Rueegsegger2017-05-231-7/+7
| | | | | Invert set enumeration order to first enumerate local and then global credential sets.
* tun-device: Use next free TUN device on FreeBSDTobias Brunner2017-05-191-3/+18
| | | | | | | | | | | While this API is documented as legacy (and there is a sysctl option to disable it) the documentation also mentions that it will probably stay enabled by default due to compatibility issues with existing applications. With the previous approach only 255 devices could be opened then the daemon had to be restarted. Fixes #2313.
* tun-device: TUN devices are not supported on iOSTobias Brunner2017-05-191-1/+10
|
* af-alg: Fix crypt() definition conflictBaruch Siach2017-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | Rename the crypt() method to avoid conflict with POSIX crypt(). Fixes the following build failure with musl libc: In file included from ../../../../src/libstrongswan/utils/utils.h:53:0, from ../../../../src/libstrongswan/library.h:101, from af_alg_ops.h:24, from af_alg_ops.c:16: af_alg_ops.c:110:22: error: conflicting types for 'crypt' METHOD(af_alg_ops_t, crypt, bool, ^ ../../../../src/libstrongswan/utils/utils/object.h:99:13: note: in definition of macro 'METHOD' static ret name(union {iface *_public; this;} \ ^ In file included from af_alg_ops.c:18:0: .../host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/unistd.h:144:7: note: previous declaration of 'crypt' was here char *crypt(const char *, const char *); ^ Closes strongswan/strongswan#72.
* x509: Evaluate return codes of parsing functionsAndreas Steffen2017-05-084-52/+149
|