cloud-hypervisor/qcow/src
Dylan Reid a1f408a247 qcow: bounds check the refcount table offset and size
If the header puts the refcount table outside the file size or if it
specifies a table much larger than needed, fail to open the file.

These might not be hard qcow errors, but they are situations that crosvm
will never encounter.

BUG=986061
TEST=fuzzer with new test cases completes in less than 5 seconds.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: If048c96f6255ca81740e20f3f4eb7669467dbb7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1716365
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
(cherry picked from crosvm commit 969a0b49ff0a9afbca18230181542bbe7e06b8f7)
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-08-02 12:58:04 +02:00
..
qcow_raw_file.rs qcow: Add a zero_cluster method to raw file 2019-08-02 12:58:04 +02:00
qcow.rs qcow: bounds check the refcount table offset and size 2019-08-02 12:58:04 +02:00
refcount.rs virtio: Enable qcow support for virtio-block 2019-05-13 22:08:29 +01:00
vec_cache.rs qcow: Make unit tests pass 2019-07-16 17:09:05 +02:00