forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing HCM fuzzer ContinueAndEndStream with end_stream set (envoyprox…
…y#11497) Fixing the HCM fuzzer to avoid cases where its decodeHeaders method returns FilterHeadersStatus::ContinueAndEndStream when called with end_stream=true. This assert was added in envoyproxy#4885, to avoid misuse of the FilterHeadersStatus::ContinueAndEndStream value. Risk Level: Low - tests only Testing: Changed HCM fuzzer test code Fixes oss fuzz issue 21971 Signed-off-by: Adi Suissa-Peleg <adip@google.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
- Loading branch information
1 parent
76a1d0b
commit a20051a
Showing
5 changed files
with
83 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.. _faq_filter_contract: | ||
|
||
Is there a contract my HTTP filter must adhere to? | ||
-------------------------------------------------- | ||
|
||
* Headers encoding/decoding | ||
|
||
* During encoding/decoding of headers if a filter returns ``FilterHeadersStatus::StopIteration``, | ||
the processing can be resumed if ``encodeData()``/``decodeData()`` return | ||
``FilterDataStatus::Continue`` or by explicitly calling | ||
``continueEncoding()``/``continueDecoding()``. | ||
|
||
* During encoding/decoding of headers if a filter returns | ||
``FilterHeadersStatus::StopAllIterationAndBuffer`` or | ||
``FilterHeadersStatus::StopAllIterationAndWatermark``, the processing can be resumed by calling | ||
``continueEncoding()``/``continueDecoding()``. | ||
|
||
* A filter's ``decodeHeaders()`` implementation must not return | ||
``FilterHeadersStatus::ContinueAndEndStream`` when called with ``end_stream`` set to *true*. In this case | ||
``FilterHeadersStatus::Continue`` should be returned. | ||
|
||
* A filter's ``encode100ContinueHeaders()`` must return ``FilterHeadersStatus::Continue`` or | ||
``FilterHeadersStatus::StopIteration``. | ||
|
||
* Data encoding/decoding | ||
|
||
* During encoding/decoding of data if a filter returns | ||
``FilterDataStatus::StopIterationAndBuffer``, ``FilterDataStatus::StopIterationAndWatermark``, | ||
or ``FilterDataStatus::StopIterationNoBuffer``, the processing can be resumed if | ||
``encodeData()``/``decodeData()`` return ``FilterDataStatus::Continue`` or by explicitly | ||
calling ``continueEncoding()``/``continueDecoding()``. | ||
|
||
* Trailers encoding/decoding | ||
|
||
* During encoding/decoding of trailers if a filter returns ``FilterTrailersStatus::StopIteration``, | ||
the processing can be resumed by explicitly calling ``continueEncoding()``/``continueDecoding()``. | ||
|
||
Are there well-known headers that will appear in the given headers map of ``decodeHeaders()``? | ||
---------------------------------------------------------------------------------------------- | ||
|
||
The first filter of the decoding filter chain will have the following headers in the map: | ||
|
||
* ``Host`` | ||
* ``Path`` (this might be omitted for CONNECT requests). | ||
|
||
Although these headers may be omitted by one of the filters on the decoding filter chain, | ||
they should be reinserted before the terminal filter is triggered. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
.../common/http/conn_manager_impl_corpus/clusterfuzz-testcase-continueandendstream-endstream
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters