Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 1 | openldap CVE-2015-3276 |
| 2 | |
| 3 | the patch comes from: |
| 4 | https://bugzilla.redhat.com/show_bug.cgi?id=1238322 |
| 5 | https://bugzilla.redhat.com/attachment.cgi?id=1055640 |
| 6 | |
| 7 | The nss_parse_ciphers function in libraries/libldap/tls_m.c in |
| 8 | OpenLDAP does not properly parse OpenSSL-style multi-keyword mode |
| 9 | cipher strings, which might cause a weaker than intended cipher to |
| 10 | be used and allow remote attackers to have unspecified impact via |
| 11 | unknown vectors. |
| 12 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 13 | Upstream-Status: Pending |
| 14 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 15 | Signed-off-by: Li Wang <li.wang@windriver.com> |
| 16 | --- |
| 17 | libraries/libldap/tls_m.c | 27 ++++++++++++++++----------- |
| 18 | 1 file changed, 16 insertions(+), 11 deletions(-) |
| 19 | |
| 20 | diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c |
| 21 | index 9b101f9..e6f3051 100644 |
| 22 | --- a/libraries/libldap/tls_m.c |
| 23 | +++ b/libraries/libldap/tls_m.c |
| 24 | @@ -621,18 +621,23 @@ nss_parse_ciphers(const char *cipherstr, int cipher_list[ciphernum]) |
| 25 | */ |
| 26 | if (mask || strength || protocol) { |
| 27 | for (i=0; i<ciphernum; i++) { |
| 28 | - if (((ciphers_def[i].attr & mask) || |
| 29 | - (ciphers_def[i].strength & strength) || |
| 30 | - (ciphers_def[i].version & protocol)) && |
| 31 | - (cipher_list[i] != -1)) { |
| 32 | - /* Enable the NULL ciphers only if explicity |
| 33 | - * requested */ |
| 34 | - if (ciphers_def[i].attr & SSL_eNULL) { |
| 35 | - if (mask & SSL_eNULL) |
| 36 | - cipher_list[i] = action; |
| 37 | - } else |
| 38 | + /* if more than one mask is provided |
| 39 | + * then AND logic applies (to match openssl) |
| 40 | + */ |
| 41 | + if ( cipher_list[i] == -1) ) |
| 42 | + continue; |
| 43 | + if ( mask && ! (ciphers_def[i].attr & mask) ) |
| 44 | + continue; |
| 45 | + if ( strength && ! (ciphers_def[i].strength & strength) ) |
| 46 | + continue; |
| 47 | + if ( protocol && ! (ciphers_def[i].version & protocol) ) |
| 48 | + continue; |
| 49 | + /* Enable the NULL ciphers only if explicity requested */ |
| 50 | + if (ciphers_def[i].attr & SSL_eNULL) { |
| 51 | + if (mask & SSL_eNULL) |
| 52 | cipher_list[i] = action; |
| 53 | - } |
| 54 | + } else |
| 55 | + cipher_list[i] = action; |
| 56 | } |
| 57 | } else { |
| 58 | for (i=0; i<ciphernum; i++) { |
| 59 | -- |
| 60 | 1.7.9.5 |
| 61 | |