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: v12.2.11~46 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4337e6a7d9f92c8549ebee20d0dd67a01e49857f;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 c1a0e7b05ea0..5b62a3f7c3d6 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -5705,6 +5705,17 @@ std::vector