forked from jsonn/pkgsrc
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply fix from https://bugzilla.redhat.com/show_bug.cgi?id=1238322
Incorrect multi-keyword mode cipherstring parsing. Fixes CVE-2015-3276. Submitted upstream as ITS#8543, it apparently wasn't already(!) http://www.openldap.org/its/index.cgi/Incoming?id=8543 Bump PKGREVISION for both openldap, openldap-server and openldap-client (to be on the safe side...)
- Loading branch information
he
committed
Dec 13, 2016
1 parent
d39280a
commit 12785f2
Showing
5 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
databases/openldap/patches/patch-libraries_libldap_tls__m.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
$NetBSD: patch-libraries_libldap_tls__m.c,v 1.1 2016/12/13 10:38:06 he Exp $ | ||
|
||
Incorrect multi-keyword mode cipherstring parsing. | ||
Lifted from https://bugzilla.redhat.com/show_bug.cgi?id=1238322 | ||
Fixes CVE-2015-3276. | ||
Submitted upstream as ITS#8543 | ||
http://www.openldap.org/its/index.cgi/Incoming?id=8543 | ||
|
||
--- libraries/libldap/tls_m.c.orig 2016-02-05 23:57:45.000000000 +0000 | ||
+++ libraries/libldap/tls_m.c | ||
@@ -621,17 +621,23 @@ nss_parse_ciphers(const char *cipherstr, | ||
*/ | ||
if (mask || strength || protocol) { | ||
for (i=0; i<ciphernum; i++) { | ||
- if (((ciphers_def[i].attr & mask) || | ||
- (ciphers_def[i].strength & strength) || | ||
- (ciphers_def[i].version & protocol)) && | ||
- (cipher_list[i] != -1)) { | ||
- /* Enable the NULL ciphers only if explicity | ||
- * requested */ | ||
- if (ciphers_def[i].attr & SSL_eNULL) { | ||
- if (mask & SSL_eNULL) | ||
- cipher_list[i] = action; | ||
- } else | ||
+ /* if more than one mask is provided | ||
+ * then AND logic applies (to match openssl) | ||
+ */ | ||
+ if ( cipher_list[i] == -1) ) | ||
+ continue; | ||
+ if ( mask && ! (ciphers_def[i].attr & mask) ) | ||
+ continue; | ||
+ if ( strength && ! (ciphers_def[i].strength & strength) ) | ||
+ continue; | ||
+ if ( protocol && ! (ciphers_def[i].version & protocol) ) | ||
+ continue; | ||
+ /* Enable the NULL ciphers only if explicity requested */ | ||
+ if (ciphers_def[i].attr & SSL_eNULL) { | ||
+ if (mask & SSL_eNULL) | ||
cipher_list[i] = action; | ||
+ } else | ||
+ cipher_list[i] = action; | ||
} | ||
} | ||
} else { |