Comment 98 for bug 1996188

Revision history for this message
Thomas Goirand (thomas-goirand) wrote : Re: Arbitrary file access through custom VMDK flat descriptor (CVE-2022-47951)

FYI, for Nova, the patch seems to apply cleanly up to Rocky (just did a quilt push / quilt refresh and it looks good...). However, when building the package, I get:

======================================================================
FAIL: subunit.parser
subunit.parser
----------------------------------------------------------------------
_StringException: Binary content:
  Packet data (application/octet-stream)

Parser Error: {{{Short read - got 139 bytes, wanted 4235 bytes}}}

======================================================================
FAIL: nova.tests.unit.virt.test_images.QemuTestCase.test_convert_image_vmdk_allowed_list_checking
nova.tests.unit.virt.test_images.QemuTestCase.test_convert_image_vmdk_allowed_list_checking
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/nova/tests/unit/virt/test_images.py", line 138, in test_convert_image_vmdk_allowed_list_checking
    format='json'))
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 485, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 496, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 547, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/usr/lib/python3/dist-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/usr/lib/python3/dist-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 475, in match
    reraise(*matchee)
  File "/usr/lib/python3/dist-packages/testtools/_compat3x.py", line 16, in reraise
    raise exc_obj.with_traceback(exc_tb)
  File "/usr/lib/python3/dist-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 1049, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "/<<PKGBUILDDIR>>/nova/virt/images.py", line 150, in check_vmdk_image
    types = CONF.compute.vmdk_allowed_types
  File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 3548, in __getattr__
    return self._conf._get(name, self._group)
  File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 3070, in _get
    value, loc = self._do_get(name, group, namespace)
  File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 3088, in _do_get
    info = self._get_opt_info(name, group)
  File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 3264, in _get_opt_info
    raise NoSuchOptError(opt_name, group)
oslo_config.cfg.NoSuchOptError: no such option vmdk_allowed_types in group [compute]

======================================================================
FAIL: nova.tests.unit.virt.test_images.QemuTestCase.test_fetch_checks_vmdk_rules
nova.tests.unit.virt.test_images.QemuTestCase.test_fetch_checks_vmdk_rules
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 1297, in patched
    arg = patching.__enter__()
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 1369, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 1343, in get_original
    "%s does not have the attribute %r" % (target, name)
AttributeError: <module 'nova.privsep.qemu' from '/<<PKGBUILDDIR>>/nova/privsep/qemu.py'> does not have the attribute 'unprivileged_qemu_img_info'

Can someone help me backporting to Rocky?

Cheers,

Thomas