router: fix null-terminator issue in path replacement.#5867
router: fix null-terminator issue in path replacement.#5867htuch merged 1 commit intoenvoyproxy:masterfrom
Conversation
Fixes oss-fuzz issue https://oss-fuzz.com/testcase-detail/5137346677178368. Risk level: Low Testing: Corpus entry added. Signed-off-by: Harvey Tuch <htuch@google.com>
|
@mattklein123 not sure if this situation can happen in reality. I.e. we have a Path that is "\0001\000". Will the HTTP parsers reject or should we scrub? |
I looked at the spec and the parser implementations and no, this is not a valid header value that would pass parsing. I have 2 questions:
|
|
|
For 1 I'm probably being dense, but isn't the string null terminated? |
|
The |
|
Ah I see. OK thanks. Sure, we can make the fuzzer smarter in a follow up if we need to. |
As discovered back in envoyproxy#5867, we have some situations where we expect the codecs to reject embedded NULLs in header key/values. This PR improves codec_impl_fuzz_test by having it ignore such invalid values and also adds a bunch of ASSERTs to HeaderMapImpl to document/guard against any potential NULL creep, since its correctness is predicated on this. Fixes oss-fuzz issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13447. Risk level: Low Testing: Corpus entry added. Signed-off-by: Harvey Tuch <htuch@google.com>
As discovered back in #5867, we have some situations where we expect the codecs to reject embedded NULLs in header key/values. This PR improves codec_impl_fuzz_test by having it ignore such invalid values and also adds a bunch of ASSERTs to HeaderMapImpl to document/guard against any potential NULL creep, since its correctness is predicated on this. Fixes oss-fuzz issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13447. Risk level: Low Testing: Corpus entry added. Signed-off-by: Harvey Tuch <htuch@google.com>
Fixes oss-fuzz issue https://oss-fuzz.com/testcase-detail/5137346677178368. Risk level: Low Testing: Corpus entry added. Signed-off-by: Harvey Tuch <htuch@google.com> Signed-off-by: Fred Douglas <fredlas@google.com>
…oyproxy#6170) As discovered back in envoyproxy#5867, we have some situations where we expect the codecs to reject embedded NULLs in header key/values. This PR improves codec_impl_fuzz_test by having it ignore such invalid values and also adds a bunch of ASSERTs to HeaderMapImpl to document/guard against any potential NULL creep, since its correctness is predicated on this. Fixes oss-fuzz issue https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13447. Risk level: Low Testing: Corpus entry added. Signed-off-by: Harvey Tuch <htuch@google.com> Signed-off-by: Fred Douglas <fredlas@google.com>
Fixes oss-fuzz issue
https://oss-fuzz.com/testcase-detail/5137346677178368.
Risk level: Low
Testing: Corpus entry added.
Signed-off-by: Harvey Tuch htuch@google.com