From: Gustavo Zacarias Date: Fri, 3 Jan 2014 10:38:22 +0000 (-0300) Subject: openssl: add fix for CVE-2013-6449 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=27a7ab51e39ed246f36fa8c39e7370545823ccff;p=buildroot.git openssl: add fix for CVE-2013-6449 Signed-off-by: Gustavo Zacarias Signed-off-by: Thomas Petazzoni --- diff --git a/package/openssl/openssl-001-do-not-build-docs.patch b/package/openssl/openssl-001-do-not-build-docs.patch new file mode 100644 index 0000000000..135a9d3b04 --- /dev/null +++ b/package/openssl/openssl-001-do-not-build-docs.patch @@ -0,0 +1,13 @@ +Dont waste time building manpages if we're not going to use em. + +--- openssl/Makefile.org ++++ openssl/Makefile.org +@@ -792,7 +792,7 @@ + dist_pem_h: + (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) + +-install: all install_docs install_sw ++install: all install_sw + + install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ diff --git a/package/openssl/openssl-002-dont-force-large-file.patch b/package/openssl/openssl-002-dont-force-large-file.patch new file mode 100644 index 0000000000..5b04656ff5 --- /dev/null +++ b/package/openssl/openssl-002-dont-force-large-file.patch @@ -0,0 +1,19 @@ +[patch]: bss_file.c: don't force largefile mode +--- + crypto/bio/bss_file.c | 3 --- + 1 file changed, 3 deletions(-) + +Index: openssl-0.9.8g/crypto/bio/bss_file.c +=================================================================== +--- openssl-0.9.8g.orig/crypto/bio/bss_file.c ++++ openssl-0.9.8g/crypto/bio/bss_file.c +@@ -78,9 +78,6 @@ + * sequential access of large files without extra "magic" comprise *BSD, + * Darwin, IRIX... + */ +-#ifndef _FILE_OFFSET_BITS +-#define _FILE_OFFSET_BITS 64 +-#endif + #endif + + #include diff --git a/package/openssl/openssl-003-CVE-2013-6449.patch b/package/openssl/openssl-003-CVE-2013-6449.patch new file mode 100644 index 0000000000..034da7d414 --- /dev/null +++ b/package/openssl/openssl-003-CVE-2013-6449.patch @@ -0,0 +1,34 @@ +https://bugs.gentoo.org/494816 +https://bugzilla.redhat.com/show_bug.cgi?id=1045363 +http://rt.openssl.org/Ticket/Display.html?id=3200&user=guest&pass=guest + +From ca989269a2876bae79393bd54c3e72d49975fc75 Mon Sep 17 00:00:00 2001 +From: "Dr. Stephen Henson" +Date: Thu, 19 Dec 2013 14:37:39 +0000 +Subject: [PATCH] Use version in SSL_METHOD not SSL structure. + +When deciding whether to use TLS 1.2 PRF and record hash algorithms +use the version number in the corresponding SSL_METHOD structure +instead of the SSL structure. The SSL structure version is sometimes +inaccurate. Note: OpenSSL 1.0.2 and later effectively do this already. +(CVE-2013-6449) +--- + ssl/s3_lib.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c +index bf832bb..c4ef273 100644 +--- a/ssl/s3_lib.c ++++ b/ssl/s3_lib.c +@@ -4286,7 +4286,7 @@ need to go to SSL_ST_ACCEPT. + long ssl_get_algorithm2(SSL *s) + { + long alg2 = s->s3->tmp.new_cipher->algorithm2; +- if (TLS1_get_version(s) >= TLS1_2_VERSION && ++ if (s->method->version == TLS1_2_VERSION && + alg2 == (SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF)) + return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256; + return alg2; +-- +1.8.4.3 + diff --git a/package/openssl/openssl-do-not-build-docs.patch b/package/openssl/openssl-do-not-build-docs.patch deleted file mode 100644 index 135a9d3b04..0000000000 --- a/package/openssl/openssl-do-not-build-docs.patch +++ /dev/null @@ -1,13 +0,0 @@ -Dont waste time building manpages if we're not going to use em. - ---- openssl/Makefile.org -+++ openssl/Makefile.org -@@ -792,7 +792,7 @@ - dist_pem_h: - (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) - --install: all install_docs install_sw -+install: all install_sw - - install_sw: - @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ diff --git a/package/openssl/openssl-dont-force-large-file.patch b/package/openssl/openssl-dont-force-large-file.patch deleted file mode 100644 index 5b04656ff5..0000000000 --- a/package/openssl/openssl-dont-force-large-file.patch +++ /dev/null @@ -1,19 +0,0 @@ -[patch]: bss_file.c: don't force largefile mode ---- - crypto/bio/bss_file.c | 3 --- - 1 file changed, 3 deletions(-) - -Index: openssl-0.9.8g/crypto/bio/bss_file.c -=================================================================== ---- openssl-0.9.8g.orig/crypto/bio/bss_file.c -+++ openssl-0.9.8g/crypto/bio/bss_file.c -@@ -78,9 +78,6 @@ - * sequential access of large files without extra "magic" comprise *BSD, - * Darwin, IRIX... - */ --#ifndef _FILE_OFFSET_BITS --#define _FILE_OFFSET_BITS 64 --#endif - #endif - - #include