image-fuzzer: Fuzzing functions for qcow2 images
authorMaria Kustova <maxa@catit.be>
Mon, 11 Aug 2014 10:34:00 +0000 (14:34 +0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 15 Aug 2014 17:03:14 +0000 (18:03 +0100)
commit6d5e9372f6d968cbee1d6708198abd087db07260
tree7d93bf21984c7b37d1a9d9e48f5e1b29d1b638d7
parentad724dd7282520ea13f0626f1c3ef45d65a1b994
image-fuzzer: Fuzzing functions for qcow2 images

The fuzz submodule of the qcow2 image generator contains fuzzing functions for
image fields.
Each fuzzing function contains a list of constraints and a call of a helper
function that randomly selects a fuzzed value satisfied to one of constraints.
For now constraints include only known as invalid or potentially dangerous
values. But after investigation of code coverage by fuzz tests they will be
expanded by heuristic values based on inner checks and flows of a program
under test.

Now fuzzing of a header, header extensions and a backing file name is
supported.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Maria Kustova <maria.k@catit.be>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/image-fuzzer/qcow2/fuzz.py [new file with mode: 0644]