• K
    qcow1: Check maximum cluster size · 5c859987
    Kevin Wolf 提交于
    Huge values for header.cluster_bits cause unbounded allocations (e.g.
    for s->cluster_cache) and crash qemu this way. Less huge values may
    survive those allocations, but can cause integer overflows later on.
    
    The only cluster sizes that qemu can create are 4k (for standalone
    images) and 512 (for images with backing files), so we can limit it
    to 64k.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Reviewed-by: NBenoit Canet <benoit@irqsave.net>
    (cherry picked from commit 7159a45b)
    
    Conflicts:
    	tests/qemu-iotests/group
    
    *removed context lines for tests not present in v2.0.0
    Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
    5c859987
092.out 580 字节