]> review.fuel-infra Code Review - packages/trusty/ceph.git/commitdiff
Fix CVE-2016-7031 38/37438/2 8.0
authorDenis V. Meltsaykin <dmeltsaykin@mirantis.com>
Tue, 12 Dec 2017 15:21:32 +0000 (16:21 +0100)
committerDenis V. Meltsaykin <dmeltsaykin@mirantis.com>
Tue, 12 Dec 2017 15:23:37 +0000 (16:23 +0100)
Change-Id: I5ff432f40a1437b4bd8f3c4337398c5d48893643
Related-Bug: 1710582

debian/changelog
debian/patches/mirantis/CVE-2016-7031.patch [new file with mode: 0644]
debian/patches/series

index 0ccbc4f1751b36d73e1b4f59d4823f0ef31b906a..b32ab51fe0703c3c1a9566201765e108bf22be77 100644 (file)
@@ -1,3 +1,9 @@
+ceph (0.94.5-0u~u14.04+mos3+mos8.0+4) mos8.0; urgency=medium
+
+  * Fix CVE-2016-7031
+
+ -- Denis Meltsaykin <dmeltsaykin@mirantis.com>  Tue, 12 Dec 2017 16:21:00 +0300
+
 ceph (0.94.5-0u~u14.04+mos3+mos8.0+3) mos8.0; urgency=medium
 
   * Fix possible rbd data corruption, http://tracker.ceph.com/issues/17545
diff --git a/debian/patches/mirantis/CVE-2016-7031.patch b/debian/patches/mirantis/CVE-2016-7031.patch
new file mode 100644 (file)
index 0000000..35d24bc
--- /dev/null
@@ -0,0 +1,52 @@
+From 99ba6610a8f437604cadf68cbe9969def893e870 Mon Sep 17 00:00:00 2001
+From: root <rahul.1aggarwal@gmail.com>
+Date: Thu, 24 Sep 2015 00:21:13 +0530
+Subject: [PATCH] 13207: Rados Gateway: Anonymous user is able to read bucket
+ with authenticated read ACL
+
+Signed-off-by: root <rahul.1aggarwal@gmail.com>
+---
+ src/rgw/rgw_acl_s3.cc | 2 +-
+ src/rgw/rgw_op.cc     | 9 ++++++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/rgw/rgw_acl_s3.cc b/src/rgw/rgw_acl_s3.cc
+index f0ed08118dfa..490bf98221aa 100644
+--- a/src/rgw/rgw_acl_s3.cc
++++ b/src/rgw/rgw_acl_s3.cc
+@@ -568,7 +568,7 @@ bool RGWAccessControlPolicy_S3::compare_group_name(string& id, ACLGroupTypeEnum
+ {
+   switch (group) {
+   case ACL_GROUP_ALL_USERS:
+-    return (id.compare(rgw_uri_all_users) == 0);
++    return (id.compare(RGW_USER_ANON_ID) == 0);
+   case ACL_GROUP_AUTHENTICATED_USERS:
+     return (id.compare(rgw_uri_auth_users) == 0);
+   default:
+diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc
+index ff84aba0b064..91f5229c6cbe 100644
+--- a/src/rgw/rgw_op.cc
++++ b/src/rgw/rgw_op.cc
+@@ -17,6 +17,7 @@
+ #include "rgw_rest.h"
+ #include "rgw_acl.h"
+ #include "rgw_acl_s3.h"
++#include "rgw_acl_swift.h"
+ #include "rgw_user.h"
+ #include "rgw_bucket.h"
+ #include "rgw_log.h"
+@@ -356,7 +357,13 @@ static int rgw_build_policies(RGWRados *store, struct req_state *s, bool only_bu
+     }
+   }
+-  s->bucket_acl = new RGWAccessControlPolicy(s->cct);
++  if(s->dialect.compare("s3") == 0) {
++    s->bucket_acl = new RGWAccessControlPolicy_S3(s->cct);
++  } else if(s->dialect.compare("swift")  == 0) {
++    s->bucket_acl = new RGWAccessControlPolicy_SWIFT(s->cct);
++  } else {
++    s->bucket_acl = new RGWAccessControlPolicy(s->cct);
++  }
+   if (s->copy_source) { /* check if copy source is within the current domain */
+     const char *src = s->copy_source;
index c3ba227a599732793417e5e30a3e31cec0fdfdaa..09657505947aa1f84ecd2105281a952fae6a65a9 100644 (file)
@@ -22,3 +22,5 @@ vivid-does-systemd.patch
 ## Mirantis
 PG-activate-handle-unexpected-cached_removed_snaps-m.patch
 ObjectCacher-fix-bh_read_finish-offset-logic.patch
+
+mirantis/CVE-2016-7031.patch