]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: mitigate bucket list with max-entries excessively high
authorJ. Eric Ivancich <ivancich@redhat.com>
Fri, 19 Jul 2019 20:10:59 +0000 (16:10 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Tue, 20 Aug 2019 18:14:21 +0000 (14:14 -0400)
commitc95758b97e024dfaaa0ba9e2dda36f423505ca1b
tree7c2cd861b6ef3ea5d22393c2916780560a7a4b2b
parent4b7bd008dc2b9ea7b2e8ccab7abd22f1b90d2cd2
rgw: mitigate bucket list with max-entries excessively high

When listing a bucket with radosgw-admin, the user can specify the
maximum number of entries. That number can be unreasonably large, and
can affect the performance and memory availability. For example:

    radosgw-admin bucket list --bucket mybucket1 --max-entries=10000000

This has the potential for creating large data structures at multiple
levels in the the call stack of the radosgw(-admin) process,
potentially causing the process to run out of memory. This change
limits the maximum number of entries requested in all but the high
level code to help mitigate this issue.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 300429c9e98a27e17c2a20ade82c6c63ac276c20)
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h