From: Robin H. Johnson Date: Fri, 21 Sep 2018 21:49:34 +0000 (-0700) Subject: rgw: enforce bounds on max-keys/max-uploads/max-parts X-Git-Tag: v13.2.4~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6be81e300a5c4e839b68b8bd6579fcd6c235df97;p=ceph.git rgw: enforce bounds on max-keys/max-uploads/max-parts RGW S3 listing operations provided a way for authenticated users to cause a denial of service against OMAPs holding bucket indices. Bound the min & max values that a user could pass into the max-X parameters, to keep the system safe. The default of 1000 is chosen to match AWS S3 behavior. Affected operations: - ListBucket, via max-keys - ListBucketVersions, via max-keys - ListBucketMultiPartUploads, via max-uploads - ListMultipartUploadParts, via max-parts The Swift bucket listing codepath already enforced a limit, so is unaffected by this issue. Prior to this commit, the effective limit is the lower of osd_max_omap_entries_per_request or osd_max_omap_bytes_per_request. Backport: luminous, mimic Fixes: http://tracker.ceph.com/issues/35994 Signed-off-by: Robin H. Johnson (cherry picked from commit d79f68a1e31f4bc917eec1b6bbc8e8446377dc6b) Conflicts: src/common/options.cc: Conflicts due to options from master --- diff --git a/src/common/options.cc b/src/common/options.cc index b2246579eb8c..a543256d8ad3 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -6233,6 +6233,17 @@ std::vector