glusterfs: fix CVE-2018-1088
PATCH 1/2 glusterfs: fix CVE-2018-1088
Backport patches to fix the following CVE.
CVE: CVE-2018-1088
Signed-off-by Chen Qi <[email protected]>
--- ...age-Prevent-mounting-shared-storage-from-.patch | 70 ++++++ ...auth-add-option-for-strict-authentication.patch | 280 +++++++++++++++++++++ recipes-extended/glusterfs/glusterfs.inc | 2 + 3 files changed, 352 insertions(+) create mode 100644 recipes-extended/glusterfs/files/0001-shared-storage-Prevent-mounting-shared-storage-from-.patch create mode 100644 recipes-extended/glusterfs/files/0002-server-auth-add-option-for-strict-authentication.patch
recipes-extended/glusterfs/files/0001-shared-storage-Prevent-mounting-shared-storage-from-.patch new file +70 -0
@@ -0,0 +1,70 @@ +From d1936056d77abcfda14386235a88ed553341a429 Mon Sep 17 00:00:00 2001 +From: Mohammed Rafi KC <[email protected]> +Date: Mon, 26 Mar 2018 20:27:34 +0530 +Subject: [PATCH 1/3] shared storage: Prevent mounting shared storage from + non-trusted client + +gluster shared storage is a volume used for internal storage for +various features including ganesha, geo-rep, snapshot. + +So this volume should not be exposed to the client, as it is +a special volume for internal use. + +This fix wont't generate non trusted volfile for shared storage volume. + +Change-Id: I8ffe30ae99ec05196d75466210b84db311611a4c +fixes: bz#1568844 +BUG: 1568844 +Signed-off-by: Mohammed Rafi KC <[email protected]> + +Upstream-Status: Backport +Fix CVE-2018-1088 + +Signed-off-by: Chen Qi <[email protected]> + +--- + xlators/mgmt/glusterd/src/glusterd-volgen.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c +index 0a0668e..308c41f 100644 +--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c ++++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c +@@ -5721,6 +5721,7 @@ generate_client_volfiles (glusterd_volinfo_t *volinfo, + int i = 0; + int ret = -1; + char filepath[PATH_MAX] = {0,}; ++ char *volname = NULL; + char *types[] = {NULL, NULL, NULL}; + dict_t *dict = NULL; + xlator_t *this = NULL; +@@ -5728,6 +5729,26 @@ generate_client_volfiles (glusterd_volinfo_t *volinfo, + + this = THIS; + ++ volname = volinfo->is_snap_volume ? ++ volinfo->parent_volname : volinfo->volname; ++ ++ ++ if (volname && !strcmp (volname, GLUSTER_SHARED_STORAGE) && ++ client_type != GF_CLIENT_TRUSTED) { ++ /* ++ * shared storage volume cannot be mounted from non trusted ++ * nodes. So we are not creating volfiles for non-trusted ++ * clients for shared volumes as well as snapshot of shared ++ * volumes. ++ */ ++ ++ ret = 0; ++ gf_msg_debug ("glusterd", 0, "Skipping the non-trusted volfile" ++ "creation for shared storage volume. Volume %s", ++ volname); ++ goto out; ++ } ++ + enumerate_transport_reqs (volinfo->transport_type, types); + dict = dict_new (); + if (!dict) +-- +2.7.4 +
recipes-extended/glusterfs/files/0002-server-auth-add-option-for-strict-authentication.patch new file +280 -0
280 lines not on this page · raw message
recipes-extended/glusterfs/glusterfs.inc +2 -0
@@ -20,6 +20,8 @@ SRC_URI += "file://glusterd.init \ file://libglusterfs-Don-t-link-against-libfl.patch \ file://glusterd-change-port-range.patch \ file://configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch \ + file://0001-shared-storage-Prevent-mounting-shared-storage-from-.patch \ + file://0002-server-auth-add-option-for-strict-authentication.patch \ " LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0"
Signature · 1 line
2.7.4
PATCH 2/2 glusterfs: fix CVE-2018-10841
Backport patch to fix the following CVE.
CVE: CVE-2018-10841
Signed-off-by Chen Qi <[email protected]>
--- ...ccess-trusted-peer-group-via-remote-host-.patch | 43 ++++++++++++++++++++++ recipes-extended/glusterfs/glusterfs.inc | 1 + 2 files changed, 44 insertions(+) create mode 100644 recipes-extended/glusterfs/files/0003-glusterfs-access-trusted-peer-group-via-remote-host-.patch
recipes-extended/glusterfs/files/0003-glusterfs-access-trusted-peer-group-via-remote-host-.patch new file +43 -0
@@ -0,0 +1,43 @@ +From e79741414777c25e5c2a08e6c31619a0fbaad058 Mon Sep 17 00:00:00 2001 +From: Mohit Agrawal <[email protected]> +Date: Wed, 20 Jun 2018 16:13:00 +0530 +Subject: [PATCH 3/3] glusterfs: access trusted peer group via remote-host + command + +Problem: In SSL environment the user is able to access volume + via remote-host command without adding node in a trusted pool + +Solution: Change the list of rpc program in glusterd.c at the + time of initialization while SSL is enabled + +BUG: 1593232 +Change-Id: I987e433b639e68ad17b77b6452df1e22dbe0f199 +fixes: bz#1593232 +Signed-off-by: Mohit Agrawal <[email protected]> + +Upstream-Status: Backport +Fix CVE-2018-10841 +Signed-off-by: Chen Qi <[email protected]> +--- + xlators/mgmt/glusterd/src/glusterd.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c +index ef20689..5e0ed8d 100644 +--- a/xlators/mgmt/glusterd/src/glusterd.c ++++ b/xlators/mgmt/glusterd/src/glusterd.c +@@ -1646,11 +1646,6 @@ init (xlator_t *this) + goto out; + } + /* +- * With strong authentication, we can afford to allow +- * privileged operations over TCP. +- */ +- gd_inet_programs[1] = &gd_svc_cli_prog; +- /* + * This is the only place where we want secure_srvr to reflect + * the management-plane setting. + */ +-- +2.7.4 +
recipes-extended/glusterfs/glusterfs.inc +1 -0
@@ -22,6 +22,7 @@ SRC_URI += "file://glusterd.init \ file://configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch \ file://0001-shared-storage-Prevent-mounting-shared-storage-from-.patch \ file://0002-server-auth-add-option-for-strict-authentication.patch \ + file://0003-glusterfs-access-trusted-peer-group-via-remote-host-.patc \ " LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0"
Signature · 1 line
2.7.4
Re: [m-c-s][PATCH 2/2] glusterfs: fix CVE-2018-10841
Please ignore this patch.
It has a typo 'patc', which should be 'patch', and thus will cause do_fetch failure. I forgot to test it.
I'll send out V2.
Best Regards,
Chen Qi
Quoted 72 lines · Chen Qi
Backport patch to fix the following CVE.
CVE: CVE-2018-10841
Signed-off-by Chen Qi <[email protected]>--- ...ccess-trusted-peer-group-via-remote-host-.patch | 43 ++++++++++++++++++++++ recipes-extended/glusterfs/glusterfs.inc | 1 + 2 files changed, 44 insertions(+)create mode 100644
recipes-extended/glusterfs/files/0003-glusterfs-access-trusted-peer-group-via-remote-host-.patchrecipes-extended/glusterfs/files/0003-glusterfs-access-trusted-peer-group-via-remote-host-.patch new file +43
-0@@ -0,0 +1,43 @@ +From e79741414777c25e5c2a08e6c31619a0fbaad058 Mon Sep 17 00:00:00 2001 +From: Mohit Agrawal <[email protected]> +Date: Wed, 20 Jun 2018 16:13:00 +0530 +Subject: [PATCH 3/3] glusterfs: access trusted peer group via remote-host + command + +Problem: In SSL environment the user is able to access volume + via remote-host command without adding node in a trusted pool + +Solution: Change the list of rpc program in glusterd.c at the + time of initialization while SSL is enabled + +BUG: 1593232 +Change-Id: I987e433b639e68ad17b77b6452df1e22dbe0f199 +fixes: bz#1593232 +Signed-off-by: Mohit Agrawal <[email protected]> + +Upstream-Status: Backport +Fix CVE-2018-10841 +Signed-off-by: Chen Qi <[email protected]> +--- + xlators/mgmt/glusterd/src/glusterd.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c +index ef20689..5e0ed8d 100644 +--- a/xlators/mgmt/glusterd/src/glusterd.c ++++ b/xlators/mgmt/glusterd/src/glusterd.c +@@ -1646,11 +1646,6 @@ init (xlator_t *this) + goto out; + } + /* +- * With strong authentication, we can afford to allow +- * privileged operations over TCP. +- */ +- gd_inet_programs[1] = &gd_svc_cli_prog; +- /* + * This is the only place where we want secure_srvr to reflect + * the management-plane setting. + */ +-- +2.7.4 +recipes-extended/glusterfs/glusterfs.inc +1
-0@@ -22,6 +22,7 @@ SRC_URI += "file://glusterd.init \ file://configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch \ file://0001-shared-storage-Prevent-mounting-shared-storage-from-.patch \ file://0002-server-auth-add-option-for-strict-authentication.patch \ + file://0003-glusterfs-access-trusted-peer-group-via-remote-host-.patc \ " LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0"