Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build/test: Fix msan use-of-unitialized-value in transport_sockets/tls/context_impl.cc #7697

Merged
merged 1 commit into from
Jul 23, 2019

Conversation

ahedberg
Copy link
Contributor

Signed-off-by: Ashley Hedberg [email protected]

Description: The sin_port/sin6_port fields were not initialized, causing msan to warn on use-of-uninitialized-value in ssl_socket_test:

[ RUN ] IpVersions/SslSocketTest.Ipv4San/IPv6
==5456==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x55cfb4ae6a9b in Envoy::Network::Address::Ipv4Instance::Ipv4Instance(sockaddr_in const*) source/common/network/address_impl.cc:178:24
#1 0x55cfaf715886 in Envoy::Extensions::TransportSockets::Tls::ContextImpl::verifySubjectAltName(x509_st*, std::__msan::vector<std::__msan::basic_string<char, std::__msan::char_traits, std::__msan::allocator >, std::__msan::allocator<std::__msan::basic_string<char, std::__msan::char_traits, std::__msan::allocator > > > const&) source/extensions/transport_sockets/tls/context_impl.cc:523:40

This was detected during google's import.

Risk Level: none (test-only fix)
Testing: internal testing to confirm that this change fixes the msan warnings, plus bazel test test/extensions/transport_sockets/...
Docs Changes: n/a
Release Notes: n/a

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@mattklein123 mattklein123 self-assigned this Jul 23, 2019
@mattklein123 mattklein123 merged commit defd933 into envoyproxy:master Jul 23, 2019
@lizan
Copy link
Member

lizan commented Jul 23, 2019

out of curious, how do you run MSAN? via Google Infra?

@ahedberg
Copy link
Contributor Author

Correct--we have some tests configured internally that automatically run under msan on import.

bazel does support msan, though I don't know if you have to use their container (https://docs.bazel.build/versions/master/bazel-container.html) to do so.

@lizan
Copy link
Member

lizan commented Jul 23, 2019

thanks, good to know it is run periodically, we do have issue to track but it requires rebuild of libstdc++ or libc++ #918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants