[PATCH][BZ 21295] getaddrinfo: do not overwrite IPv6 IPs with IPv4 when using AF_UNSPEC

Florian Weimer fweimer@redhat.com
Sat Jun 24 14:59:00 GMT 2017


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.patch
Type: text/x-patch
Size: 1328 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170624/3ad041f3/attachment.bin>


More information about the Libc-alpha mailing list