]> git.ipfire.org Git - thirdparty/glibc.git/commit
CVE-2016-3706: getaddrinfo: stack overflow in hostent conversion [BZ #20010]
authorFlorian Weimer <fweimer@redhat.com>
Fri, 29 Apr 2016 08:35:34 +0000 (10:35 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 11 May 2016 09:55:19 +0000 (11:55 +0200)
commit1a8a7c12950a0026a3c406a7cb1608f96aa1460e
treefb282a9d7d058b60beef5d46200bdc33bfd8ad7f
parent24e2b1cede1952d7d4411a3cafd25dd8593dab9f
CVE-2016-3706: getaddrinfo: stack overflow in hostent conversion [BZ #20010]

When converting a struct hostent response to struct gaih_addrtuple, the
gethosts macro (which is called from gaih_inet) used alloca, without
malloc fallback for large responses.  This commit changes this code to
use calloc unconditionally.

This commit also consolidated a second hostent-to-gaih_addrtuple
conversion loop (in gaih_inet) to use the new conversion function.

(cherry picked from commit 4ab2ab03d4351914ee53248dc5aef4a8c88ff8b9)
ChangeLog
sysdeps/posix/getaddrinfo.c