Closed OctavioGalland closed 7 months ago
Thank you for these and the other fuzz testing issues. It raises an interesting point about the robustness of our own fuzzing too.
I thought it already did read-write testing, but while the input format can be fuzzed to any suitable data format, the output was always SAM so the cram writer has not been fuzzed. That's an oversight and something we can fix in the fuzz testing harness.
I've made a single branch for all the CRAM related issues. I have a few memory leaks to tidy up still but hope to have a PR tomorrow.
Summary
Segfault in
cram_generate_reference
during parsing of a crafted SAM/FASTA file pair.Environment
Built using LLVM 14 with ASAN on Ubuntu 22.04
How to reproduce
Build with ASAN on latest commit like so:
Within the samtools folder, get poc file and reproduce with:
Which on my setup outputs: