Skip to content

Commit 7e53cf7

Browse files
committed
rgw: prevent data sync from replicating to buckets not owned by the user
Issue https://tracker.ceph.com/issues/68884 revealed that because user_acl is initialized by default in RGWUserPermHandler::Init with the same identity, calling verify_bucket_permission_no_policy() would mistakenly allow the request since the user ACL matches the identity. Removing the default creation of user_acl would align the behavior with other S3 operations to prevent unauthorized data replication. Fixes: https://tracker.ceph.com/issues/69972 Signed-off-by: Seena Fallah <[email protected]>
1 parent e24bb7e commit 7e53cf7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rgw/driver/rados/rgw_data_sync.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,8 +2694,8 @@ class RGWUserPermHandler {
26942694

26952695
ret = RGWUserPermHandler::policy_from_attrs(
26962696
sync_env->cct, user->get_attrs(), &info->user_acl);
2697-
if (ret == -ENOENT) {
2698-
info->user_acl.create_default(uid, user->get_display_name());
2697+
if (ret < 0 && ret != -ENOENT) {
2698+
return ret;
26992699
}
27002700

27012701
return 0;

0 commit comments

Comments
 (0)