Open piotrdomagalski opened 1 year ago
Confirmed. Only reproduces in C backend. Not Rust nor FFI.
Thanks for the report.
The bug here is that the C backend implementation of ZstdDecompressionReader.read1()
will infinite loop for inputs conforming to the buffer protocol having 0 length. This appeared to evade test coverage (including fuzzing) because we never sent an empty input into the fuzz tests. I'll change that as part of fixing this.
And adding fuzzing test coverage with empty inputs reveals that other methods also choke. e.g. readinto1()
is also buggy.
Hi there!
We've run into an issue where bad input data caused the library to keep spinning in
decompression_reader.c:370
as seen on the screenshot frompy-spy
stacktrace dump.Here's the code to reproduce this situation: