Red Hat Bugzilla – Bug 1003454
beaker-proxy does not enforce HTTP request size limits
Last modified: 2014-07-18 04:17:43 EDT
Description of problem:
If an XML-RPC caller (harness implementation or some other entity) makes a call with very large parameters, beaker-proxy will still receive the entire HTTP request body and attempt to parse the XML and unmarshal the XML-RPC request. This may succeed eventually but will use large amounts of memory (several times the size of the original request).
beaker-proxy should enforce a sane size limit on incoming request bodies to prevent this problem. 50MB should be enough. Log file uploads are supposed to be chunked so that shouldn't be a problem.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Send a very large XML-RPC call to beaker-proxy, for example:
>>> import xmlrpclib
>>> s = xmlrpclib.ServerProxy('http://schlenk:8000/RPC2')
>>> s.task_upload_file('123', 'debug', '.task_beah_raw', 4096, '', 1024, ['LCB7fSwgbnVsbCwgeyJ0YXNrX2lkIjogIjNkNjYwYjk5LWRjMjAtNDE5ZC05MDA2LTUyNDIxYTBl'] * (1024*1024*10))
Watch beaker-proxy choke and die.
beaker-proxy refuses the request (including, refusing to read the entire body) with status 413.
On Gerrit: http://gerrit.beaker-project.org/3163
Limits request bodies in beaker-proxy to 10MB.
Beaker 0.17.1 has been released.