• K
    qcow1: Check maximum cluster size · 7159a45b
    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>
    7159a45b
group 1.6 KB