diff options
Diffstat (limited to 'recipes-connectivity/openssl')
-rw-r--r-- | recipes-connectivity/openssl/openssl/CVE-2017-3737.patch | 49 | ||||
-rw-r--r-- | recipes-connectivity/openssl/openssl_%.bbappend | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl/CVE-2017-3737.patch b/recipes-connectivity/openssl/openssl/CVE-2017-3737.patch new file mode 100644 index 0000000..3a7b5b2 --- /dev/null +++ b/recipes-connectivity/openssl/openssl/CVE-2017-3737.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 898fb884b706aaeb283de4812340bb0bde8476dc Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Caswell <matt@openssl.org> | ||
3 | Date: Wed, 29 Nov 2017 14:04:01 +0000 | ||
4 | Subject: [PATCH] Don't allow read/write after fatal error | ||
5 | |||
6 | OpenSSL 1.0.2 (starting from version 1.0.2b) introduced an "error state" | ||
7 | mechanism. The intent was that if a fatal error occurred during a handshake | ||
8 | then OpenSSL would move into the error state and would immediately fail if | ||
9 | you attempted to continue the handshake. This works as designed for the | ||
10 | explicit handshake functions (SSL_do_handshake(), SSL_accept() and | ||
11 | SSL_connect()), however due to a bug it does not work correctly if | ||
12 | SSL_read() or SSL_write() is called directly. In that scenario, if the | ||
13 | handshake fails then a fatal error will be returned in the initial function | ||
14 | call. If SSL_read()/SSL_write() is subsequently called by the application | ||
15 | for the same SSL object then it will succeed and the data is passed without | ||
16 | being decrypted/encrypted directly from the SSL/TLS record layer. | ||
17 | |||
18 | In order to exploit this issue an attacker would have to trick an | ||
19 | application into behaving incorrectly by issuing an SSL_read()/SSL_write() | ||
20 | after having already received a fatal error. | ||
21 | |||
22 | Thanks to David Benjamin (Google) for reporting this issue and suggesting | ||
23 | this fix. | ||
24 | |||
25 | CVE: CVE-2017-3737 | ||
26 | Upstream-Status: Backport | ||
27 | |||
28 | Reviewed-by: Rich Salz <rsalz@openssl.org> | ||
29 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
30 | --- | ||
31 | ssl/ssl.h | 2 +- | ||
32 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
33 | |||
34 | diff --git a/ssl/ssl.h b/ssl/ssl.h | ||
35 | index 90aeb0c..3cf96a2 100644 | ||
36 | --- a/ssl/ssl.h | ||
37 | +++ b/ssl/ssl.h | ||
38 | @@ -1727,7 +1727,7 @@ extern "C" { | ||
39 | # define SSL_ST_BEFORE 0x4000 | ||
40 | # define SSL_ST_OK 0x03 | ||
41 | # define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT) | ||
42 | -# define SSL_ST_ERR 0x05 | ||
43 | +# define SSL_ST_ERR (0x05|SSL_ST_INIT) | ||
44 | |||
45 | # define SSL_CB_LOOP 0x01 | ||
46 | # define SSL_CB_EXIT 0x02 | ||
47 | -- | ||
48 | 1.9.1 | ||
49 | |||
diff --git a/recipes-connectivity/openssl/openssl_%.bbappend b/recipes-connectivity/openssl/openssl_%.bbappend index a0b936a..7e81042 100644 --- a/recipes-connectivity/openssl/openssl_%.bbappend +++ b/recipes-connectivity/openssl/openssl_%.bbappend | |||
@@ -1,4 +1,5 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
2 | 2 | ||
3 | SRC_URI += "file://CVE-2017-3735.patch \ | 3 | SRC_URI += "file://CVE-2017-3735.patch \ |
4 | file://CVE-2017-3737.patch \ | ||
4 | " | 5 | " |