Signed Integer Overflow (72006238)
Hello graphviz team,
As part of our fuzzing efforts at Google, we have identified an issue affecting graphviz (tested with revision * master bd97cff6).
To reproduce, we are attaching a Dockerfile which compiles the project with LLVM, taking advantage of the sanitizers that it offers. More information about how to use the attached Dockerfile can be found here: https://docs.docker.com/engine/reference/builder/
TL;DR instructions: artifacts_72006238.zip
cp Dockerfile.graphviz /path/to/project/Dockerfile
docker build --no-cache /path/to/project
docker run -it image_id_from_docker_build
From another terminal, outside the container:
docker cp /path/to/attached/reproducer running_container_hostname:/fuzzing/reproducer
And, back inside the container:
Alternatively, and depending on the bug, you could use gcc, valgrind or other instrumentation tools to aid in the investigation. The sanitizer error that we encountered is here:
INFO: Seed: 2388882439 /fuzzing/graphviz/parser_fuzzer: Running 1 inputs 1 time(s) each. Running: poc-19b0928da2bc1de39ea63bc68e9766561f7535a677a0f107cd1ab8e21d00fd65 ../../lib/cgraph/scan.l:116:20: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' SUMMARY: AddressSanitizer: undefined-behavior ../../lib/cgraph/scan.l:116:20 in INFO: Seed: 835891209 /fuzzing/graphviz/render_fuzzer: Running 1 inputs 1 time(s) each. Running: poc-19b0928da2bc1de39ea63bc68e9766561f7535a677a0f107cd1ab8e21d00fd65 ../../lib/cgraph/scan.l:116:20: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int' SUMMARY: AddressSanitizer: undefined-behavior ../../lib/cgraph/scan.l:116:20 in
We will gladly work with you so you can successfully confirm and reproduce this issue. Do let us know if you have any feedback surrounding the documentation.
Once you have reproduced the issue, we'd appreciate to learn your expected timeline for an update to be released. With any fix, please attribute the report to "Google Autofuzz project".
We are also pleased to inform you that your project is eligible for inclusion to the OSS-Fuzz project, which can provide additional continuous fuzzing, and encourage you to investigate integration options.
Don't hesitate to let us know if you have any questions!
Google AutoFuzz Team