mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
block/cloop: refuse images with bogus offsets (CVE-2014-0144)
The offsets[] array allows efficient seeking and tells us the maximum compressed data size. If the offsets are bogus the maximum compressed data size will be unrealistic. This could cause g_malloc() to abort and bogus offsets mean the image is broken anyway. Therefore we should refuse such images. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
7b103b36d6
commit
f56b9bc3ae
3 changed files with 52 additions and 5 deletions
|
@ -23,4 +23,12 @@ no file open, try 'help open'
|
|||
== refuse images that require too many offsets ===
|
||||
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: image requires too many offsets, try increasing block size
|
||||
no file open, try 'help open'
|
||||
|
||||
== refuse images with non-monotonically increasing offsets ==
|
||||
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: offsets not monotonically increasing at index 1, image file is corrupt
|
||||
no file open, try 'help open'
|
||||
|
||||
== refuse images with invalid compressed block size ==
|
||||
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: invalid compressed block size at index 1, image file is corrupt
|
||||
no file open, try 'help open'
|
||||
*** done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue