Bug 1003454 - beaker-proxy does not enforce HTTP request size limits
beaker-proxy does not enforce HTTP request size limits
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: lab controller (Show other bugs)
0.14
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.17.1
: ---
Assigned To: Dan Callaghan
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-02 01:17 EDT by Dan Callaghan
Modified: 2014-07-18 04:17 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-18 04:17:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Callaghan 2013-09-02 01:17:25 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):
0.14

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))

Actual results:
Watch beaker-proxy choke and die.

Expected results:
beaker-proxy refuses the request (including, refusing to read the entire body) with status 413.
Comment 2 Dan Callaghan 2014-06-23 02:39:18 EDT
On Gerrit: http://gerrit.beaker-project.org/3163

Limits request bodies in beaker-proxy to 10MB.
Comment 5 Dan Callaghan 2014-07-18 04:17:43 EDT
Beaker 0.17.1 has been released.

Note You need to log in before you can comment on or make changes to this bug.