Re: [Qemu-devel] [PATCH 2/7] block/qcow2-refcount: avoid eating RAM

2018-06-19 Thread Eric Blake
On 06/19/2018 01:34 PM, Vladimir Sementsov-Ogievskiy wrote: qcow2_inc_refcounts_imrt() (through realloc_refcount_array()) can eat unpredicted amount of memory on corrupted table entries, which are s/unpredicted/an unpredictable/ referencing regions far beyond the end of file. Prevent this, b

[Qemu-devel] [PATCH 2/7] block/qcow2-refcount: avoid eating RAM

2018-06-19 Thread Vladimir Sementsov-Ogievskiy
qcow2_inc_refcounts_imrt() (through realloc_refcount_array()) can eat unpredicted amount of memory on corrupted table entries, which are referencing regions far beyond the end of file. Prevent this, by skipping such regions from further processing. Signed-off-by: Vladimir Sementsov-Ogievskiy ---