PUT/POST of large server name's can increase nova API log file size massively
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Dan Prince | ||
Diablo |
Fix Released
|
High
|
Unassigned |
Bug Description
Using the following Ruby sample script I can increase the size of the Nova API log file 128M per POST:
require 'rubygems'
require 'openstack/compute'
USERNAME=
API_KEY=
API_URL=
bigboy = "0" * 22222222
conn=OpenStack:
conn.create_
------
Similarly I can do the same thing with a PUT (server name update):
conn=OpenStack:
server=
server.update(:name => bigboy)
---
Each of these requests will increase the Nova API log file size by 128M per request:
[root@nova1 ~]# du -hs /var/log/
128M /var/log/
---
The root cause of the issue is that we rely on the Nova database column size to limit the size of the instance name. We should put in an API check on the instance name size/length before sending it off to the database.
Additionally, as part of this fix I would also like to incorporate a simple request size limiting middleware into our API pipeline so that really large requests are invalid to begin with.
---
This exploit could allow an authenticated user to run the Nova API server out of disk space.
Nova's rate limiting middleware will help guard the number of POST and PUT requests a given user can make. The default POST limit to /servers is 50 per day. The PUT limit is however much higher at 10 per minute. Either of these could provide opportunities to run API servers out of disk space.
CVE References
Changed in nova: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Dan Prince (dan-prince) |
tags: | added: essex-rc-potential |
Changed in nova: | |
milestone: | none → essex-rc2 |
tags: | removed: essex-rc-potential |
Changed in nova: | |
milestone: | essex-rc2 → 2012.1 |
even if the log is not at DEBUG level ?