]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: mitigate bucket list with max-entries excessively high 29179/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Fri, 19 Jul 2019 20:10:59 +0000 (16:10 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Wed, 31 Jul 2019 17:08:20 +0000 (13:08 -0400)
commit300429c9e98a27e17c2a20ade82c6c63ac276c20
treed0fff4679bb68ddc40ad572191bede49bc89babb
parentbef4652845fec95a900adf61e831d5e1603eda8a
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>
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h