Limit CaptureRegion sizes in format_inspector for VMDK and VHDX
Bug #2006490 reported by
Abhishek Kekane
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Glance | Status tracked in Zed | |||||
Xena |
New
|
Undecided
|
Unassigned | |||
Yoga |
In Progress
|
Undecided
|
Unassigned | |||
Zed |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
VMDK:
When parsing a VMDK file to calculate its size, the format_inspector
determines the location of the Descriptor section by reading two
uint64 from the headers of the file and uses them to create the
descriptor CaptureRegion.
It would be possible to craft a VMDK file that commands the
format_inspector to create a very big CaptureRegion, thus exhausting
resources on the glance-api process.
VHDX:
It is a bit more involved, but similar: when looking for the
VIRTUAL_DISK_SIZE metadata, the format_inspector was creating an
unbounded CaptureRegion.
To post a comment you must log in.
Fixed in master with, https:/ /review. opendev. org/c/openstack /glance/ +/871831