| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Since 3.1 gperf uses size_t for the length parameter instead of an
unsigned int.
|
|
|
|
|
|
|
|
|
| |
Recent releases of glibc don't include the full stdint.h header in some
network headers included by utils.h. So uintptr_t might not be defined.
Since we use fixed width integers, including the latter, all over the place
we make sure the complete file is included.
Fixes #2425.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes compilation with -Werror when using Clang 4.0 (but not 3.9)
and possibly prevents undefined behavior.
According to the C standard the following applies to the second
parameter of the va_start() macro (subclause 7.16.1.4, paragraph 4):
The parameter parmN is the identifier of the rightmost parameter
in the variable parameter list in the function definition (the
one just before the ...). If the parameter parmN is declared with
the register storage class, with a function or array type, or with
a type that is not compatible with the type that results after
application of the default argument promotions, the behavior is
undefined.
Because bool is usually just 1 byte and therefore smaller than int (i.e.
the result of default argument promotion) its use as last argument before
... might result in undefined behavior. This theoretically can also
apply to enums as a compiler may use a smaller base type than int.
Since Clang 3.9 (currently in use on Travis by default) a warning is
issued about this, however, that version did not yet compare the actual
size of the argument's type, causing warnings where they are not
warranted (basically for all cases where enum types are used for the
last argument). This was apparently fixed with Clang 4.0, which only
warns about this use of bool with va_start(), which makes sense.
|
|
|
|
|
|
| |
They now match the dh_constructor_t signature. This is a follow up for
the changes merged with b668bf3f9ec1 and should fix use of MODP_CUSTOM on
Apple's ARM64 platform.
|
|
|
|
| |
Fixes: 305c4aa82cb0 ("plugin-loader: Optionally use RTLD_NOW with dlopen()")
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The generic field of size 0 in the union that was used previously
triggered index-out-of-bounds errors with the UBSAN sanitizer that's
used on OSS-Fuzz. Since the two family specific union members don't
really provide any advantage, we can just use a single buffer for both
families to avoid the errors.
|
|
|
|
| |
This avoids compile errors on Travis.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
This avoids having the last output in internal memory that's not wiped.
References #2388.
|
|
|
|
|
|
|
| |
The buffer contains key material we handed out last and the seed can
contain the DH secret.
References #2388.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
That's required when these are used as include paths in settings file
strings.
|
|
|
|
| |
We currently don't have an RNG in Windows builds.
|
| |
|
|
|
|
| |
Otherwise this won't work if the certificate is only locally available.
|
|
|
|
|
|
|
| |
The maximum number of redirects can be limited. The functionality can also
be disabled.
Fixes #2366.
|
| |
|
|
|
|
|
| |
The nonce value is encoded as OCTET STRING, however, the extension
values themselves must also be encoded as OCTET STRING.
|
| |
|
| |
|
|
|
|
| |
Newer NDKs fail otherwise as there is no actual module anymore.
|
| |
|
| |
|
|
|
|
| |
Fixes: CVE-2017-9023
|
| |
|
|
|
|
| |
Fixes: CVE-2017-9023
|
|
|
|
|
|
|
|
|
| |
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")
|
| |
|
| |
|
|
|
|
| |
This avoids the unportable five pointer hack.
|
|
|
|
| |
This avoids the unportable five pointer hack.
|
| |
|
|
|
|
|
| |
This avoids the unportable 5 pointer hack, but requires enumerating in
the callback.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This avoids evaluating %N. An alternative would be to define a printf-hook
for plugin features.
|
|
|
|
| |
This avoids a warning about the custom %Y printf specifier.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Using a Python script so this works in cross-compilation situations.
|