summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-06-06s/assember/assembler/ before someone gets offended. At the lastTheo de Raadt
hackathon, just saying 'ass ember' was enough to start giggles. Unfortunately far more offensive stuff remains in here...
2014-06-05Do not recurse when a 'Hello Request' message is received while gettingJoel Sing
DTLS fragments. A stream of 'Hello Request' messages will result in infinite recursion, eventually crashing the DTLS client or server. Fixes CVE-2014-0221, from OpenSSL. Reported to OpenSSL by Imre Rad.
2014-06-05Ensure that sess_cert is not NULL before trying to use it.Joel Sing
Fixes CVE-2014-3470, from OpenSSL. ok deraadt@
2014-06-05Avoid a buffer overflow that can be triggered by sending specially craftedJoel Sing
DTLS fragments. Fix for CVE-2014-0195, from OpenSSL. Reported to OpenSSL by Juri Aedla. ok deraadt@ beck@
2014-06-05ssl_sess_cert_new() can return NULL. Fix two cases where the return valueJoel Sing
is unchecked, which would result in a later null pointer dereference. While here, RSA_free, DH_free and EC_KEY_free all have implicit NULL checks, so avoid repeating them here. ok beck@
2014-06-05Ensure that we do not process a ChangeCipherSpec with an empty masterJoel Sing
secret. This is an additional safeguard against early ChangeCipherSpec handling. From OpenSSL. ok deraadt@
2014-06-05Be selective as to when ChangeCipherSpec messages will be accepted.Joel Sing
Without this an early ChangeCipherSpec message would result in session keys being generated, along with the Finished hash for the handshake, using an empty master secret. For a detailed analysis see: https://www.imperialviolet.org/2014/06/05/earlyccs.html This is a fix for CVE-2014-0224, from OpenSSL. This issue was reported to OpenSSL by KIKUCHI Masashi. Unfortunately the recent OpenSSL commit was the first we were made aware of the issue. ok deraadt@ sthen@
2014-06-05More KNF.Joel Sing
2014-06-04Sanitize use of client_opaque_prf_input: set it to NULL immediately afterMiod Vallat
free()ing it, rather than in conditional code. Also do not bother setting server_opaque_prf_input (server, not client) to NULL in conditional code 10 lines after explicitely free()ing it and setting it to NULL (were the developers afraid of zombie pointers?) ok guenther@
2014-06-04Fix a leak that can occur when len == 0, and as a result we leak a \0 byte.Loganaden Velvindron
(From Frantisek Boranek) OK from miod@
2014-06-04without overthinking it, replace a few memcmp calls with CRYPTO_memcmpTed Unangst
where it is feasible to do so. better safe than sorry.
2014-06-03Fix memory leak.Loganaden Velvindron
(From Martin Brejcha) OK from tedu@, miod@ and deraadt@
2014-06-02Remove RANDFILE remnants.Joel Sing
2014-06-02A few months back there was a big community fuss regarding direct-useTheo de Raadt
of the intel RDRAND instruction. Consensus was RDRAND should probably only be used as an additional source of entropy in a mixer. Guess which library bends over backwards to provide easy access to RDRAND? Yep. Guess which applications are using this support? Not even one... but still, this is being placed as a trap for someone. Send this support straight to the abyss. ok kettenis
2014-06-02Rename more variables for readability and consistency.Joel Sing
2014-06-02Since pqueue is a private interface and the header defining the structPhilip Guenther
isn't even exported, there's no (sane) way for someone else to use the typedef. Eliminate the typedef and just use "struct _pqueue *". duplicate typedef pointed out by Brent Cook (busterb (at) gmail.com) ok miod@
2014-06-01Clean up some of the nightmare of string and pointer arithmatic inBob Beck
this nasty function. This gets rid of the nasty tmp variables used to hold temporary strings and the DECIMAL_SIZE hack. it gets rid of the rather pointless null checks for buf (since the original code dereferences it before checking). It also gets rid of the insane possibility this could return -1 when stuff is using the return values to compute lengths All the failure cases now return 0 and an empty string like the first error case in the original code. ok miod@ tedu@
2014-06-01realloc with NULL is same as mallocTheo de Raadt
ok guenther
2014-06-01Overhaul the key block handling in tls1_change_cipher_state() - useJoel Sing
meaningful variable names with pointer arithmitic, rather than n, i, j and p with array indexing. Based on Adam Langley's chromium diffs. ok miod@
2014-06-01In tls1_setup_key_block(), use the correct IV length for GCM mode, whichJoel Sing
results in the key block length calculation also being correct. Rename a number of variables so that their purpose becomes clear and simplify some of the code. Inspired by Adam Langley's chromium diffs. ok miod@
2014-06-01There is no need for is{upper,lower}() tests before to{lower,uppper}(),Theo de Raadt
since all other characters are mapped through transparently. ok jsing
2014-06-01Commit this before the head-scratching leads to premature baldness:Theo de Raadt
memset(a->data, 0, (unsigned int)a->max); but the decl is: size_t max; size_t could be larger than int, especially in some of the systems OpenSSL purports to support. How do _intentionally truncating_ casts like enter into a codebase? Lack of understanding of C, at a minimum. Generally the objects are small, but this code is _intentionally unready_ for large objects. ok miod
2014-06-01Remove __bio_h__attr__ wrapper around __attribute__, since earlier statementsMiod Vallat
in this file directly use __attribute__. ok deraadt@
2014-06-01Add a deprecated attribute to all CRYPTO_dbg_ functions.Miod Vallat
ok deraadt@
2014-06-01Avoid the use of an uninitialised variable. In reality, this is a non-issueJoel Sing
since the calculated value is not actually used in the uninitialised case. Change the code so that we only do the calculation if we actually need it. Issue detected by clang and reported by both brad@ and Brent Cook.
2014-06-01EBCDIC support died a while ago, except in a comment.Theo de Raadt
2014-06-01Clean up the tls1_change_cipher_state() key length handling and use aJoel Sing
single variable with a descriptive name, instead of two poorly named variables. Largely based on Adam Langley's chromium patches. ok miod@
2014-06-01Use C99 initialisers for cipher_aliases. This improves readability,Joel Sing
removes the need for zero values to be specified (meaning that we usually specify two fields instead of 12), makes the field names grepable and protects from future field reordering/removal. ok beck@ miod@
2014-05-31Get the public headers from the official place with <openssl/ >Theo de Raadt
from Brent Cook
2014-05-31annoying whitespaceTheo de Raadt
2014-05-31Change the actual default for returned asn1 strings to be utf8 in the code,Bob Beck
rather than only in the config file, to trip people up later. Found, and fix pleaded for by <spider@skuggor.se> who apparently spent hours chasing it down. ok miod@
2014-05-31BUF_MEM_grow_clean() takes a size_t as the size argument. Remove false commentsMiod Vallat
mentioning it's an int, bogus (int) casts and bounds checks against INT_MAX (BUF_MEM_grow_clean has its own integer bounds checks). ok deraadt@
2014-05-31Add a comment documenting where libssl depends upon the current (objectionable)Miod Vallat
behaviour of this code, to prevent people from blindly changing it.
2014-05-31copy a comment placed in other files; req from miodTheo de Raadt
2014-05-31Some KNF and fix the vairable spelling.Joel Sing
2014-05-31Move the cts128 and gcm128 tests to regress.Joel Sing
2014-05-31More KNF.Joel Sing
2014-05-31More manual OPENSSL_NO_EC and OPENSSL_NO_TLSEXT cleanup.Joel Sing
2014-05-31unifdef -UDOXYGEN and manually remove the few doxygen comments that are notJoel Sing
wrapped in #ifdef DOXYGEN... Requested by miod@
2014-05-31ECDH and ECDSA will not work overly well if there is no EC, so unifdefJoel Sing
OPENSSL_NO_EC. ok tedu@
2014-05-31TLS would not be entirely functional without extensions, so unifdefJoel Sing
OPENSSL_NO_TLSEXT. ok tedu@
2014-05-30Don't add potentially nasty stderr uses to dead CRYPTO_dbg_mem functions.Theo de Raadt
But do use the abort(), which we are hoping all future vendors will move towards the more modern "do not flush streams"; hint hint, if you didn't do that already, there are grave risks because much software brings risk without that behaviour. We didn't cause the change.. POSIX did... ok beck
2014-05-30Move sha256 and sha512 tests to regress and wire them up.Joel Sing
2014-05-30Move the AES wrap test code into regress.Joel Sing
2014-05-30More KNF.Joel Sing
2014-05-30remove some #if 0 code. we don't need any more reminders that we're usingTed Unangst
a not quite appropriate data structure. ok jsing
2014-05-30Make use of SSL_IS_DTLS, SSL_USE_EXPLICIT_IV, SSL_USE_SIGALGS andJoel Sing
SSL_USE_TLS1_2_CIPHERS. Largely based on OpenSSL head.
2014-05-30Fix some more nasty stringyness in here by using asprintf instead of cruft.Bob Beck
gets rid of the second last use of the awful DECIMAL_SIZE.
2014-05-30more: no need to null check before free; ok guentherTheo de Raadt
2014-05-30more: no need for null check before freeTheo de Raadt
ok tedu guenther