By rebuilding twice with the same "forbidden" image one can circumvent scheduler rebuild restrictions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Matt Riedemann | ||
Newton |
Won't Fix
|
Undecided
|
Unassigned | ||
Ocata |
Fix Committed
|
High
|
Matt Riedemann | ||
Pike |
Fix Committed
|
High
|
Matt Riedemann |
Bug Description
Description
===========
Since CVE-2017-16239, we call to the scheduler when doing a rebuild with a new image. If the scheduler refuses a rebuild because a filter forbids the new image on the instance's host (for example, IsolatedHostsFi
Steps to reproduce
==================
1. Configure IsolatedHostsFi
[filter_
enabled_filters = [...],IsolatedH
isolated_images = 41d3e5ca-
isolated_hosts = ubuntu
restrict_
2. Have two images, one isolated and one not:
$ openstack image list
8d0581a5-
41d3e5ca-
cirros is the isolated one
3. Have only one hypervisor (the isolated one):
$ openstack hypervisor list
ubuntu | QEMU | 192.168.100.194 | up
5. Boot a cirros (isolated) image:
$ openstack server create \
--image 41d3e5ca-
--flavor m1.nano \
cirros-
$ openstack server list
cirros-
6. Rebuild the cirros instance with centos (this should be refused by the scheduler):
$ nova --debug rebuild cirros-
DEBUG (session:722) POST call to compute for
http://
used request id req-c234346a-
8. Observe the instance going to ERROR,
but still showing the new centos image :
$ nova show cirros-
[...]
status | ERROR
image | centos (8d0581a5-
[...]
9. Rebuild again with the same centos image:
$ nova rebuild cirros-
10. The rebuild goes through.
Expected result
===============
At step 10, the rebuild should still be refused.
Actual result
=============
The rebuild is allowed.
Environment
===========
1. Exact version of OpenStack you are running. See the following
Was reported in Red Hat OpenStack 12, affects newton through master.
2. Which hypervisor did you use?
libvirt+kvm
Changed in nova: | |
assignee: | nobody → Matt Riedemann (mriedem) |
status: | New → In Progress |
Changed in nova: | |
importance: | Undecided → High |
This will also be an issue in newton but we're waiting to end of life newton so we won't fix this upstream there.