Bug 1003454 - beaker-proxy does not enforce HTTP request size limits
Summary: beaker-proxy does not enforce HTTP request size limits
Alias: None
Product: Beaker
Classification: Community
Component: lab controller
Version: 0.14
Hardware: Unspecified
OS: Unspecified
unspecified vote
Target Milestone: 0.17.1
Assignee: Dan Callaghan
QA Contact: tools-bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2013-09-02 05:17 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-07-18 08:17:43 UTC

Attachments (Terms of Use)

Description Dan Callaghan 2013-09-02 05:17:25 UTC
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))

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 06:39:18 UTC
On Gerrit: http://gerrit.beaker-project.org/3163

Limits request bodies in beaker-proxy to 10MB.

Comment 5 Dan Callaghan 2014-07-18 08:17:43 UTC
Beaker 0.17.1 has been released.

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