summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2016-09-26 12:18:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2016-09-26 12:49:29 +0200
commitf73e0eb5d77764c00d6ae8db10528522fc8516bc (patch)
tree668da58aac8c8ddaf6880a10a4f1868e518c27a4
parent35f3007f0e0c56bc2f96ab5893686191d099949f (diff)
downloadmeta-el-common-f73e0eb5d77764c00d6ae8db10528522fc8516bc.tar.gz
openssl: Security fix CVE-2016-6306
affects openssl < 1.0.2i Reference: https://www.openssl.org/news/secadv/20160922.txt Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--recipes-connectivity/openssl/openssl/CVE-2016-6306.patch71
-rw-r--r--recipes-connectivity/openssl/openssl_1.0.2h.bbappend1
2 files changed, 72 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl/CVE-2016-6306.patch b/recipes-connectivity/openssl/openssl/CVE-2016-6306.patch
new file mode 100644
index 0000000..9e7d576
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl/CVE-2016-6306.patch
@@ -0,0 +1,71 @@
1From ff553f837172ecb2b5c8eca257ec3c5619a4b299 Mon Sep 17 00:00:00 2001
2From: "Dr. Stephen Henson" <steve@openssl.org>
3Date: Sat, 17 Sep 2016 12:36:58 +0100
4Subject: [PATCH] Fix small OOB reads.
5
6In ssl3_get_client_certificate, ssl3_get_server_certificate and
7ssl3_get_certificate_request check we have enough room
8before reading a length.
9
10Thanks to Shi Lei (Gear Team, Qihoo 360 Inc.) for reporting these bugs.
11
12CVE-2016-6306
13
14Reviewed-by: Richard Levitte <levitte@openssl.org>
15Reviewed-by: Matt Caswell <matt@openssl.org>
16
17Upstream-Status: Backport
18CVE: CVE-2016-6306
19Signed-off-by: Armin Kuster <akuster@mvista.com>
20
21---
22 ssl/s3_clnt.c | 11 +++++++++++
23 ssl/s3_srvr.c | 6 ++++++
24 2 files changed, 17 insertions(+)
25
26Index: openssl-1.0.2h/ssl/s3_clnt.c
27===================================================================
28--- openssl-1.0.2h.orig/ssl/s3_clnt.c
29+++ openssl-1.0.2h/ssl/s3_clnt.c
30@@ -1216,6 +1216,12 @@ int ssl3_get_server_certificate(SSL *s)
31 goto f_err;
32 }
33 for (nc = 0; nc < llen;) {
34+ if (nc + 3 > llen) {
35+ al = SSL_AD_DECODE_ERROR;
36+ SSLerr(SSL_F_SSL3_GET_SERVER_CERTIFICATE,
37+ SSL_R_CERT_LENGTH_MISMATCH);
38+ goto f_err;
39+ }
40 n2l3(p, l);
41 if ((l + nc + 3) > llen) {
42 al = SSL_AD_DECODE_ERROR;
43@@ -2167,6 +2173,11 @@ int ssl3_get_certificate_request(SSL *s)
44 }
45
46 for (nc = 0; nc < llen;) {
47+ if (nc + 2 > llen) {
48+ ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_DECODE_ERROR);
49+ SSLerr(SSL_F_SSL3_GET_CERTIFICATE_REQUEST, SSL_R_CA_DN_TOO_LONG);
50+ goto err;
51+ }
52 n2s(p, l);
53 if ((l + nc + 2) > llen) {
54 if ((s->options & SSL_OP_NETSCAPE_CA_DN_BUG))
55Index: openssl-1.0.2h/ssl/s3_srvr.c
56===================================================================
57--- openssl-1.0.2h.orig/ssl/s3_srvr.c
58+++ openssl-1.0.2h/ssl/s3_srvr.c
59@@ -3213,6 +3213,12 @@ int ssl3_get_client_certificate(SSL *s)
60 goto f_err;
61 }
62 for (nc = 0; nc < llen;) {
63+ if (nc + 3 > llen) {
64+ al = SSL_AD_DECODE_ERROR;
65+ SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,
66+ SSL_R_CERT_LENGTH_MISMATCH);
67+ goto f_err;
68+ }
69 n2l3(p, l);
70 if ((l + nc + 3) > llen) {
71 al = SSL_AD_DECODE_ERROR;
diff --git a/recipes-connectivity/openssl/openssl_1.0.2h.bbappend b/recipes-connectivity/openssl/openssl_1.0.2h.bbappend
index e4a9912..0f635bf 100644
--- a/recipes-connectivity/openssl/openssl_1.0.2h.bbappend
+++ b/recipes-connectivity/openssl/openssl_1.0.2h.bbappend
@@ -10,4 +10,5 @@ SRC_URI += "file://CVE-2016-2178.patch \
10 file://CVE-2016-6302.patch \ 10 file://CVE-2016-6302.patch \
11 file://CVE-2016-6303.patch \ 11 file://CVE-2016-6303.patch \
12 file://CVE-2016-6304.patch \ 12 file://CVE-2016-6304.patch \
13 file://CVE-2016-6306.patch \
13 " 14 "