-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fail to decode some gzip messages #635
Comments
The Kafka protocol requires the contents of a compressed message to be another message-set. Please see the spec for more details. |
ah, so the fuzz is wrong then. Thank you. I'm somewhat familiar with the spec as of a few years ago (I was a client implementor back then), but haven't kept completely up to date with it. As a note, with the compression codec fixed to thanks. |
A few other misc notes:
|
Hi,
I've been fuzzing Sarama's message encoding/decoding with
go-fuzz
. I think this has been done in the past, but there still appear to be some issues left. I haven't tried any other parts of the protocol exceptmessage.go
.The fuzzer for now looks like this:
The only crashes I've found so far are with GZIP encoding, in which sarama errors with
kafka: error decoding packet: unexpected messageFormat
. Here's a sample panic message (split up with some newlines for readability).Breaking the message up further, it looks like there's some kind of bug with sarama's parsing code:
I don't fully understand what's going on here, so I'm working on narrowing it down, but I felt like it'd be worth opening an issue in the meantime in case anybody runs into this in production. Can you see any issues with the fuzzer? I copied and pasted liberally from
message_test.go
, applying the obvious "serialization should roundtrip" property.The text was updated successfully, but these errors were encountered: