From 8ac5a76a99e51a91eac9cecbe941fc05ddf11e03 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 17 Dec 2014 18:09:11 +0000 Subject: Fix resolver inet_* namespace (bug 17722). Parts of the resolver brought in by pthreads (at least) use inet_* functions that aren't in the 1995/6 edition of POSIX that introduced pthreads (or in one case, use __inet_aton which is then defined in the same file as non-weak inet_addr). This patch fixes this by making the affected functions into weak alias for __inet_* and using those names in the problematic resolver code. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17722] * inet/inet_mkadr.c (inet_makeaddr): Rename to __inet_makeaddr and define as weak alias of __inet_makeaddr. * resolv/inet_addr.c (inet_addr): Rename to __inet_addr and define as weak alias of __inet_addr. * resolv/inet_pton.c (inet_pton): Rename to __inet_pton and define as weak alias of __inet_pton. Use libc_hidden_weak. * include/arpa/inet.h (__inet_pton): Declare. Use libc_hidden_proto. (inet_makeaddr): Don't use libc_hidden_proto. (__inet_makeaddr): Declare. Use libc_hidden_proto. * resolv/res_init.c (__res_vinit): Use __inet_pton instead of inet_pton. Use __inet_makeaddr instead of inet_makeaddr. * conform/Makefile (test-xfail-POSIX/pthread.h/linknamespace): Remove variable. (test-xfail-POSIX/sched.h/linknamespace): Likewise. (test-xfail-POSIX/time.h/linknamespace): Likewise. --- NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index c46f51a..d4ccd37 100644 --- a/NEWS +++ b/NEWS @@ -14,7 +14,8 @@ Version 2.21 17363, 17370, 17371, 17411, 17460, 17475, 17485, 17501, 17506, 17508, 17522, 17555, 17570, 17571, 17572, 17573, 17574, 17581, 17582, 17583, 17584, 17585, 17589, 17594, 17601, 17608, 17616, 17625, 17630, 17633, - 17634, 17647, 17653, 17657, 17664, 17665, 17668, 17682, 17717, 17719. + 17634, 17647, 17653, 17657, 17664, 17665, 17668, 17682, 17717, 17719, + 17722. * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag under certain input conditions resulting in the execution of a shell for -- cgit v1.1