-
Notifications
You must be signed in to change notification settings - Fork 1k
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
MSAN + getservbyname() #1138
Comments
Yes, a missing interceptor. I don't see a source level workaround for this,
unfortunately.
…On Wed, Aug 28, 2019 at 1:50 AM Eugene Kosov ***@***.***> wrote:
Hi.
#include <stdlib.h>
#include <netdb.h>
int main() {
getservbyname("foo", NULL);
}
clang -g -fno-omit-frame-pointer -Wall -fsanitize=memory -fPIE -pie 1.c && ./a.out
Uninitialized bytes in __interceptor_strlen at offset 0 inside [0x718000000000, 49)
==1853==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7fa2ba363cff in _nss_files_parse_servent /build/glibc-KRRWSm/glibc-2.29/nss/nss_files/files-service.c:32:1
#1 0x7fa2ba363e6c in internal_getent /build/glibc-KRRWSm/glibc-2.29/nss/nss_files/files-XXX.c:182:22
#2 0x7fa2ba36412e in _nss_files_getservbyname_r /build/glibc-KRRWSm/glibc-2.29/nss/nss_files/files-service.c:41:1
#3 0x7fa2bb330f12 in getservbyname_r /build/glibc-KRRWSm/glibc-2.29/inet/../nss/getXXbyYY_r.c:315:16
#4 0x7fa2bb330cb2 in getservbyname /build/glibc-KRRWSm/glibc-2.29/inet/../nss/getXXbyYY.c:135:7
#5 0x56423b778467 in main /home/kevg/fun/cpp_projects/1.c:5:3
#6 0x7fa2bb224b6a in __libc_start_main /build/glibc-KRRWSm/glibc-2.29/csu/../csu/libc-start.c:308:16
#7 0x56423b6ff279 in _start (/home/kevg/fun/cpp_projects/a.out+0x1d279)
SUMMARY: MemorySanitizer: use-of-uninitialized-value /build/glibc-KRRWSm/glibc-2.29/nss/nss_files/files-service.c:32:1 in _nss_files_parse_servent
Exiting
I'd like to use getservbyname() with MSAN. Am I understand correct that
it is missing interceptor? Or could this be a bug inside GNU libc?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1138?email_source=notifications&email_token=AADG4SSLAN4LRBHMR7EGNXLQGY35HA5CNFSM4IQ7VTH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HH3PFLQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADG4SQMLR4ZJKOSHUPA5ATQGY35HANCNFSM4IQ7VTHQ>
.
|
Thanks for your answer! |
Your source code. Adding an interceptor would not be hard at all, but
I'm swamped at the moment.
…On Wed, Aug 28, 2019 at 12:29 PM Eugene Kosov ***@***.***> wrote:
Thanks for your answer!
You mean my source code or it's not possible to add such interceptor to compiler-rt?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@eugenis, could you, please give an update on the subject? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.
I'd like to use
getservbyname()
with MSAN. Am I understand correct that it is missing interceptor? Or could this be a bug inside GNU libc?The text was updated successfully, but these errors were encountered: