Skip to content

Commit

Permalink
deps: update openssl to 1.0.1j
Browse files Browse the repository at this point in the history
Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: #1
  • Loading branch information
indutny committed Nov 27, 2014
1 parent 7efc64d commit 574407a
Show file tree
Hide file tree
Showing 98 changed files with 2,438 additions and 725 deletions.
43 changes: 19 additions & 24 deletions deps/openssl/asm/x64-win32-masm/aes/aesni-x86_64.asm
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,12 @@ $L$SEH_begin_aesni_ecb_encrypt::
mov r8,QWORD PTR[40+rsp]


lea rsp,QWORD PTR[((-88))+rsp]
movaps XMMWORD PTR[rsp],xmm6
movaps XMMWORD PTR[16+rsp],xmm7
movaps XMMWORD PTR[32+rsp],xmm8
movaps XMMWORD PTR[48+rsp],xmm9
$L$ecb_enc_body::
and rdx,-16
jz $L$ecb_ret

Expand Down Expand Up @@ -752,6 +758,12 @@ $L$ecb_dec_six::
movups XMMWORD PTR[80+rsi],xmm7

$L$ecb_ret::
movaps xmm6,XMMWORD PTR[rsp]
movaps xmm7,XMMWORD PTR[16+rsp]
movaps xmm8,XMMWORD PTR[32+rsp]
movaps xmm9,XMMWORD PTR[48+rsp]
lea rsp,QWORD PTR[88+rsp]
$L$ecb_enc_ret::
mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
mov rsi,QWORD PTR[16+rsp]
DB 0F3h,0C3h ;repret
Expand Down Expand Up @@ -2766,26 +2778,7 @@ ALIGN 64
EXTERN __imp_RtlVirtualUnwind:NEAR

ALIGN 16
ecb_se_handler PROC PRIVATE
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
pushfq
sub rsp,64

mov rax,QWORD PTR[152+r8]

jmp $L$common_seh_tail
ecb_se_handler ENDP


ALIGN 16
ccm64_se_handler PROC PRIVATE
ecb_ccm64_se_handler PROC PRIVATE
push rsi
push rdi
push rbx
Expand Down Expand Up @@ -2823,7 +2816,7 @@ ccm64_se_handler PROC PRIVATE
lea rax,QWORD PTR[88+rax]

jmp $L$common_seh_tail
ccm64_se_handler ENDP
ecb_ccm64_se_handler ENDP


ALIGN 16
Expand Down Expand Up @@ -3026,15 +3019,17 @@ ALIGN 4
ALIGN 8
$L$SEH_info_ecb::
DB 9,0,0,0
DD imagerel ecb_se_handler
DD imagerel ecb_ccm64_se_handler
DD imagerel $L$ecb_enc_body,imagerel $L$ecb_enc_ret

$L$SEH_info_ccm64_enc::
DB 9,0,0,0
DD imagerel ccm64_se_handler
DD imagerel ecb_ccm64_se_handler
DD imagerel $L$ccm64_enc_body,imagerel $L$ccm64_enc_ret

$L$SEH_info_ccm64_dec::
DB 9,0,0,0
DD imagerel ccm64_se_handler
DD imagerel ecb_ccm64_se_handler
DD imagerel $L$ccm64_dec_body,imagerel $L$ccm64_dec_ret

$L$SEH_info_ctr32::
Expand Down
25 changes: 17 additions & 8 deletions deps/openssl/config/opensslconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@
* boundary. See crypto/rc4/rc4_enc.c for further details.
*/
# undef RC4_CHUNK
# if defined(_M_X64) || defined(__x86_64__)
# if (defined(_M_X64) || defined(__x86_64__)) && defined(_WIN32)
# define RC4_CHUNK unsigned long long
# elif (defined(_M_X64) || defined(__x86_64__)) && !defined(_WIN32)
# define RC4_CHUNK unsigned long
# elif defined(__arm__)
# define RC4_CHUNK unsigned long
# else
Expand All @@ -203,12 +205,21 @@
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
* %20 speed up (longs are 8 bytes, int's are 4). */
# undef DES_LONG
# define DES_LONG unsigned int
# if defined(_M_X64) || defined(__x86_64__) || defined(__arm__) || defined(__mips__)
# define DES_LONG unsigned int
# elif defined(_M_IX86) || defined(__i386__)
# define DES_LONG unsigned long
# endif
#endif

#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
# define CONFIG_HEADER_BN_H

# undef BL_LLONG
# if defined(_M_IX86) || defined(__i386__) || defined(__arm__)
# define BL_LLONG
# endif

/* Should we define BN_DIV2W here? */

/* Only one for the following should be defined */
Expand All @@ -220,12 +231,10 @@
# undef THIRTY_TWO_BIT
# undef SIXTEEN_BIT
# undef EIGHT_BIT
# if defined(_M_X64) || defined(__x86_64__)
# if defined(_WIN64) || defined(_LP64)
# define SIXTY_FOUR_BIT_LONG
# else
# define SIXTY_FOUR_BIT
# endif
# if (defined(_M_X64) || defined(__x86_64__)) && defined(_WIN32)
# define SIXTY_FOUR_BIT
# elif (defined(_M_X64) || defined(__x86_64__)) && !defined(_WIN32)
# define SIXTY_FOUR_BIT_LONG
# elif defined(_M_IX86) || defined(__i386__) || defined(__arm__) || defined(__mips__)
# define THIRTY_TWO_BIT
# endif
Expand Down
51 changes: 51 additions & 0 deletions deps/openssl/openssl/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,57 @@
OpenSSL CHANGES
_______________

Changes between 1.0.1i and 1.0.1j [15 Oct 2014]

*) SRTP Memory Leak.

A flaw in the DTLS SRTP extension parsing code allows an attacker, who
sends a carefully crafted handshake message, to cause OpenSSL to fail
to free up to 64k of memory causing a memory leak. This could be
exploited in a Denial Of Service attack. This issue affects OpenSSL
1.0.1 server implementations for both SSL/TLS and DTLS regardless of
whether SRTP is used or configured. Implementations of OpenSSL that
have been compiled with OPENSSL_NO_SRTP defined are not affected.

The fix was developed by the OpenSSL team.
(CVE-2014-3513)
[OpenSSL team]

*) Session Ticket Memory Leak.

When an OpenSSL SSL/TLS/DTLS server receives a session ticket the
integrity of that ticket is first verified. In the event of a session
ticket integrity check failing, OpenSSL will fail to free memory
causing a memory leak. By sending a large number of invalid session
tickets an attacker could exploit this issue in a Denial Of Service
attack.
(CVE-2014-3567)
[Steve Henson]

*) Build option no-ssl3 is incomplete.

When OpenSSL is configured with "no-ssl3" as a build option, servers
could accept and complete a SSL 3.0 handshake, and clients could be
configured to send them.
(CVE-2014-3568)
[Akamai and the OpenSSL team]

*) Add support for TLS_FALLBACK_SCSV.
Client applications doing fallback retries should call
SSL_set_mode(s, SSL_MODE_SEND_FALLBACK_SCSV).
(CVE-2014-3566)
[Adam Langley, Bodo Moeller]

*) Add additional DigestInfo checks.

Reencode DigestInto in DER and check against the original when
verifying RSA signature: this will reject any improperly encoded
DigestInfo structures.

Note: this is a precautionary measure and no attacks are currently known.

[Steve Henson]

Changes between 1.0.1h and 1.0.1i [6 Aug 2014]

*) Fix SRP buffer overrun vulnerability. Invalid parameters passed to the
Expand Down
6 changes: 6 additions & 0 deletions deps/openssl/openssl/Configure
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,9 @@ open(OUT,'>crypto/opensslconf.h.new') || die "unable to create crypto/opensslcon
print OUT "/* opensslconf.h */\n";
print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n";

print OUT "#ifdef __cplusplus\n";
print OUT "extern \"C\" {\n";
print OUT "#endif\n";
print OUT "/* OpenSSL was configured with the following options: */\n";
my $openssl_algorithm_defines_trans = $openssl_algorithm_defines;
$openssl_experimental_defines =~ s/^\s*#\s*define\s+OPENSSL_NO_(.*)/#ifndef OPENSSL_EXPERIMENTAL_$1\n# ifndef OPENSSL_NO_$1\n# define OPENSSL_NO_$1\n# endif\n#endif/mg;
Expand Down Expand Up @@ -1871,6 +1874,9 @@ while (<IN>)
{ print OUT $_; }
}
close(IN);
print OUT "#ifdef __cplusplus\n";
print OUT "}\n";
print OUT "#endif\n";
close(OUT);
rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h";
rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n";
Expand Down
2 changes: 1 addition & 1 deletion deps/openssl/openssl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Makefile for OpenSSL
##

VERSION=1.0.1i
VERSION=1.0.1j
MAJOR=1
MINOR=0.1
SHLIB_VERSION_NUMBER=1.0.0
Expand Down
2 changes: 1 addition & 1 deletion deps/openssl/openssl/Makefile.bak
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Makefile for OpenSSL
##

VERSION=1.0.1i-dev
VERSION=1.0.1j-dev
MAJOR=1
MINOR=0.1
SHLIB_VERSION_NUMBER=1.0.0
Expand Down
7 changes: 7 additions & 0 deletions deps/openssl/openssl/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
This file gives a brief overview of the major changes between each OpenSSL
release. For more details please read the CHANGES file.

Major changes between OpenSSL 1.0.1i and OpenSSL 1.0.1j [15 Oct 2014]

o Fix for CVE-2014-3513
o Fix for CVE-2014-3567
o Mitigation for CVE-2014-3566 (SSL protocol vulnerability)
o Fix for CVE-2014-3568

Major changes between OpenSSL 1.0.1h and OpenSSL 1.0.1i [6 Aug 2014]

o Fix for CVE-2014-3512
Expand Down
2 changes: 1 addition & 1 deletion deps/openssl/openssl/README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

OpenSSL 1.0.1i 6 Aug 2014
OpenSSL 1.0.1j 15 Oct 2014

Copyright (c) 1998-2011 The OpenSSL Project
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
Expand Down
21 changes: 18 additions & 3 deletions deps/openssl/openssl/apps/makeapps.com
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,12 @@ $ CCDEFS = "MONOLITH"
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
$ CCEXTRAFLAGS = ""
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
$ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
$ CCDISABLEWARNINGS = "" !!! "MAYLOSEDATA3" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. ""
$ THEN
$ IF CCDISABLEWARNINGS .NES. "" THEN CCDISABLEWARNINGS = CCDISABLEWARNINGS + ","
$ CCDISABLEWARNINGS = CCDISABLEWARNINGS + USER_CCDISABLEWARNINGS
$ ENDIF
$!
$! Check To See If We Have A ZLIB Option.
$!
Expand Down Expand Up @@ -1064,6 +1067,18 @@ $! Finish up the definition of CC.
$!
$ IF COMPILER .EQS. "DECC"
$ THEN
$! Not all compiler versions support MAYLOSEDATA3.
$ OPT_TEST = "MAYLOSEDATA3"
$ DEFINE /USER_MODE SYS$ERROR NL:
$ DEFINE /USER_MODE SYS$OUTPUT NL:
$ 'CC' /NOCROSS_REFERENCE /NOLIST /NOOBJECT -
/WARNINGS = DISABLE = ('OPT_TEST', EMPTYFILE) NL:
$ IF ($SEVERITY)
$ THEN
$ IF CCDISABLEWARNINGS .NES. "" THEN -
CCDISABLEWARNINGS = CCDISABLEWARNINGS+ ","
$ CCDISABLEWARNINGS = CCDISABLEWARNINGS+ OPT_TEST
$ ENDIF
$ IF CCDISABLEWARNINGS .NES. ""
$ THEN
$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
Expand Down
29 changes: 16 additions & 13 deletions deps/openssl/openssl/apps/s_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,6 @@ typedef unsigned int u_int;
#include <fcntl.h>
#endif

