commit 67e5376dd64407f5aaf1ea5f8c896e356064a2c9
Author: Dan Smith <email address hidden>
Date: Wed Apr 17 07:06:13 2024 -0700
Check images with format_inspector for safety
It has been asserted that we should not be calling qemu-img info
on untrusted files. That means we need to know if they have a
backing_file, data_file or other unsafe configuration *before* we use
qemu-img to probe or convert them.
This grafts glance's format_inspector module into nova/images so we
can use it to check the file early for safety. The expectation is that
this will be moved to oslo.utils (or something) later and thus we will
just delete the file from nova and change our import when that happens.
NOTE: This includes whitespace changes from the glance version of
format_inspector.py because of autopep8 demands.
Change-Id: Iaefbe41b4c4bf0cf95d8f621653fdf65062aaa59
Closes-Bug: #2059809
(cherry picked from commit 9cdce715945619fc851ab3f43c97fab4bae4e35a)
(cherry picked from commit f07fa55fd86726eeafcd4c0c687bc49dd4df9f4c)
(cherry picked from commit 0acf5ee7b5dfb6ff0f9a9745f5ad2a0ed2bf65bf)
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /923289 /opendev. org/openstack/ nova/commit/ 67e5376dd64407f 5aaf1ea5f8c896e 356064a2c9
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2023.1
commit 67e5376dd64407f 5aaf1ea5f8c896e 356064a2c9
Author: Dan Smith <email address hidden>
Date: Wed Apr 17 07:06:13 2024 -0700
Check images with format_inspector for safety
It has been asserted that we should not be calling qemu-img info
on untrusted files. That means we need to know if they have a
backing_file, data_file or other unsafe configuration *before* we use
qemu-img to probe or convert them.
This grafts glance's format_inspector module into nova/images so we
can use it to check the file early for safety. The expectation is that
this will be moved to oslo.utils (or something) later and thus we will
just delete the file from nova and change our import when that happens.
NOTE: This includes whitespace changes from the glance version of inspector. py because of autopep8 demands.
format_
Change-Id: Iaefbe41b4c4bf0 cf95d8f621653fd f65062aaa59 c851ab3f43c97fa b4bae4e35a) eafcd4c0c687bc4 9dd4df9f4c) f0f9a9745f5ad2a 0ed2bf65bf)
Closes-Bug: #2059809
(cherry picked from commit 9cdce715945619f
(cherry picked from commit f07fa55fd86726e
(cherry picked from commit 0acf5ee7b5dfb6f