aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for 0.9.8zi-devOpenSSL_0_9_8-stableMatt Caswell2015-12-035-5/+13
| | | | Reviewed-by: Richard Levitte <[email protected]>
* Prepare for 0.9.8zh releaseOpenSSL_0_9_8zhMatt Caswell2015-12-034-6/+6
| | | | Reviewed-by: Richard Levitte <[email protected]>
* Update CHANGES and NEWSMatt Caswell2015-12-032-2/+12
| | | | | | Update the CHANGES and NEWS files for the new release. Reviewed-by: Rich Salz <[email protected]>
* Fix leak with ASN.1 combine.Dr. Stephen Henson2015-12-021-2/+5
| | | | | | | | | | | | | | | | | When parsing a combined structure pass a flag to the decode routine so on error a pointer to the parent structure is not zeroed as this will leak any additional components in the parent. This can leak memory in any application parsing PKCS#7 or CMS structures. CVE-2015-3195. Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using libFuzzer. PR#4131 Reviewed-by: Richard Levitte <[email protected]>
* _BSD_SOURCE is deprecated, use _DEFAULT_SOURCE insteadRichard Levitte2015-12-021-0/+1
| | | | | | | | | The feature_test_macros(7) manual tells us that _BSD_SOURCE is deprecated since glibc 2.20 and that the compiler will warn about it being used, unless _DEFAULT_SOURCE is defined as well. Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit f9fd35248c9a3b1125d9ab82ffb19d62e86533ac)
* Fix uninitialised p error.Dr. Stephen Henson2015-11-241-1/+1
| | | | | Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 63eb10a07ee29a312e50a227f5b3a290b1ad22b4)
* Limit depth of ASN1 parse printing.Dr. Stephen Henson2015-11-241-0/+10
| | | | | | | | | | Thanks to Guido Vranken <[email protected]> for reporting this issue. Reviewed-by: Tim Hudson <[email protected]> (cherry picked from commit 158e5207a794603f5d64ffa95e0247c7808ab445) Conflicts: crypto/asn1/asn1_par.c
* Typo.Dr. Stephen Henson2015-10-111-1/+1
| | | | | | | | | | PR#4079 Reviewed-by: Tim Hudson <[email protected]> (cherry picked from commit c69ce9351336f5b4a8b33890756b3fd185528210) Conflicts: crypto/evp/e_des3.c
* Don't try and parse boolean type.Dr. Stephen Henson2015-10-061-2/+2
| | | | | Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit e58c4d3cdde7a0a01df2884bfeec31a2b07be22d)
* Change --debug to -d for compat with old releases.Rich Salz2015-09-251-1/+1
| | | | | Reviewed-by: Tim Hudson <[email protected]> (cherry picked from commit 1d4ddb4e1a088f1333c4bb155c52c7f94e572bca)
* OpenSSL 0.9.8 doesn't have support for mingw64Richard Levitte2015-09-231-6/+0
| | | | | | Remove that option from travis Reviewed-by: Andy Polyakov <[email protected]>
* Remove stricts-warnings on 0.9.8 travis.Rich Salz2015-09-221-1/+1
| | | | Reviewed-by: Richard Levitte <[email protected]>
* GH398: Add mingw cross-compile, etc.Rich Salz2015-09-221-0/+50
| | | | | | | | | | For all release branches. It adds travis build support. If you don't have a config file it uses the default (because we enabled travis for the project), which uses ruby/rake/rakefiles, and you get confusing "build still failing" messages. Reviewed-by: Andy Polyakov <[email protected]> (cherry picked from commit db9defdfe306e1adf0af7188b187d535eb0268da)
* Make sure OPENSSL_cleanse checks for NULLMatt Caswell2015-09-171-0/+4
| | | | | | | | | | | | | | | | | | | | | In master we have the function OPENSSL_clear_free(x,y), which immediately returns if x == NULL. In <=1.0.2 this function does not exist so we have to do: OPENSSL_cleanse(x, y); OPENSSL_free(x); However, previously, OPENSSL_cleanse did not check that if x == NULL, so the real equivalent check would have to be: if (x != NULL) OPENSSL_cleanse(x, y); OPENSSL_free(x); It would be easy to get this wrong during cherry-picking to other branches and therefore, for safety, it is best to just ensure OPENSSL_cleanse also checks for NULL. Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 020d8fc83fe1a94232db1ee1166309e2458a8a18)
* Fix building with OPENSSL_NO_TLSEXT.Matt Caswell2015-09-021-2/+2
| | | | | | | | | | | | | | | | | Builds using no-tlsext in 1.0.0 and 0.9.8 are broken. This commit fixes the issue. The same commit is applied to 1.0.1 and 1.0.2 branches for code consistency. However this commit will not fix no-tlsext in those branches which have always been broken for other reasons. The commit is not applied to master at all, because no-tlsext has been completely removed from that branch. Based on a patch by Marc Branchaud <[email protected]> Reviewed-by: Emilia Käsper <[email protected]> (cherry picked from commit 9a931208d7fc8a3596dda005cdbd6439938f01b0) Conflicts: ssl/ssl_sess.c
* Ignore .dir-locals.elRichard Levitte2015-09-011-0/+1
| | | | | | | | Because we recently encourage people to have a .dir-locals.el, it's a good idea to ignore it on a git level. Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit d7c02691a5e6f2716759eacb6f48c39f15ee57c8)
* Remove auto-fill-modeRichard Levitte2015-08-311-2/+0
| | | | | | | Apparently, emacs sees changes to auto-fill-mode as insecure Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 6dc08048d93ff35de882878f190ae49aa698b5d2)
* Add an example .dir-locals.elRichard Levitte2015-08-312-0/+19
| | | | | | | | | | | | | This file, when copied to .dir-locals.el in the OpenSSL source top, will make sure that the CC mode style "OpenSSL-II" will be used for all C files. Additionally, I makes sure that tabs are never used as indentation character, regardless of the emacs mode, and that the fill column is 78. Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 0927f0d822b1e0f55cb7d8bacf9004ad3495514b)
* Add emacs CC mode style for OpenSSLRichard Levitte2015-08-311-0/+60
| | | | | | | This hopefully conforms closely enough to the current code style. Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit d9b3554b2d9724bc2d1621a026ddaf0223e2d191)
* Move FAQ to the web.Rich Salz2015-08-171-1039/+2
| | | | | | | Best hope of keeping current. Reviewed-by: Tim Hudson <[email protected]> (cherry picked from commit 4f46473a86c9e3741203b22d4d401a3763583494)
* Tweak README about rt and bug reporting.Rich Salz2015-07-291-13/+19
| | | | | Reviewed-by: Matt Caswell <[email protected]> (cherry picked from commit 932af1617e277904bcca6e47729a420bba39785b)
* Set numeric IDs for tar as wellRichard Levitte2015-07-101-1/+1
| | | | | Reviewed-by: Matt Caswell <[email protected]> (cherry picked from commit da24e6f8a05ea657684094e04c1a54efa04c2962)
* Stop using tardyRichard Levitte2015-07-101-14/+17
| | | | | | | | | | | | Instead of piping through tardy, and possibly suffering from bugs in certain versions, use --transform, --owner and --group directly with GNU tar (we already expect that tar variant). Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 27f98436b9a84b94fbdd8e32960504634ae44cc0) Conflicts: Makefile.org
* document -2 return valueDr. Stephen Henson2015-07-061-0/+7
| | | | | | | | Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 5727582cf51e98e5e0faa435e7da2c8929533c0d) Conflicts: doc/crypto/X509_NAME_get_index_by_NID.pod
* Prepare for 0.9.8zh-devMatt Caswell2015-06-115-5/+13
| | | | Reviewed-by: Stephen Henson <[email protected]>
* Prepare for 0.9.8zg releaseOpenSSL_0_9_8zgMatt Caswell2015-06-114-6/+6
| | | | Reviewed-by: Stephen Henson <[email protected]>
* Update CHANGES and NEWSMatt Caswell2015-06-112-2/+70
| | | | | | Updates to CHANGES and NEWS to take account of the latest security fixes. Reviewed-by: Rich Salz <[email protected]>
* PKCS#7: Fix NULL dereference with missing EncryptedContent.Emilia Kasper2015-06-111-1/+15
| | | | | | CVE-2015-1790 Reviewed-by: Rich Salz <[email protected]>
* Fix length checks in X509_cmp_time to avoid out-of-bounds reads.Emilia Kasper2015-06-111-10/+47
| | | | | | | | | | Also tighten X509_cmp_time to reject more than three fractional seconds in the time; and to reject trailing garbage after the offset. CVE-2015-1789 Reviewed-by: Viktor Dukhovni <[email protected]> Reviewed-by: Richard Levitte <[email protected]>
* Fix infinite loop in CMSDr. Stephen Henson2015-06-111-1/+1
| | | | | | | | | Fix loop in do_free_upto if cmsbio is NULL: this will happen when attempting to verify and a digest is not recognised. Reported by Johannes Bauer. CVE-2015-1792 Reviewed-by: Matt Caswell <[email protected]>
* More ssl_session_dup fixesMatt Caswell2015-06-111-19/+20
| | | | | | | | | | | | Fix error handling in ssl_session_dup, as well as incorrect setting up of the session ticket. Follow on from CVE-2015-1791. Thanks to LibreSSL project for reporting these issues. Conflicts: ssl/ssl_sess.c Reviewed-by: Tim Hudson <[email protected]>
* EC_POINT_is_on_curve does not return a booleanMatt Caswell2015-06-106-16/+23
| | | | | | | | | | | | | | | | | The function EC_POINT_is_on_curve does not return a boolean value. It returns 1 if the point is on the curve, 0 if it is not, and -1 on error. Many usages within OpenSSL were incorrectly using this function and therefore not correctly handling error conditions. With thanks to the Open Crypto Audit Project for reporting this issue. Reviewed-by: Kurt Roeckx <[email protected]> (cherry picked from commit 68886be7e2cd395a759fcd41d2cede461b68843d) Conflicts: crypto/ec/ec2_oct.c crypto/ec/ecp_oct.c crypto/ec/ectest.c
* Fix Kerberos issue in ssl_session_dupMatt Caswell2015-06-101-1/+1
| | | | | | | | The fix for CVE-2015-1791 introduced an error in ssl_session_dup for Kerberos. Reviewed-by: Tim Hudson <[email protected]> (cherry picked from commit dcad51bc13c9b716d9a66248bcc4038c071ff158)
* return correct NID for undefined objectDr. Stephen Henson2015-06-081-0/+3
| | | | | Reviewed-by: Tim Hudson <[email protected]> (cherry picked from commit 0fb9990480919163cc375a2b6c0df1d8d901a77b)
* Clean Kerberos pre-master secretMatt Caswell2015-06-041-5/+16
| | | | | | | | | Ensure the Kerberos pre-master secret has OPENSSL_cleanse called on it. With thanks to the Open Crypto Audit Project for reporting this issue. Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 4e3dbe37ca39fa68b6949fbde62f3ec0f0584f7e)
* Fix off-by-one error in BN_bn2hexMatt Caswell2015-06-041-1/+6
| | | | | | | | | | | | | | | | | A BIGNUM can have the value of -0. The function BN_bn2hex fails to account for this and can allocate a buffer one byte too short in the event of -0 being used, leading to a one byte buffer overrun. All usage within the OpenSSL library is considered safe. Any security risk is considered negligible. With thanks to Mateusz Kocielski (LogicalTrust), Marek Kroemeke and Filip Palian for discovering and reporting this issue. Reviewed-by: Tim Hudson <[email protected]> (cherry picked from commit c56353071d9849220714d8a556806703771b9269) Conflicts: crypto/bn/bn_print.c
* Add the macro OPENSSL_SYS_WIN64Richard Levitte2015-06-021-1/+7
| | | | | | | | | | | This is for consistency. Additionally, have its presence define OPENSSL_SYS_WINDOWS as well. Reviewed-by: Matt Caswell <[email protected]> (cherry picked from commit 3f131556d6678bc3754f1e6d98a9a5bfc24e368c) Conflicts: e_os2.h
* Fix race condition in NewSessionTicketMatt Caswell2015-06-025-0/+107
| | | | | | | | | | | | | | | | | | | | | | If a NewSessionTicket is received by a multi-threaded client when attempting to reuse a previous ticket then a race condition can occur potentially leading to a double free of the ticket data. CVE-2015-1791 This also fixes RT#3808 where a session ID is changed for a session already in the client session cache. Since the session ID is the key to the cache this breaks the cache access. Parts of this patch were inspired by this Akamai change: https://github.com/akamai/openssl/commit/c0bf69a791239ceec64509f9f19fcafb2461b0d3 Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 27c76b9b8010b536687318739c6f631ce4194688) Conflicts: ssl/ssl.h ssl/ssl_err.c
* Clear state in DTLSv1_listenMatt Caswell2015-06-021-0/+3
| | | | | | | | | | | | | | | | | This is a backport of commit e83ee04bb7de800cdb71d522fa562e99328003a3 from the master branch (and this has also been applied to 1.0.2). In 1.0.2 this was CVE-2015-0207. For other branches there is no known security issue, but this is being backported as a precautionary measure. The DTLSv1_listen function is intended to be stateless and processes the initial ClientHello from many peers. It is common for user code to loop over the call to DTLSv1_listen until a valid ClientHello is received with an associated cookie. A defect in the implementation of DTLSv1_listen means that state is preserved in the SSL object from one invokation to the next. Reviewed-by: Richard Levitte <[email protected]> (cherry picked from commit cce3e4adb78a8d3eeb6e0e4efe332fcc5d75f615)
* check for error when creating PKCS#8 structureDr. Stephen Henson2015-05-281-0/+2
| | | | | Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 2849707fa65d2803e6d1c1603fdd3fd1fdc4c6cc)
* PEM doc fixesDr. Stephen Henson2015-05-281-2/+25
| | | | | Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit f097f81c891bb1f479426d8ac9c9541390334983)
* Fix off-by-one in BN_randMatt Caswell2015-05-234-3/+11
| | | | | | | | | | | If BN_rand is called with |bits| set to 1 and |top| set to 1 then a 1 byte buffer overflow can occur. There are no such instances within the OpenSSL at the moment. Thanks to Mateusz Kocielski (LogicalTrust), Marek Kroemeke, Filip Palian for discovering and reporting this issue. Reviewed-by: Kurt Roeckx <[email protected]>
* Reject negative shifts for BN_rshift and BN_lshiftMatt Caswell2015-05-234-4/+20
| | | | | | | | | | | | | | | | The functions BN_rshift and BN_lshift shift their arguments to the right or left by a specified number of bits. Unpredicatable results (including crashes) can occur if a negative number is supplied for the shift value. Thanks to Mateusz Kocielski (LogicalTrust), Marek Kroemeke and Filip Palian for discovering and reporting this issue. Reviewed-by: Kurt Roeckx <[email protected]> (cherry picked from commit 7cc18d8158b5fc2676393d99b51c30c135502107) Conflicts: crypto/bn/bn.h crypto/bn/bn_err.c
* Add NULL checks from masterRich Salz2015-05-132-0/+4
| | | | | | | | | | | | | The big "don't check for NULL" cleanup requires backporting some of the lowest-level functions to actually do nothing if NULL is given. This will make it easier to backport fixes to release branches, where master assumes those lower-level functions are "safe" This commit addresses those tickets: 3798 3799 3801. Reviewed-by: Matt Caswell <[email protected]> (cherry picked from commit f34b095fab1569d093b639bfcc9a77d6020148ff) (cherry picked from commit 690d040b2e9df9c6ac19e1aab8f0cd79a84a2ee4)
* Fix encoding bug in i2c_ASN1_INTEGERDr. Stephen Henson2015-04-181-2/+4
| | | | | | | | | | | Fix bug where i2c_ASN1_INTEGER mishandles zero if it is marked as negative. Thanks to Huzaifa Sidhpurwala <[email protected]> and Hanno Böck <[email protected]> for reporting this issue. Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit a0eed48d37a4b7beea0c966caf09ad46f4a92a44)
* Code style: space after 'if'Viktor Dukhovni2015-04-164-8/+8
| | | | Reviewed-by: Matt Caswell <[email protected]>
* Fix ssl_get_prev_session overrunMatt Caswell2015-04-141-0/+6
| | | | | | | | | | | | | | | | | | | If OpenSSL is configured with no-tlsext then ssl_get_prev_session can read past the end of the ClientHello message if the session_id length in the ClientHello is invalid. This should not cause any security issues since the underlying buffer is 16k in size. It should never be possible to overrun by that many bytes. This is probably made redundant by the previous commit - but you can never be too careful. With thanks to Qinghao Tang for reporting this issue. Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit 5e0a80c1c9b2b06c2d203ad89778ce1b98e0b5ad) Conflicts: ssl/ssl_sess.c
* Check for ClientHello message overrunsMatt Caswell2015-04-141-1/+41
| | | | | | | | | | | | The ClientHello processing is insufficiently rigorous in its checks to make sure that we don't read past the end of the message. This does not have security implications due to the size of the underlying buffer - but still needs to be fixed. With thanks to Qinghao Tang for reporting this issue. Reviewed-by: Rich Salz <[email protected]> (cherry picked from commit c9642eb1ff79a30e2c7632ef8267cc34cc2b0d79)
* Don't set *pval to NULL in ASN1_item_ex_new.Dr. Stephen Henson2015-04-101-3/+0
| | | | | | | | | | | | | | | | | While *pval is usually a pointer in rare circumstances it can be a long value. One some platforms (e.g. WIN64) where sizeof(long) < sizeof(ASN1_VALUE *) this will write past the field. *pval is initialised correctly in the rest of ASN1_item_ex_new so setting it to NULL is unecessary anyway. Thanks to Julien Kauffmann for reporting this issue. Reviewed-by: Richard Levitte <[email protected]> (cherry picked from commit f617b4969a9261b9d7d381670aefbe2cf766a2cb) Conflicts: crypto/asn1/tasn_new.c
* Have mkerr.pl treat already existing multiline string defs properlyRichard Levitte2015-04-081-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Since source reformat, we ended up with some error reason string definitions that spanned two lines. That in itself is fine, but we sometimes edited them to provide better strings than what could be automatically determined from the reason macro, for example: {ERR_REASON(SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER), "Peer haven't sent GOST certificate, required for selected ciphersuite"}, However, mkerr.pl didn't treat those two-line definitions right, and they ended up being retranslated to whatever the macro name would indicate, for example: {ERR_REASON(SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER), "No gost certificate sent by peer"}, Clearly not what we wanted. This change fixes this problem. Reviewed-by: Matt Caswell <[email protected]> (cherry picked from commit 2cfdfe0918f03f8323c9523a2beb2b363ae86ca7) Conflicts: util/mkerr.pl