Repository navigation
http: remove double 100 headers ASSERT from H2 codec. - #4313
Conversation
This ASSERT can be triggered by uncontrolled wire traffic; since we have sane handling of this behavior, this probably isn't the right thing to have in place to detect this condition. I.e. we're not violating any invariant here. Fixes oss-fuzz issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10072. Risk level: Low Testing: Corpus entry added. Signed-off-by: Harvey Tuch <[email protected]>
| // Even if we have :status 100 in the client case in a response, when | ||
| // we received a 1xx to start out with, nghttp2 message checking | ||
| // guarantees proper flow here. | ||
| stream->decodeHeaders(); |
There was a problem hiding this comment.
Agree if this can happen, the assert is no good. When you say nghttp2 guarantees proper flow, does it? I believe it's legal to have 100, 100, 200 and I don't think our code handles that at all - not sure if it'd result in a double decode headers or what. Do we have a regression test for that to make sure it doesn't choke in some weird way?
There was a problem hiding this comment.
I was assuming you had already established this with the previous comment; if not, what was meant here by "nghttp2 message checking guarantees proper flow here"?
There was a problem hiding this comment.
That's Matt's comment not mine :-)
https://github.com/envoyproxy/envoy/pull/562/files
I don't think we have a test case for trying to send 100, 100, 200. Given it's allowed by the spec I am not sure what would happen. Looking at code, think the 200 would be handled as trailers and I have no idea what would happen if there were actually trailers but I was hoping we could fuzz that as well (or just 100, 100, 100 200) to make sure it's nothing bad.
There was a problem hiding this comment.
@alyssawilk finally got back to looking at this.
seems to be the test you're after; it does a double:100 and you end up with a stream reset. I'll merge this based on that, LMK if there is more to it than this from your thinking.
|
Is this ready to merge or is there more work planned @htuch ? |
|
@dnoe I need to investigate further, it's on my TODO list. |
This ASSERT can be triggered by uncontrolled wire traffic; since we have
sane handling of this behavior, this probably isn't the right thing to
have in place to detect this condition. I.e. we're not violating any
invariant here.
Fixes oss-fuzz issue
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10072.
Risk level: Low
Testing: Corpus entry added.
Signed-off-by: Harvey Tuch [email protected]