public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stefan Liebler <stli@linux.vnet.ibm.com>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH][BZ 21295] getaddrinfo: do not overwrite IPv6 IPs with IPv4 when using AF_UNSPEC
Date: Thu, 06 Jul 2017 09:03:00 -0000	[thread overview]
Message-ID: <a0cbf96b-96f0-cf27-37c2-ca13766eade5@linux.vnet.ibm.com> (raw)
In-Reply-To: <39fd154d-2434-f26a-82ce-09acf743de0b@redhat.com>

On 06/24/2017 04:59 PM, Florian Weimer wrote:
> On 03/23/2017 02:21 PM, kmeaw@kmeaw.com wrote:
>> CVE-2016-3706 patch introduces a regression which disrupts connectivity
>> from IPv6-only to dual-stack hosts. This is caused by
>> convert_hostent_to_gaih_addrtuple which frees the result opposed to
>> appending to it (prior to the CVE patch in gaih_inet).
>>
>> This change replaces free(*result) call with a loop which looks for the
>> pointer to the end of the linked list (&(*result)->next), so successive
>> calls append the result to the list instead of overwriting it.
>>
>> Bugzilla entry #21295 describes a way to reproduce the issue.
> 
> Thanks.  I have pushed your patch along with a test case tweak to cover
> this area of getaddrinfo.
> 
> Thanks,
> Florian
> 

Hi Florian,

I've recognized the test-fail resolv/tst-resolv-basic on some but not 
all machines of mine on different architectures s390, intel, power and 
according to 2.26 release page, Joseph also recognized it on his arm, 
mips, power32 machines:
warning: could not become root outside namespace (Operation not permitted)
warning: unshare (CLONE_NEWUTS) failed: Operation not permitted
warning: could not enter network namespace
error: addrinfo comparison failure
query: www.example:80 [10]/0x18
--- expected
+++ actual
@@ -1,3 +1,3 @@
  flags: AI_V4MAPPED AI_ALL
-address: STREAM/TCP 2001:db8::1 80
  address: STREAM/TCP ::ffff:192.0.2.17 80
+address: STREAM/TCP 2001:db8::1 80
error: addrinfo comparison failure
query: t.www.example:80 [10]/0x18
--- expected
+++ actual
@@ -1,3 +1,3 @@
  flags: AI_V4MAPPED AI_ALL
-address: STREAM/TCP 2001:db8::3 80
  address: STREAM/TCP ::ffff:192.0.2.19 80
+address: STREAM/TCP 2001:db8::3 80
error: 2 test failures

Does the ordering of the results matter?

Bye.
Stefan

  reply	other threads:[~2017-07-06  9:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 13:21 kmeaw
2017-04-20 12:41 ` Florian Weimer
2017-04-20 12:58   ` Florian Weimer
2017-04-20 13:44   ` kmeaw
2017-04-20 14:05     ` Florian Weimer
2017-06-24 14:59 ` Florian Weimer
2017-07-06  9:03   ` Stefan Liebler [this message]
2017-07-06 12:19     ` Florian Weimer
2017-07-06 15:18       ` Stefan Liebler
2017-07-06 21:05         ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0cbf96b-96f0-cf27-37c2-ca13766eade5@linux.vnet.ibm.com \
    --to=stli@linux.vnet.ibm.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).