summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-04-22For small allocations (chunk) freezero only validates the givenotto1-5/+10
size if canaries are enabled. In that case we have the exact requested size of the allocation. But we can at least check the given size against the chunk size if C is not enabled. Plus add some braces so my brain doesn't have to scan for dangling else problems when I see this code.
2017-04-20Fix previous.visa1-2/+2
2017-04-20Get TCB address using the RDHWR instruction instead of __get_tcb().visa1-4/+5
This gives fast access to the address on systems that implement the UserLocal register. TCB caching is still used when running in the single-threaded mode in order not to penalize old systems. The kernel counterpart of this change must be in place before using this diff! With guenther@
2017-04-18don't forget to fill in canary bytes for posix_memalign(3); reported byotto1-1/+4
and ok jeremy@
2017-04-18use freezero() instead of 4-line conditional explicit_bzero + freederaadt4-28/+10
2017-04-17consictently use .Dv NULL and a few other tweaks; ok schwarze@otto1-20/+17
2017-04-17whitespace fixesotto1-14/+14
2017-04-16Use INT_MAX instead of SIZE_MAX as the maximum file size we can handle.kettenis1-2/+2
Fixes this test on 64-bit architectures. ok visa@
2017-04-16Define DEF_WEAK like we do for ld.so to fix building this with clang.kettenis1-1/+2
ok millert@, deraadt@
2017-04-16Move comments into a block and uses {} to unconfuse reading.deraadt1-12/+13
2017-04-16Use %zu to print a size_t.kettenis1-2/+2
2017-04-16Remove unused rnd_seed variable. Upstream made the same change 4 days ago.kettenis1-3/+0
Fixes compiling this test using clang on arm64.
2017-04-16backout previous, data_len is not always initializedotto1-2/+5
2017-04-14Use freezero(3) when cleaning up session tickets - not only does it requirejsing1-6/+3
less code, but there is also a potential performance gain since they can be larger allocations.
2017-04-14Use freezero(3) to clean up the X25519 keys - simpler, cleaner code.jsing1-6/+3
2017-04-14Use freezero(3) in the CBB clean up path, since this could hold sensitivejsing1-3/+2
information (such as master keys).
2017-04-14Switch i2d_SSL_SESSION() back to freezero(3) now that the size constraintsjsing1-5/+2
have been relaxed.
2017-04-14Clean up server key exchange EC point handling. Encode the point directlyjsing1-27/+15
into the CBB memory, rather than mallocing and memcpying, which also makes makes the code more consistent with the client. Add a missing check for the first EC_POINT_point2oct() call. ok beck@
2017-04-13allow clearing less than allocated and document freezero(3) betterotto2-13/+26
2017-04-12New strstr() implementation from musl libc by Rich Felker. Thismillert1-44/+180
version uses the two-way string matching algorithm and is faster than the old implementation. With this change, ports that check for strstr having linear complexity time strstr will no longer replace the libc strstr with a private version. OK deraadt@ espie@
2017-04-11Revert ssl_asn1.c r1.50 - CBB and freezero(3) do not play nicely together.jsing1-2/+5
Back this out while we investigate and implement a solution. Found the hard way by sthen@
2017-04-10new X25519(3) manual page;schwarze5-10/+113
from Dr. Stephen Henson <steve@openssl.org>, OpenSSL commit d218f3c3
2017-04-10Use freezero() for the internal opaque structures, instead of the currentjsing3-18/+9
explicit_bzero()/free(). Less code and potentially less overhead.
2017-04-10Use freezero() for X25519 keys - same result with more readable code.jsing1-7/+3
2017-04-10document three additional functions;schwarze1-7/+60
from Emilia Kasper <emilia at openssl dot org>, OpenSSL commit 4ac139b4
2017-04-10Rework and significantly extend TLS name verification tests to matchjsing1-99/+377
changes in libtls.
2017-04-10Rework name verification code so that a match is indicated via an argument,jsing5-47/+76
rather than return codes. More strictly follow RFC 6125, in particular only check the CN if there are no SAN identifiers present in the certificate (per section 6.4.4). Previous behaviour questioned by Daniel Stenberg <daniel at haxx dot se>. ok beck@ jca@
2017-04-10freezero() the key block; simpler code and less of it.jsing1-7/+3
2017-04-10Use freezero() for i2d_SSL_SESSION() - one line of code instead of three.jsing1-5/+2
In this case the memory allocated can also be significant, in which case freezero() will have less overhead than explicit_bzero() (munmap instead of touching all of the memory to write zeros).
2017-04-10fix some .Xr errors that jmc@ found with mdoclint(1)schwarze3-12/+13
2017-04-10new manual page SSL_get_server_tmp_key(3)schwarze3-2/+88
from Matt Caswell <matt@openssl.org>, OpenSSL commit 508fafd8
2017-04-10Additional SSL_SESSION documentationschwarze11-16/+349
from Matt Caswell <matt at openssl dot org>, OpenSSL commit b31db505. Improve crosslinking while here.
2017-04-10for pure *_ctrl() wrapper macros, move the reference from ssl(3)schwarze14-49/+54
to SSL_CTX_ctrl(3) to make ssl(3) slightly more palatable
2017-04-10new manual page SSL_CTX_set_tlsext_servername_callback(3) for SNI;schwarze2-1/+126
from <Jon dot Spillett at oracle dot com> via OpenSSL commit 8c55c461
2017-04-10tweak previous;jmc1-4/+4
2017-04-10Convert various client key exchange functions to freezero(3). The memoryjsing1-14/+5
contents needs to be made inaccessible - this is simpler and less error prone than the current "if not NULL, explicit_bzero(); free()" dance.
2017-04-10Introducing freezero(3) a version of free that guarantees the processotto2-36/+130
no longer has access to the content of a memmory object. It does this by either clearing (if the object memory remains cached) or by calling munmap(2). ok millert@, deraadt@, guenther@
2017-04-10pasto; from <Jon dot Spillett at oracle dot com> via OpenSSL commit 3aaa1bd0schwarze1-3/+3
2017-04-10typo fix; from <Jon dot Spillett at oracle dot com>schwarze1-5/+5
via OpenSSL commit 7bd27895
2017-04-09Simplify/clean up BUF_MEM_grow_clean().jsing1-17/+16
ok beck@
2017-04-09With recallocarray() BUF_MEM_grow() is essentially the same asjsing1-28/+2
BUF_MEM_grow_clean() (the only difference is clearing on internal down sizing), so make it a wrapper. ok beck@ deraadt@
2017-04-09Explicitly test for NULL.jsing1-4/+4
ok beck@
2017-04-09Improve unknown protocol version handling.jsing1-2/+3
2017-04-07In ssl.h TLS 1.0 is called TLSv1. Adapt name in test to make it pass.bluhm1-1/+1
OK jsing@
2017-04-07Use uint8_t instead of u_int8_t - for consistency and to make things easierjsing1-2/+2
for portable. From Raphael Hittich.
2017-04-06trailing ; on end of macro definition is wrong; ok guentherderaadt1-4/+4
2017-04-06Consistentcy between nmembers and size order. From Christopher Hettrick;otto1-8/+8
ok deraadt@
2017-04-06bump version for new development branchbcook1-3/+3
2017-04-06first print size in meta-data then supplied arg size when an inconsistency isotto1-3/+3
detected wrt recallocarray()
2017-04-05- -Z before -z in options listjmc2-7/+9
- add -Z to help and usage()