qemu-e2k/block
Vladimir Sementsov-Ogievskiy a5fff8d4b4 qcow2-refcount: avoid eating RAM
qcow2_inc_refcounts_imrt() (through realloc_refcount_array()) can eat
an unpredictable 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.

Interesting that iotest 138 checks exactly the behavior which we fix
here. So, change the test appropriately.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20190227131433.197063-3-vsementsov@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-05-07 17:14:21 +02:00
..
accounting.c
backup.c block/backup: use buffer-based io 2019-04-30 15:29:00 +02:00
blkdebug.c block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers 2019-03-26 11:37:51 +01:00
blklogwrites.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
blkreplay.c
blkverify.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
block-backend.c block: Add bdrv_get_request_alignment() 2019-04-01 08:46:52 -05:00
bochs.c
cloop.c
commit.c commit: Make base read-only if there is an early failure 2019-04-30 15:29:00 +02:00
copy-on-read.c block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers 2019-03-26 11:37:51 +01:00
create.c
crypto.c block: Make bdrv_{copy_on_read,crypto_luks,replication} static 2019-03-19 15:49:29 +01:00
crypto.h
curl.c block/curl: Implement bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
dirty-bitmap.c bitmaps: Fix typo in function name 2019-03-12 12:05:49 -04:00
dmg-bz2.c
dmg-lzfse.c
dmg.c
dmg.h
file-posix.c block/file-posix: do not fail on unlock bytes 2019-04-02 12:04:44 +02:00
file-win32.c
gluster.c block/gluster: limit the transfer size to 512 MiB 2019-04-02 12:04:44 +02:00
io.c block: Add BDRV_REQ_NO_FALLBACK 2019-03-26 11:37:51 +01:00
iscsi-opts.c
iscsi.c block/iscsi: Restrict Linux-specific code 2019-03-11 16:33:49 +01:00
linux-aio.c
Makefile.objs
mirror.c block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers 2019-03-26 11:37:51 +01:00
nbd-client.c nbd/client: Trace server noncompliance on structured reads 2019-04-01 08:58:04 -05:00
nbd-client.h
nbd.c nbd/client: Lower min_block for block-status, unaligned size 2019-03-30 20:52:19 -05:00
nfs.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
null.c block/null: Generate filename even with latency-ns 2019-02-25 15:11:27 +01:00
nvme.c block/nvme: Fix bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
parallels.c block/parallels: use buffer-based io 2019-04-30 15:29:00 +02:00
parallels.h
qapi.c qemu-img: Saner printing of large file sizes 2019-04-30 15:29:00 +02:00
qcow2-bitmap.c block/qcow2-bitmap: Allow resizes with persistent bitmaps 2019-03-12 14:57:38 -04:00
qcow2-cache.c qcow2: External file I/O 2019-03-08 12:26:46 +01:00
qcow2-cluster.c qcow2: Implement data-file-raw create option 2019-03-08 12:26:46 +01:00
qcow2-refcount.c qcow2-refcount: avoid eating RAM 2019-05-07 17:14:21 +02:00
qcow2-snapshot.c qcow2: Return error for snapshot operation with data file 2019-03-08 12:26:46 +01:00
qcow2.c block/qcow2: use buffer-based io 2019-04-30 15:29:00 +02:00
qcow2.h block/qcow2-bitmap: Allow resizes with persistent bitmaps 2019-03-12 14:57:38 -04:00
qcow.c block/qcow: use buffer-based io 2019-04-30 15:29:00 +02:00
qed-check.c block/qed: add missed coroutine_fn markers 2019-04-30 15:29:00 +02:00
qed-cluster.c
qed-l2-cache.c
qed-table.c block/qed: add missed coroutine_fn markers 2019-04-30 15:29:00 +02:00
qed.c block/qed: add missed coroutine_fn markers 2019-04-30 15:29:00 +02:00
qed.h block/qed: add missed coroutine_fn markers 2019-04-30 15:29:00 +02:00
quorum.c block: Purify .bdrv_refresh_filename() 2019-02-25 15:11:27 +01:00
raw-format.c block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers 2019-03-26 11:37:51 +01:00
rbd.c
replication.c block: Make bdrv_{copy_on_read,crypto_luks,replication} static 2019-03-19 15:49:29 +01:00
sheepdog.c
snapshot.c
ssh.c block/ssh: Do not report read/write/flush errors to the user 2019-04-17 21:21:49 +02:00
stream.c block/stream: use buffer-based io 2019-04-30 15:29:00 +02:00
throttle-groups.c
throttle.c
trace-events block/ssh: Do not report read/write/flush errors to the user 2019-04-17 21:21:49 +02:00
vdi.c
vhdx-endian.c
vhdx-log.c block/vhdx: Use IEC binary prefixes for size constants 2019-04-30 15:29:00 +02:00
vhdx.c block/vhdx: Use IEC binary prefixes for size constants 2019-04-30 15:29:00 +02:00
vhdx.h block/vhdx: Use IEC binary prefixes for size constants 2019-04-30 15:29:00 +02:00
vmdk.c vmdk: Set vmdk parent backing_format to vmdk 2019-04-30 15:29:00 +02:00
vpc.c vpc: unlock Coroutine lock to make IO submit Concurrently 2019-04-30 15:29:00 +02:00
vvfat.c
vxhs.c
win32-aio.c
write-threshold.c