summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpc/rpc-transport/socket/src/socket.c68
-rwxr-xr-xtests/features/ssl-authz.t17
2 files changed, 84 insertions, 1 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index cec0825f7d4..c4b777bca34 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -45,6 +45,72 @@
#define SSL_CA_LIST_OPT "transport.socket.ssl-ca-list"
#define OWN_THREAD_OPT "transport.socket.own-thread"
+/*
+ * This list was derived by taking the cipher list "HIGH:!SSLv2" (the previous
+ * default) and excluding CBC entries to mitigate the "POODLE" attack. It
+ * should be re-evaluated in light of each future vulnerability, as those are
+ * discovered.
+ */
+static char *default_cipher_list =
+ "ECDHE-RSA-AES256-GCM-SHA384:"
+ "ECDHE-ECDSA-AES256-GCM-SHA384:"
+ "ECDHE-RSA-AES256-SHA384:"
+ "ECDHE-ECDSA-AES256-SHA384:"
+ "ECDHE-RSA-AES256-SHA:"
+ "ECDHE-ECDSA-AES256-SHA:"
+ "DHE-DSS-AES256-GCM-SHA384:"
+ "DHE-RSA-AES256-GCM-SHA384:"
+ "DHE-RSA-AES256-SHA256:"
+ "DHE-DSS-AES256-SHA256:"
+ "DHE-RSA-AES256-SHA:"
+ "DHE-DSS-AES256-SHA:"
+ "DHE-RSA-CAMELLIA256-SHA:"
+ "DHE-DSS-CAMELLIA256-SHA:"
+ "AECDH-AES256-SHA:"
+ "ADH-AES256-GCM-SHA384:"
+ "ADH-AES256-SHA256:"
+ "ADH-AES256-SHA:"
+ "ADH-CAMELLIA256-SHA:"
+ "ECDH-RSA-AES256-GCM-SHA384:"
+ "ECDH-ECDSA-AES256-GCM-SHA384:"
+ "ECDH-RSA-AES256-SHA384:"
+ "ECDH-ECDSA-AES256-SHA384:"
+ "ECDH-RSA-AES256-SHA:"
+ "ECDH-ECDSA-AES256-SHA:"
+ "AES256-GCM-SHA384:"
+ "AES256-SHA256:"
+ "AES256-SHA:"
+ "CAMELLIA256-SHA:"
+ "ECDHE-RSA-AES128-GCM-SHA256:"
+ "ECDHE-ECDSA-AES128-GCM-SHA256:"
+ "ECDHE-RSA-AES128-SHA256:"
+ "ECDHE-ECDSA-AES128-SHA256:"
+ "ECDHE-RSA-AES128-SHA:"
+ "ECDHE-ECDSA-AES128-SHA:"
+ "DHE-DSS-AES128-GCM-SHA256:"
+ "DHE-RSA-AES128-GCM-SHA256:"
+ "DHE-RSA-AES128-SHA256:"
+ "DHE-DSS-AES128-SHA256:"
+ "DHE-RSA-AES128-SHA:"
+ "DHE-DSS-AES128-SHA:"
+ "DHE-RSA-CAMELLIA128-SHA:"
+ "DHE-DSS-CAMELLIA128-SHA:"
+ "AECDH-AES128-SHA:"
+ "ADH-AES128-GCM-SHA256:"
+ "ADH-AES128-SHA256:"
+ "ADH-AES128-SHA:"
+ "ADH-CAMELLIA128-SHA:"
+ "ECDH-RSA-AES128-GCM-SHA256:"
+ "ECDH-ECDSA-AES128-GCM-SHA256:"
+ "ECDH-RSA-AES128-SHA256:"
+ "ECDH-ECDSA-AES128-SHA256:"
+ "ECDH-RSA-AES128-SHA:"
+ "ECDH-ECDSA-AES128-SHA:"
+ "AES128-GCM-SHA256:"
+ "AES128-SHA256:"
+ "AES128-SHA:"
+ "CAMELLIA128-SHA"; /* no colon for last entry */
+
/* TBD: do automake substitutions etc. (ick) to set these. */
#if !defined(DEFAULT_ETC_SSL)
# ifdef GF_LINUX_HOST_OS
@@ -3560,7 +3626,7 @@ socket_init (rpc_transport_t *this)
uint32_t backlog = 0;
int session_id = 0;
int32_t cert_depth = 1;
- char *cipher_list = "HIGH:-SSLv2";
+ char *cipher_list = default_cipher_list;
int ret;
if (this->private) {
diff --git a/tests/features/ssl-authz.t b/tests/features/ssl-authz.t
index 72db389f5cf..efaa47c6d40 100755
--- a/tests/features/ssl-authz.t
+++ b/tests/features/ssl-authz.t
@@ -25,6 +25,22 @@ TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
+# Construct a cipher list that excludes CBC because of POODLE.
+# http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-3566
+#
+# Since this is a bit opaque, here's what it does:
+# (1) Get the ciphers matching a normal cipher-list spec
+# (2) Delete any colon-separated entries containing "CBC"
+# (3) Collapse adjacent colons from deleted entries
+# (4) Remove colons at the beginning or end
+function valid_ciphers {
+ openssl ciphers 'HIGH:!SSLv2' | sed \
+ -e '/[^:]*CBC[^:]*/s///g' \
+ -e '/::*/s//:/g' \
+ -e '/^:/s///' \
+ -e '/:$/s///'
+}
+
TEST openssl genrsa -out $SSL_KEY 1024
TEST openssl req -new -x509 -key $SSL_KEY -subj /CN=Anyone -out $SSL_CERT
ln $SSL_CERT $SSL_CA
@@ -32,6 +48,7 @@ ln $SSL_CERT $SSL_CA
TEST $CLI volume create $V0 $H0:$B0/1
TEST $CLI volume set $V0 server.ssl on
TEST $CLI volume set $V0 client.ssl on
+#EST $CLI volume set $V0 ssl.cipher-list $(valid_ciphers)
TEST $CLI volume set $V0 auth.ssl-allow Anyone
TEST $CLI volume start $V0