Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 836521 Details for
Bug 1043106
CVE-2013-6437 openstack-nova: DoS through ephemeral disk backing files
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
havana patch
CVE-2013-6437-havana.patch (text/plain), 5.07 KB, created by
Vincent Danen
on 2013-12-13 23:33:25 UTC
(
hide
)
Description:
havana patch
Filename:
MIME Type:
Creator:
Vincent Danen
Created:
2013-12-13 23:33:25 UTC
Size:
5.07 KB
patch
obsolete
>From 6f864b5e7888fe691926d8d1399106d84b8e609b Mon Sep 17 00:00:00 2001 >From: Ryan Moore <ryan.moore@hp.com> >Date: Fri, 29 Nov 2013 14:21:19 +0000 >Subject: [PATCH] use 'os_type' in ephemeral filename only if mkfs defined > >Currently for undefined os-types it will use the default mkfs >command, but use the meta 'os_type' in the name of the >ephemeral file (e.g. ephemeral_20_abcdef). Which can result >in a lot of files (DoS?) >This change will only use 'os_type' in the ephemeral filename >if there is a specific mkfs command defined, otherwise it will >use 'default' (e.g. ephemeral_20_default) > >Modifed the tests to test for: > os_type='' > os_type=None > os_type='test' - with no mkfs command specified > os_type='test' - with a mkfs command specified > >Closes-Bug: 1253980 > >Backport of Original Change-Id: Ie4c10f99ce690c5e4ef181624bd688c38923855c >to stable/havana > >Change-Id: Ifa2b94e79dabd586d7e904da247d099360229313 >--- > nova/tests/virt/libvirt/test_libvirt.py | 28 ++++++++++++++++++++++++++-- > nova/virt/disk/api.py | 4 ++++ > nova/virt/libvirt/driver.py | 5 ++--- > 3 files changed, 32 insertions(+), 5 deletions(-) > >diff --git a/nova/tests/virt/libvirt/test_libvirt.py b/nova/tests/virt/libvirt/test_libvirt.py >index 6410be3..cf82168 100644 >--- a/nova/tests/virt/libvirt/test_libvirt.py >+++ b/nova/tests/virt/libvirt/test_libvirt.py >@@ -3551,7 +3551,7 @@ class LibvirtConnTestCase(test.TestCase): > self.mox.ReplayAll() > conn._chown_disk_config_for_instance(instance) > >- def test_create_image_plain(self): >+ def _test_create_image_plain(self, os_type='', filename='', mkfs=False): > gotFiles = [] > > def fake_image(self, instance, name, image_type=''): >@@ -3586,11 +3586,15 @@ class LibvirtConnTestCase(test.TestCase): > instance_ref = self.test_instance > instance_ref['image_ref'] = 1 > instance = db.instance_create(self.context, instance_ref) >+ instance['os_type'] = os_type > > conn = libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False) > self.stubs.Set(conn, 'to_xml', fake_none) > self.stubs.Set(conn, '_create_domain_and_network', fake_none) > self.stubs.Set(conn, 'get_info', fake_get_info) >+ if mkfs: >+ self.stubs.Set(nova.virt.disk.api, '_MKFS_COMMAND', >+ {os_type: 'mkfs.ext3 --label %(fs_label)s %(target)s'}) > > image_meta = {'id': instance['image_ref']} > disk_info = blockinfo.get_disk_info(CONF.libvirt_type, >@@ -3605,11 +3609,31 @@ class LibvirtConnTestCase(test.TestCase): > wantFiles = [ > {'filename': '356a192b7913b04c54574d18c28d46e6395428ab', > 'size': 10 * 1024 * 1024 * 1024}, >- {'filename': 'ephemeral_20_default', >+ {'filename': filename, > 'size': 20 * 1024 * 1024 * 1024}, > ] > self.assertEquals(gotFiles, wantFiles) > >+ def test_create_image_plain_os_type_blank(self): >+ self._test_create_image_plain(os_type='', >+ filename='ephemeral_20_default', >+ mkfs=False) >+ >+ def test_create_image_plain_os_type_none(self): >+ self._test_create_image_plain(os_type=None, >+ filename='ephemeral_20_default', >+ mkfs=False) >+ >+ def test_create_image_plain_os_type_set_no_fs(self): >+ self._test_create_image_plain(os_type='test', >+ filename='ephemeral_20_default', >+ mkfs=False) >+ >+ def test_create_image_plain_os_type_set_with_fs(self): >+ self._test_create_image_plain(os_type='test', >+ filename='ephemeral_20_test', >+ mkfs=True) >+ > def test_create_image_with_swap(self): > gotFiles = [] > >diff --git a/nova/virt/disk/api.py b/nova/virt/disk/api.py >index 3ac7adb..a51efa6 100644 >--- a/nova/virt/disk/api.py >+++ b/nova/virt/disk/api.py >@@ -100,6 +100,10 @@ for s in CONF.virt_mkfs: > _DEFAULT_MKFS_COMMAND = mkfs_command > > >+def get_fs_type_for_os_type(os_type): >+ return os_type if _MKFS_COMMAND.get(os_type) else 'default' >+ >+ > def mkfs(os_type, fs_label, target): > mkfs_command = (_MKFS_COMMAND.get(os_type, _DEFAULT_MKFS_COMMAND) or > '') % {'fs_label': fs_label, 'target': target} >diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py >index 5c05307..39e0ce9 100644 >--- a/nova/virt/libvirt/driver.py >+++ b/nova/virt/libvirt/driver.py >@@ -2368,9 +2368,8 @@ class LibvirtDriver(driver.ComputeDriver): > project_id=instance['project_id']) > > # Lookup the filesystem type if required >- os_type_with_default = instance['os_type'] >- if not os_type_with_default: >- os_type_with_default = 'default' >+ os_type_with_default = disk.get_fs_type_for_os_type( >+ instance['os_type']) > > ephemeral_gb = instance['ephemeral_gb'] > if 'disk.local' in disk_mapping: >-- >1.7.9.5 > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1043106
:
836520
| 836521 |
836523