False-positive MSan matches in GetIPAddressFromSockAddr with IPv6 nameserver in resolv.conf
Reported by
mal...@yandex-team.ru,
Aug 10 2016
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Steps to reproduce the problem: 0. Checkout Chromium 54.0.2816.4 from source 1. Build net_unittests with MSan support 2. Add "nameserver ::1" as one of nameservers in /etc/resolv.conf 3. Run DnsConfigServicePosixTest.DestroyWhileJobsWorking test. What is the expected behavior? Memory sanitizer does not detect any uninitialized values during the test run. What went wrong? Memory sanitizer detects uninitialized sa_family field in sock_addr pointer in GetIPAddressFromSockAddr function (net/base/ip_endpoint.cc) and the test fails. Did this work before? No Chrome version: 54.0.2816.4 Channel: n/a OS Version: Ubuntu 14.04.5 LTS Flash Version: N/A The issue is caused by the following: 1. Glibc uses malloc to allocate sockaddr_in6 structure for parsed IPv6 address (see https://sourceware.org/git/?p=glibc.git;a=blob;f=resolv/res_init.c;h=cea4c8a3cc5ad0181ee706daedb940083d08ba76;hb=master#l279 for upstream version, code from glibc 2.19 which I used in test behaves similarly) and then returns this value to ConvertResStateToDnsConfig function from src/net/dns/dns_config_service_posix.cc. Then this value is passed to GetIPAddressFromSockAddr which tries to parse sa_family field. 2. As glibc is not included in instrumented libraries archive for MSan (and, probably, won't be included) and is loaded from system path, it's code is not instrumented. So MSan does not know about initialization of allocated structure, but succesfully intercepts malloc call, which leads to false positive error report.
,
Aug 11 2016
,
Aug 11 2017
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||
►
Sign in to add a comment |
|||
Comment 1 by tkonch...@chromium.org
, Aug 11 2016