build: Fix msan use-of-unitialized-value in router#8456
Merged
lizan merged 1 commit intoenvoyproxy:masterfrom Oct 2, 2019
Merged
build: Fix msan use-of-unitialized-value in router#8456lizan merged 1 commit intoenvoyproxy:masterfrom
lizan merged 1 commit intoenvoyproxy:masterfrom
Conversation
Contributor
Author
|
If anyone has a suggestion on how to test this effectively with our build system, please let me know! I can make a reproducer that runs through the code path in both the fuzzers and in |
Member
lizan
approved these changes
Oct 2, 2019
danzh2010
pushed a commit
to danzh2010/envoy
that referenced
this pull request
Oct 4, 2019
Sending an HTTP/1.1 request with an empty host to an Envoy with redirect configured causes a use-of-unitialized-value when processing the request host. This was caught running msan in google. Also fixes unneeded `const absl::string_view&` parameters Risk level: Low Signed-off-by: Asra Ali <asraa@google.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Asra Ali asraa@google.com
Sending an HTTP/1.1 request with an empty host to an Envoy with redirect configured causes a use-of-unitialized-value when processing the request host.
This was caught running msan in google.
Also fixes unneeded
const absl::string_view¶metersRisk level: Low
05888==WARNING: MemorySanitizer: use-of-uninitialized-value
| #0 0x5622c8c8062a in Envoy::Router::RouteEntryImplBase::processRequestHost(Envoy::Http::HeaderMap const&, absl::string_view const&, absl::string_view const&) const third_party/envoy/src/source/common/router/config_impl.cc:590:7
| #1 0x5622c8c80cb2 in Envoy::Router::RouteEntryImplBase::newPath(Envoy::Http::HeaderMap const&) const third_party/envoy/src/source/common/router/config_impl.cc:646:18
| #2 0x5622c8c81b07 in non-virtual thunk to Envoy::Router::RouteEntryImplBase::newPath(Envoy::Http::HeaderMap const&) const third_party/envoy/src/source/common/router/config_impl.cc
| #3 0x5622c8c61723 in Envoy::Router::Filter::decodeHeaders(Envoy::Http::HeaderMap&, bool)::$_1::operator()(Envoy::Http::HeaderMap&) const third_party/envoy/src/source/common/router/router.cc:366:50
| #4 0x5622c79f8df7 in Envoy::Http::ConnectionManagerImpl::ActiveStream::sendLocalReply(bool, Envoy::Http::Code, absl::string_view, std::__msan::function<void (Envoy::Http::HeaderMap&)> const&, bool, std::__msan::optionalEnvoy::Grpc::Status::GrpcStatus, absl::string_view)::$_5::operator()(std::__msan::unique_ptr<Envoy::Http::HeaderMap, std::__msan::default_deleteEnvoy::Http::HeaderMap >&&, bool) const third_party/envoy/src/source/common/http/conn_manager_impl.cc:1303:11