summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for 1.0.1m releaseOpenSSL_1_0_1mMatt Caswell2015-03-194-6/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* make updateMatt Caswell2015-03-193-1/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix unsigned/signed warningsMatt Caswell2015-03-191-4/+5
| | | | | | | | Fix some unsigned/signed warnings introduced as part of the fix for CVE-2015-0293 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix a failure to NULL a pointer freed on error.Matt Caswell2015-03-192-3/+16
| | | | | | Reported by the LibreSSL project as a follow on to CVE-2015-0209 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update NEWS fileMatt Caswell2015-03-191-1/+7
| | | | | | | Update the NEWS file with the latest entries from CHANGES ready for the release. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update CHANGES for releaseMatt Caswell2015-03-191-0/+72
| | | | | | Update CHANGES fiel with all the latest fixes ready for the release. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove overlapping CHANGES/NEWS entriesMatt Caswell2015-03-192-348/+0
| | | | | | | | Remove entries from CHANGES and NEWS from letter releases that occur *after* the next point release. Without this we get duplicate entries for the same issue appearing multiple times. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix reachable assert in SSLv2 servers.Emilia Kasper2015-03-192-13/+46
| | | | | | | | | | | | | | | | | This assert is reachable for servers that support SSLv2 and export ciphers. Therefore, such servers can be DoSed by sending a specially crafted SSLv2 CLIENT-MASTER-KEY. Also fix s2_srvr.c to error out early if the key lengths are malformed. These lengths are sent unencrypted, so this does not introduce an oracle. CVE-2015-0293 This issue was discovered by Sean Burford (Google) and Emilia Käsper of the OpenSSL development team. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* PKCS#7: avoid NULL pointer dereferences with missing contentEmilia Kasper2015-03-192-14/+76
| | | | | | | | | | | | | | | | | | | In PKCS#7, the ASN.1 content component is optional. This typically applies to inner content (detached signatures), however we must also handle unexpected missing outer content correctly. This patch only addresses functions reachable from parsing, decryption and verification, and functions otherwise associated with reading potentially untrusted data. Correcting all low-level API calls requires further work. CVE-2015-0289 Thanks to Michal Zalewski (Google) for reporting this issue. Reviewed-by: Steve Henson <steve@openssl.org>
* Fix ASN1_TYPE_cmpDr. Stephen Henson2015-03-191-0/+3
| | | | | | | | | | Fix segmentation violation when ASN1_TYPE_cmp is passed a boolean type. This can be triggered during certificate verification so could be a DoS attack against a client or a server enabling client authentication. CVE-2015-0286 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Free up ADB and CHOICE if already initialised.Dr. Stephen Henson2015-03-181-3/+21
| | | | | | | CVE-2015-0287 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
* Dead code removal from appsMatt Caswell2015-03-172-6/+6
| | | | | | | | Some miscellaneous removal of dead code from apps. Also fix an issue with error handling with pkcs7. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 11abf92259e899f4f7da4a3e80781e84b0fb1a64)
* Remove dead code from cryptoMatt Caswell2015-03-172-9/+5
| | | | | | | Some miscellaneous removal of dead code from lib crypto. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit b7573c597c1932ef709b2455ffab47348b5c54e5)
* Fix seg fault in s_timeMatt Caswell2015-03-171-1/+6
| | | | | | | | Passing a negative value for the "-time" option to s_time results in a seg fault. This commit fixes it so that time has to be greater than 0. Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit dfef52f6f277327e118fdd0fe34486852c2789b6)
* Add sanity check to PRFMatt Caswell2015-03-171-0/+5
| | | | | | | | | The function tls1_PRF counts the number of digests in use and partitions security evenly between them. There always needs to be at least one digest in use, otherwise this is an internal error. Add a sanity check for this. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 668f6f08c62177ab5893fc26ebb67053aafdffc8)
* Fix memset call in stack.cMatt Caswell2015-03-171-1/+1
| | | | | | | | | | | The function sk_zero is supposed to zero the elements held within a stack. It uses memset to do this. However it calculates the size of each element as being sizeof(char **) instead of sizeof(char *). This probably doesn't make much practical difference in most cases, but isn't a portable assumption. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 7132ac830fa08d9a936e011d7c541b0c52115b33)
* Move malloc fail checks closer to mallocMatt Caswell2015-03-171-5/+5
| | | | | | | | | Move memory allocation failure checks closer to the site of the malloc in dgst app. Only a problem if the debug flag is set...but still should be fixed. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit be1477adc97e76f4b83ed8075589f529069bd5d1)
* Add malloc failure checksMatt Caswell2015-03-171-0/+13
| | | | | | | Add some missing checks for memory allocation failures in ca app. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit a561bfe944c0beba73551731cb98af70dfee3549)
* Avoid reading an unused byte after the bufferAndy Polyakov2015-03-141-1/+1
| | | | | | | | Other curves don't have this problem. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 9fbbdd73c58c29dc46cc314f7165e45e6d43fd60)
* Fix undefined behaviour in shifts.Emilia Kasper2015-03-132-144/+144
| | | | | | | | | | | | | | | | Td4 and Te4 are arrays of u8. A u8 << int promotes the u8 to an int first then shifts. If the mathematical result of a shift (as modelled by lhs * 2^{rhs}) is not representable in an integer, behaviour is undefined. In other words, you can't shift into the sign bit of a signed integer. Fix this by casting to u32 whenever we're shifting left by 24. (For consistency, cast other shifts, too.) Caught by -fsanitize=shift Submitted by Nick Lewycky (Google) Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit 8b37e5c14f0eddb10c7f91ef91004622d90ef361)
* additional configuration documentationDr. Stephen Henson2015-03-122-7/+102
| | | | | Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit 3d764db7a24e3dca1a3ee57202ce3c818d592141)
* ASN.1 print fix.Dr. Stephen Henson2015-03-121-0/+1
| | | | | | | | When printing out an ASN.1 structure if the type is an item template don't fall thru and attempt to interpret as a primitive type. Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit 5dc1247a7494f50c88ce7492518bbe0ce6f124fa)
* Fix missing return checks in v3_cpols.cMatt Caswell2015-03-121-4/+12
| | | | | | | Fixed assorted missing return value checks in c3_cpols.c Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit c5f2b5336ab72e40ab91e2ca85639f51fa3178c6)
* Fix dsa_pub_encodeMatt Caswell2015-03-121-6/+8
| | | | | | | | | The return value from ASN1_STRING_new() was not being checked which could lead to a NULL deref in the event of a malloc failure. Also fixed a mem leak in the error path. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 0c7ca4033dcf5398334d4b78a7dfb941c8167a40)
* Fix dh_pub_encodeMatt Caswell2015-03-121-5/+7
| | | | | | | | | | | | The return value from ASN1_STRING_new() was not being checked which could lead to a NULL deref in the event of a malloc failure. Also fixed a mem leak in the error path. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 6aa8dab2bbfd5ad3cfc0d07fe5d7243635d5b2a2) Conflicts: crypto/dh/dh_ameth.c
* Fix asn1_item_print_ctxMatt Caswell2015-03-121-0/+2
| | | | | | | | The call to asn1_do_adb can return NULL on error, so we should check the return value before attempting to use it. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 34a7ed0c39aa3ab67eea1e106577525eaf0d7a00)
* ASN1_primitive_new NULL param handlingMatt Caswell2015-03-121-2/+5
| | | | | | | | | | | | | | | ASN1_primitive_new takes an ASN1_ITEM * param |it|. There are a couple of conditional code paths that check whether |it| is NULL or not - but later |it| is deref'd unconditionally. If |it| was ever really NULL then this would seg fault. In practice ASN1_primitive_new is marked as an internal function in the public header file. The only places it is ever used internally always pass a non NULL parameter for |it|. Therefore, change the code to sanity check that |it| is not NULL, and remove the conditional checking. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit 9e488fd6ab2c295941e91a47ab7bcd346b7540c7)
* Fix EVP_DigestInit_ex with NULL digestMatt Caswell2015-03-121-3/+6
| | | | | | | | | Calling EVP_DigestInit_ex which has already had the digest set up for it should be possible. You are supposed to be able to pass NULL for the type. However currently this seg faults. Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit a01087027bd0c5ec053d4eabd972bd942bfcd92f)
* Fix error handling in bn_expMatt Caswell2015-03-121-2/+2
| | | | | | | | In the event of an error |rr| could be NULL. Therefore don't assume you can use |rr| in the error handling code. Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit 8c5a7b33c6269c3bd6bc0df6b4c22e4fba03b485)
* Fix seg fault in ASN1_generate_v3/ASN1_generate_nconfMatt Caswell2015-03-111-0/+4
| | | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit ac5a110621ca48f0bebd5b4d76d081de403da29e)
* Cleanse buffersMatt Caswell2015-03-112-0/+6
| | | | | | | | | | | Cleanse various intermediate buffers used by the PRF (backported version from master). Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 35fafc4dbc0b3a717ad1b208fe2867e8c64867de) Conflicts: ssl/s3_enc.c
* Harmonize return values in dtls1_buffer_recordEmilia Kasper2015-03-101-1/+1
| | | | | | | | | Ensure all malloc failures return -1. Reported by Adam Langley (Google). Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 06c6a2b4a3a6e64303caa256398dd2dc16f9c35a)
* BIO_debug_callback: Fix output on 64-bit machinesRichard Godbee2015-03-101-3/+6
| | | | | | | | | BIO_debug_callback() no longer assumes the hexadecimal representation of a pointer fits in 8 characters. Signed-off-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 460e920d8a274e27aab36346eeda6685a42c3314)
* Fix wrong numbers being passed as string lengthsDmitry-Me2015-03-093-3/+3
| | | | | | Signed-off-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 0b142f022e2c5072295e00ebc11c5b707a726d74)
* update ordinalsDr. Stephen Henson2015-03-091-0/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* fix warningDr. Stephen Henson2015-03-081-3/+3
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit d6ca1cee8b6efac5906ac66443d1ca67fe689ff8)
* Cleanse PKCS#8 private key components.Dr. Stephen Henson2015-03-084-9/+17
| | | | | | | | | | New function ASN1_STRING_clear_free which cleanses an ASN1_STRING structure before freeing it. Call ASN1_STRING_clear_free on PKCS#8 private key components. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit a8ae0891d4bfd18f224777aed1fbb172504421f1)
* Additional CMS documentation.Dr. Stephen Henson2015-03-082-4/+47
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit e3013932df2d899e8600c305342bc14b682dc0d1)
* Remove export ciphers from the DEFAULT cipher listKurt Roeckx2015-03-074-7/+13
| | | | | | | | | | | They are moved to the COMPLEMENTOFDEFAULT instead. This also fixes SSLv2 to be part of COMPLEMENTOFDEFAULT. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit f417997a324037025be61737288e40e171a8218c) Conflicts: ssl/ssl_ciph.c
* Update mkerr.pl for new formatMatt Caswell2015-03-061-66/+66
| | | | | | Make the output from mkerr.pl consistent with the newly reformatted code. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Use constants not numbersKurt Cancemi2015-03-052-4/+4
| | | | | | | | | | This patch uses warning/fatal constants instead of numbers with comments for warning/alerts in d1_pkt.c and s3_pkt.c RT#3725 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit fd865cadcb603918bdcfcf44e487721c657a1117)
* Unchecked malloc fixesMatt Caswell2015-03-0516-10/+118
| | | | | | | | | | | | | | | | | | | Miscellaneous unchecked malloc fixes. Also fixed some mem leaks on error paths as I spotted them along the way. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 918bb8652969fd53f0c390c1cd909265ed502c7e) Conflicts: crypto/bio/bss_dgram.c Conflicts: apps/cms.c apps/s_cb.c apps/s_server.c apps/speed.c crypto/dh/dh_pmeth.c ssl/s3_pkt.c
* Check public key is not NULL.Dr. Stephen Henson2015-03-021-0/+2
| | | | | | | | CVE-2015-0288 PR#3708 Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 28a00bcd8e318da18031b2ac8778c64147cd54f9)
* Fix format script.Dr. Stephen Henson2015-03-023-99/+121
| | | | | | | | | The format script didn't correctly recognise some ASN.1 macros and didn't reformat some files as a result. Fix script and reformat affected files. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 437b14b533fe7f7408e3ebca6d5569f1d3347b1a)
* Fix d2i_SSL_SESSION for DTLS1_BAD_VERMatt Caswell2015-02-272-1/+4
| | | | | | | | | | | | | | | | | | | Some Cisco appliances use a pre-standard version number for DTLS. We support this as DTLS1_BAD_VER within the code. This change fixes d2i_SSL_SESSION for that DTLS version. Based on an original patch by David Woodhouse <dwmw2@infradead.org> RT#3704 Reviewed-by: Tim Hudson <tjh@openssl.org> Conflicts: ssl/ssl_asn1.c Conflicts: ssl/dtls1.h
* Fixed missing return value checks.Matt Caswell2015-02-271-8/+17
| | | | | | | | | Added various missing return value checks in tls1_change_cipher_state. Reviewed-by: Richard Levitte <levitte@openssl.org> Conflicts: ssl/t1_enc.c
* Fix missing return value checks.Matt Caswell2015-02-271-30/+48
| | | | | | | | | | | | | Fixed various missing return value checks in ssl3_send_newsession_ticket. Also a mem leak on error. Reviewed-by: Richard Levitte <levitte@openssl.org> Conflicts: ssl/s3_srvr.c Conflicts: ssl/s3_srvr.c
* Fix warning with no-ecMatt Caswell2015-02-271-2/+8
| | | | | | This fixes another warning when config'd with no-ec Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Fix no-ec warningMatt Caswell2015-02-271-3/+10
| | | | | | | This is a partial back port of commit 5b430cfc to remove a warning when compiling with no-ec. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Fix evp_extra_test.c with no-ecMatt Caswell2015-02-261-0/+6
| | | | | | | | When OpenSSL is configured with no-ec, then the new evp_extra_test fails to pass. This change adds appropriate OPENSSL_NO_EC guards around the code. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit a988036259a4e119f6787b4c585f506226330120)