DOS by passing an ephemeral or swap of arbitrary size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Critical
|
Nikola Đipanov |
Bug Description
Due to a previous bug that was never caught and the fact that we can now pass ephemeral and block devices through the API, it is possible to ask nova to create an arbitrarily large ephemeral block device - which nova will happily do (and by default make it raw).
The bug was introduced in commit 0ef7e15e225efcc
Steps to reproduce:
ndipanov@localhost devstack]$ nova flavor-show 1
+------
| Property | Value |
+------
| name | m1.tiny |
| ram | 512 |
| OS-FLV-
| vcpus | 1 |
| extra_specs | {} |
| swap | |
| os-flavor-
| rxtx_factor | 1.0 |
| OS-FLV-
| disk | 1 |
| id | 1 |
+------
[ndipanov@localhost devstack]$ nova --debug boot --image 308f190c-
[ndipanov@localhost devstack]$ nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 6c8a571c-
+------
[ndipanov@localhost devstack]$ cd /opt/stack/
[ndipanov@localhost _base]$ ls -lah
total 130M
drwxrwxr-x. 2 ndipanov libvirtd 4.0K Aug 30 10:59 .
drwxr-xr-x. 5 ndipanov root 4.0K Aug 30 10:59 ..
-rw-rw-r--. 1 ndipanov libvirtd 4.8M Aug 30 10:59 65706cf4-
-rw-rw-r--. 1 qemu qemu 24M Aug 30 10:59 8bf383ae7171db9
-rw-r--r--. 1 qemu qemu 2.0G Aug 30 10:59 ephemeral_2_default
-rw-rw-r--. 1 ndipanov libvirtd 3.6M Aug 30 10:59 fe478037-
We can see that the raw image was happily created by nova. completely disregarding the limitation.
I have attached a proposed patch.
This bug only affects current trunk as of the commit mentioned above.
Changed in nova: | |
assignee: | nobody → Nikola Đipanov (ndipanov) |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | havana-3 → 2013.2 |
not totally sure this needs to be a security bug since there hasn't been a release with this code in. I'm ok with the patch. I'm a little split on whether local disks should be limited via root + ephemeral or just ephemeral.
For example if the flavor type is 100G root and 100G ephemeral it might be nice to allow users to use that 200G total for both the root and ephemeral.