limit memory allocations during multiple object deletion (#6033)
This commit limits the amount of memory allocated by the S3 Multi-Object-Delete-API. The server used to allocate as many bytes as provided by the client using Content-Length. S3 specifies that the S3 Multi-Object-Delete-API can delete at most 1000 objects using a single request. (See: https://docs.aws.amazon.com/AmazonS3/latest/API/multiobjectdeleteapi.html) Since the maximum S3 object name is limited to 1024 bytes the XML body sent by the client can only contain up to 1000 * 1024 bytes (excluding XML format overhead). This commit limits the size of the parsed XML for the S3 Multi-Object-Delete-API to 2 MB. This fixes a DoS vulnerability since (auth.) clients, MitM-adversaries (without TLS) and un-auth. users accessing buckets allowing multi-delete by policy can kill the server. This behavior is similar to the AWS-S3 implementation.master
parent
12a916091e
commit
9f4c120731
Loading…
Reference in new issue