It was found that a modified or corrupted image file can cause a DoS
on the host when getting image info with qemu-img.
This uses the newer 'prlimit' parameter for oslo.concurrency execute
to set an address space limit of 1GB and CPU time limit of 2 seconds
when running the qemu-img info command.
Change-Id: If5b7129b266ef065642bc7898ce9dcf93722a053
Closes-bug: #1449062
(cherry picked from commit 8547444775e406a50d9d26a0003e9ba6554b0d70)
Reviewed: https:/ /review. openstack. org/382573 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=455b318ced7 17fb38dfe400148 17d78fbc47dea5
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit 455b318ced717fb 38dfe40014817d7 8fbc47dea5
Author: Sean McGinnis <email address hidden>
Date: Thu Sep 22 15:31:37 2016 -0500
Limit memory & CPU when running qemu-img info
It was found that a modified or corrupted image file can cause a DoS
on the host when getting image info with qemu-img.
This uses the newer 'prlimit' parameter for oslo.concurrency execute
to set an address space limit of 1GB and CPU time limit of 2 seconds
when running the qemu-img info command.
Change-Id: If5b7129b266ef0 65642bc7898ce9d cf93722a053 50d9d26a0003e9b a6554b0d70)
Closes-bug: #1449062
(cherry picked from commit 8547444775e406a