diff options
author | Florian Weimer <fweimer@redhat.com> | 2014-12-15 17:41:13 +0100 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2015-01-16 07:52:55 -0500 |
commit | d2a6f3a27b791d91beec2ea91f293ec898080904 (patch) | |
tree | 2dbe44384f5a6ed38117c069f7a00797d9866d5f | |
parent | 39700792d4224af99ab52ea26e98a0a2a2ed6ac6 (diff) | |
download | glibc-d2a6f3a27b791d91beec2ea91f293ec898080904.zip glibc-d2a6f3a27b791d91beec2ea91f293ec898080904.tar.gz glibc-d2a6f3a27b791d91beec2ea91f293ec898080904.tar.bz2 |
Avoid infinite loop in nss_dns getnetbyname [BZ #17630]
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | resolv/nss_dns/dns-network.c | 4 |
3 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2014-12-16 Florian Weimer <fweimer@redhat.com> + + [BZ #17630] + * resolv/nss_dns/dns-network.c (getanswer_r): Iterate over alias + names. + 2014-12-15 Jeff Law <law@redhat.com> [BZ #16617] @@ -10,7 +10,7 @@ Version 2.19.1 * The following bugs are resolved with this release: 16545, 16617, 16683, 16689, 16701, 16706, 16707, 16739, 16815, 16619, - 16740, 17031, 17048, 17137, 17153, 17187, 17213, 17325. + 16740, 17031, 17048, 17137, 17153, 17187, 17213, 17325, 17630. * Decoding a crafted input sequence in the character sets IBM933, IBM935, IBM937, IBM939, IBM1364 could result in an out-of-bounds array read, @@ -41,6 +41,9 @@ Version 2.19.1 * CVE-2012-3406 printf-style functions could run into a stack overflow when processing format strings with a large number of format specifiers. + +* The nss_dns implementation of getnetbyname could run into an infinite loop + if the DNS response contained a PTR record of an unexpected format. Version 2.19 diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c index 8e80a60..60c94f3 100644 --- a/resolv/nss_dns/dns-network.c +++ b/resolv/nss_dns/dns-network.c @@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result, case BYNAME: { - char **ap = result->n_aliases++; - while (*ap != NULL) + char **ap; + for (ap = result->n_aliases; *ap != NULL; ++ap) { /* Check each alias name for being of the forms: 4.3.2.1.in-addr.arpa = net 1.2.3.4 |