OSSA-2024-002: Incomplete file access fix and regression for QCOW2 backing files and VMDK flat descriptors

Date:

July 23, 2024

CVE:

CVE-2024-40767

Affects

  • Nova: <27.4.1, >=28.0.0 <28.2.1, >=29.0.0 <29.1.1

Description

Arnaud Morin (OVH) reported a vulnerability in Nova. By supplying a raw format image which is actually a specially crafted QCOW2 image with a backing file path or VMDK flat image with a descriptor file path, an authenticated user may convince systems to return a copy of the referenced file’s contents from the server resulting in unauthorized access to potentially sensitive data. All Nova deployments are affected.

Patches

Credits

  • Arnaud Morin from OVH (CVE-2024-40767)

References

Notes

  • The patches linked above should apply cleanly to the public state of their respective branches at time of disclosure, and depend on some commits which merged after the OSSA-2024-001 fixes as well as the final states of the Nova changes linked from that advisory (those did see some minor adjustments before they merged).

  • The QCOW2 issue is due to an incomplete fix in OSSA-2024-001 affecting systems where the use_cow_images configuration option is disabled, while the VMDK issue is a regression of the earlier OSSA-2023-002 vulnerability reintroduced by the new implementation in OSSA-2024-001. Both problems were identified in the final hours before OSSA-2024-001 publication but, due to time constraints, were redacted from that bug and moved to a separate report.

  • Neither the methods introduced in these patches nor the fixes for OSSA-2024-001 are capable of blocking malicious images which are already resident in Nova’s cache. At this time we do not have useful operator guidance for identifying and removing such existing images from the cache but strongly caution, if you do attempt to use the qemu-img tool to find them, to make sure you’re using a version of it patched for QEMU CVE-2024-4467.