MITRECND / bro-http2

Plugin for Zeek/Bro which provides http2 decoder/analyzer
Other
30 stars 22 forks source link

Possible issue in brotli decoding #4

Closed JustinAzoff closed 5 years ago

JustinAzoff commented 5 years ago

I believe that a buffer is used incorrectly in

https://github.com/MITRECND/bro-http2/blob/54b9d68453e4601ecc19bf60f18d21bd4688d186/src/HTTP2_Stream.cc#L230-L248

According to the docs: https://github.com/google/brotli/blob/9cd01c0437e8b6010434d3491a348a5645de624b/c/include/brotli/decode.h#L231-L235

available_out is the "remaining size of output buffer", and total_out is "number of bytes decompressed so far"

available_out is what is passed to DeliverBodyClear and then to SubmitData. I believe this is what is causing extracted files to contain many megabytes of trailing null bytes.

sethhall commented 5 years ago

Any timeline for getting this merged into an http2 release? Thanks!

Mraoul commented 5 years ago

Should be this week

sethhall commented 5 years ago

Great! Thanks!