ext_proc fuzzer test exposed a race issue which leads to ENVOY_BUG#27639
ext_proc fuzzer test exposed a race issue which leads to ENVOY_BUG#27639KBaichoo merged 7 commits intoenvoyproxy:mainfrom
Conversation
… ext_proc filter when opens a gRPC stream. Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
|
This is the fuzzer crash traceback: ./bazel-bin/test/extensions/filters/http/ext_proc/unit_test_fuzz/ext_proc_unit_test_fuzz test/extensions/filters/http/ext_proc/unit_test_fuzz/ext_proc_corpus/crash-232906f11069ff930e29c13c1a3ae5a2c3202c57 -l trace [2023-05-25 18:54:41.702][154380][trace][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:189] decodeHeaders: end_stream = false GMOCK WARNING: GMOCK WARNING: |
|
This is the test case: cat test/extensions/filters/http/ext_proc/unit_test_fuzz/ext_proc_corpus/crash-232906f11069ff930e29c13c1a3ae5a2c3202c57 |
|
The fuzzer can easily trigger this race since it sends back and handles the spurious response right within onData() when the body request is sent to the ext_proc server. This is after the first openStream() but before the 2nd openStream() / sendTrailers() in onData() function. |
|
The test is failed with the issue addressed by: #27619. So wait for that PR to be merged first. |
|
/wait |
…stream_fuzzer_crash Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
…stream_fuzzer_crash Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
|
/assign @tyxia As codeowner |
Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
tyxia
left a comment
There was a problem hiding this comment.
LGTM! Thanks.
A small nit for future: If possible, It will be great if we include fuzzer crash traceback as attachment. I just feel it is too long to fit in the comment section,
|
/assign @stevenzzzz @mpwarres I think we also want the review from team that is using this filter. Also, cced @yanavlasov and @htuch, please feel free to chime in and comment/review. Thanks! |
KBaichoo
left a comment
There was a problem hiding this comment.
/wait
Generally looks good, thanks
Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
* ext_proc should not open an additional stream if we've completed processing. Signed-off-by: Yanjun Xiang <yanjunxiang@google.com> Signed-off-by: Ryan Eskin <ryan.eskin89@protonmail.com>
ext_proc fuzzer test exposed a race issue which leads to ENVOY_BUG() get triggered when opening a gRPC stream.
The issue is that
The solution is that:
openStream() actually already has the check for processing_complete_ then return error. Just needs to move that check to front.
Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]