Age | Commit message (Collapse) | Author |
|
from markus@
|
|
Found by David Linder
ok patrick@
|
|
be NULL here.
Found by tb@
|
|
|
|
|
|
To use sec(4) instead of policy based tunnels, create a sec(4)
interface and add 'iface secXX' to your policy config.
sec(4) interfaces also support auto configuration for dynamic client
IPs via 'request any' like all other interfaces.
The config won't work without traffic selectors, 'from any to any'
should work for now but I plan to make this optional in the future.
ok dlg@
|
|
NULL to ibuf_size(). In some cases it is clear that the ibuf pointer
should just be checked for NULL since afterwards a new ibuf is allocated
in its place.
OK tb@
|
|
OK tb@
|
|
Also convert some ibuf_add(() calls to ibuf_add_buf() where appropriate.
OK tobhe@ tb@
|
|
OK tb@ tobhe@
|
|
Also replace a ibuf_reserve() call with ibuf_add_zero() and
remove a buf->buf == NULL check in ibuf_length() since it is not necessary.
OK tobhe@ tb@
|
|
Encode cert and intermediate CAs in new cert bundle object,
so the information can be passed to the ca process in one step.
Pass untrusted intermediates to X509_verify_cert().
From markus@
|
|
would lose their parent.
ok tobhe@
|
|
it's a noop; nowadays both LibreSSL and OpenSSL libcrypto and libssl
initialize themselves automatically before doing anything.
spotted by tb, ok tb tobhe
|
|
Functions extending ibuf_add to work with more specific data types
ibuf_add_buf, ibuf_add_zero, ibuf_add_n8, ibuf_add_n16, ibuf_add_n32,
ibuf_add_n64
Functions replacing ibuf_seek where data at a specific offset is modified
ibuf_set, ibuf_set_n8, ibuf_set_n16, ibuf_set_n32, ibuf_set_n64
Functions to check, get and set the filedescriptor stored on the ibuf
ibuf_fd_avail, ibuf_fd_get, ibuf_fd_set
and ibuf_data() to access the data buffer, to be used together with ibuf_size()
On top of this add an optimized imsg_compose_ibuf() where an ibuf is wrapped
into an imsg in an efficent way.
Finally remove msgbuf_drain since it is not used by anything outside of
the ibuf code. Because of this removal bump the major of libutil.
Remove ibuf_data() in iked since the same function is now provided by libutil.
OK tb@
|
|
from markus
|
|
ok claudio tobhe
|
|
In most cases print_host(addr, buf, buflen) can be replaced with
strlcpy(buf, print_addr(addr), buflen).
Some code was never fully adjusted to the full power of print_host() and
there are remnants of times well before print_host() supported multiple
internal buffers.
With and OK tb@
|
|
The vast majority of print_host() callers cast the first argument
(usually a sockaddr_storage *) to (struct sockaddr *) and pass both
a NULL buffer and 0 length. Cast and useless arguments lead to
awkward line wrapping in many places. Clean this up by introducing a
helper. Make this helper take a void pointer, so all casts go away.
ok claudio kn tobhe
|
|
If flowf is NULL then fclose(spif) must be called.
Split up the error check from if (spif == NULL || flowf == NULL) to
individual checks since that is easier to read.
Noticed by markus@, OK tb@
|
|
abuse ibufs for that. Using stdio for this has the benefit of using any
stdio function to build up strings including fprintf().
With and OK tb@
|
|
is loaded with ibuf_data(). This is by no means better but allows to
switch ibuf_data() to return void *.
OK tb@
|
|
the same in these cases.
OK tb@
|
|
method but instead of overwriting ibuf internals replace the buf a level up.
Users of ikev2_msg_send() are not allowed to hold and reuse a pointer to
msg_data (which is another footgun to disarm at some point).
OK tb@
|
|
OK tobhe@ tb@ kn@
|
|
OK kn@ tb@
|
|
More cleanup will follow.
OK tobhe@
|
|
|
|
Do no use this as length in iked(8) _dsa_verify_prepare().
OK tobhe@ tb@
|
|
ok patrick@ bluhm@
|
|
ok miod@ millert@
|
|
instead of getting it from p_ps. The old approach does not work anymore
after the recent fork + exec update.
ok patrick@
|
|
each process a fresh and unique address space to further improve randomization
of ASLR and stack protector.
ok bluhm@ patrick@
|
|
ok florian@ bluhm@
ok for vmd mlarkin@
|
|
client. This allows us to have a fallback in case one connection
fails.
Tested by Ryan Kavanagh
ok patrick@
|
|
It is not entirely obvious if some logic was forgotten or if that variable
was added for debug logging or... Be that as it may, as tobhe points out,
this variable has been unused since the initial import of iked. The logic
seems sound without it, so it has never served a purpose and can go.
ok tobhe
|
|
ok tobhe
|
|
ok patrick@
|
|
ok patrick@
|
|
|
|
|
|
Instead of the discouraged obj = NULL; d2i_ECDSA_SIG(&obj, ...); use the
recommended obj = d2i_ECDSA_SIG(NULL, ...);. While it makes no difference
here, it's better practice.
suggested by & ok markus
|
|
|
|
If csa_bundled is set, exactly two csas exist and they point to
each other. Therefore childsa_free already sets the bundled csa
pointer to NULL and it shouldn't be done after calling childsa_free.
ok tobhe@
|
|
possible use after free.
ok tobhe@
|
|
possible use after free.
ok tobhe@
|
|
initialization where the msg_parent field is accessed.
ok tobhe
|
|
When linking against libressl, OPENSSL_malloc() is just a wrapper around malloc()
so regular free() is safe. Other implementations allow switching to a different
allocator where free() could result in a possible heap corruption.
Report and initial fix by dropk1ck (gh #92)
ok tb@
|
|
string size that could lead to a buffer overflow in ikev2_print_id().
Found by and fix from dropk1ck on github (issue #90)
ok patrick@ mbuhl@
|
|
directly instead of calling group_get() and leaking the result.
ok markus@
|