/* Use Windows API with STD_INPUT_HANDLE when checking for input?
Don't look at OPENSSL_SYS_MSDOS for this, since it is always defined if
OPENSSL_SYS_WINDOWS is defined */
#if defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_WINCE) && defined(STD_INPUT_HANDLE)
#define OPENSSL_USE_STD_INPUT_HANDLE
#endif

#undef PROG
#define PROG s_client_main

Expand Down Expand Up @@ -344,6 +337,7 @@ static void sc_usage(void)
BIO_printf(bio_err," -tls1_1 - just use TLSv1.1\n");
BIO_printf(bio_err," -tls1 - just use TLSv1\n");
BIO_printf(bio_err," -dtls1 - just use DTLSv1\n");
BIO_printf(bio_err," -fallback_scsv - send TLS_FALLBACK_SCSV\n");
BIO_printf(bio_err," -mtu - set the link layer MTU\n");
BIO_printf(bio_err," -no_tls1_2/-no_tls1_1/-no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n");
BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n");
Expand Down Expand Up @@ -624,6 +618,7 @@ int MAIN(int argc, char **argv)
char *sess_out = NULL;
struct sockaddr peer;
int peerlen = sizeof(peer);
int fallback_scsv = 0;
int enable_timeouts = 0 ;
long socket_mtu = 0;
#ifndef OPENSSL_NO_JPAKE
Expand Down Expand Up @@ -830,6 +825,10 @@ int MAIN(int argc, char **argv)
meth=DTLSv1_client_method();
socket_type=SOCK_DGRAM;
}
else if (strcmp(*argv,"-fallback_scsv") == 0)
{
fallback_scsv = 1;
}
else if (strcmp(*argv,"-timeout") == 0)
enable_timeouts=1;
else if (strcmp(*argv,"-mtu") == 0)
Expand Down Expand Up @@ -1242,6 +1241,10 @@ int MAIN(int argc, char **argv)
SSL_set_session(con, sess);
SSL_SESSION_free(sess);
}

if (fallback_scsv)
SSL_set_mode(con, SSL_MODE_SEND_FALLBACK_SCSV);

#ifndef OPENSSL_NO_TLSEXT
if (servername != NULL)
{
Expand Down Expand Up @@ -1613,10 +1616,10 @@ SSL_set_tlsext_status_ids(con, ids);
tv.tv_usec = 0;
i=select(width,(void *)&readfds,(void *)&writefds,
NULL,&tv);
#if defined(OPENSSL_USE_STD_INPUT_HANDLE)
if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
#else
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
if(!i && (!_kbhit() || !read_tty) ) continue;
#else
if(!i && (!((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) || !read_tty) ) continue;
#endif
} else i=select(width,(void *)&readfds,(void *)&writefds,
NULL,timeoutp);
Expand Down Expand Up @@ -1821,10 +1824,10 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
}

#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
#if defined(OPENSSL_USE_STD_INPUT_HANDLE)
else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
#else
#if defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
else if (_kbhit())
#else
else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
#endif
#elif defined (OPENSSL_SYS_NETWARE)
else if (_kbhit())
Expand Down
7 changes: 6 additions & 1 deletion deps/openssl/openssl/crypto/LPdir_vms.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* $LP: LPlib/source/LPdir_vms.c,v 1.20 2004/08/26 13:36:05 _cvs_levitte Exp $ */
/*
* Copyright (c) 2004, Richard Levitte <[email protected]>
* All rights reserved.
Expand Down Expand Up @@ -88,6 +87,12 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
size_t filespeclen = strlen(directory);
char *filespec = NULL;

if (filespeclen == 0)
{
errno = ENOENT;
return 0;
}

/* MUST be a VMS directory specification! Let's estimate if it is. */
if (directory[filespeclen-1] != ']'
&& directory[filespeclen-1] != '>'
Expand Down
Loading

0 comments on commit 574407a

Please sign in to comment.