2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

2003. [bug] libbind: The DNS name/address lookup functions could

occasionally follow a random pointer due to
                        structures not being completely zeroed. [RT #15806]
This commit is contained in:
Mark Andrews 2006-03-08 03:12:24 +00:00
parent 366c60aa36
commit 6de9371826
2 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,8 @@
2002 [bug] libbind: tighten the constraints on when 2003. [bug] libbind: The DNS name/address lookup functions could
occasionally follow a random pointer due to
structures not being completely zeroed. [RT #15806]
2002. [bug] libbind: tighten the constraints on when
struct addrinfo._ai_pad exists. [RT #15783] struct addrinfo._ai_pad exists. [RT #15783]
2001. [func] Check the KSK flag when updating a secure dynamic zone. 2001. [func] Check the KSK flag when updating a secure dynamic zone.

View File

@ -52,7 +52,7 @@
/* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */ /* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: dns_ho.c,v 1.18 2005/10/11 00:10:14 marka Exp $"; static const char rcsid[] = "$Id: dns_ho.c,v 1.19 2006/03/08 03:12:24 marka Exp $";
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
/* Imports. */ /* Imports. */
@ -258,7 +258,7 @@ ho_byname2(struct irs_ho *this, const char *name, int af)
errno = ENOMEM; errno = ENOMEM;
goto cleanup; goto cleanup;
} }
memset(q, 0, sizeof(q)); memset(q, 0, sizeof(*q));
switch (af) { switch (af) {
case AF_INET: case AF_INET:
@ -349,8 +349,8 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af)
errno = ENOMEM; errno = ENOMEM;
goto cleanup; goto cleanup;
} }
memset(q, 0, sizeof(q)); memset(q, 0, sizeof(*q));
memset(q2, 0, sizeof(q2)); memset(q2, 0, sizeof(*q2));
if (af == AF_INET6 && len == IN6ADDRSZ && if (af == AF_INET6 && len == IN6ADDRSZ &&
(!memcmp(uaddr, mapped, sizeof mapped) || (!memcmp(uaddr, mapped, sizeof mapped) ||
@ -574,8 +574,8 @@ ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai)
errno = ENOMEM; errno = ENOMEM;
goto cleanup; goto cleanup;
} }
memset(q, 0, sizeof(q2)); memset(q, 0, sizeof(*q2));
memset(q2, 0, sizeof(q2)); memset(q2, 0, sizeof(*q2));
switch (pai->ai_family) { switch (pai->ai_family) {
case AF_UNSPEC: case AF_UNSPEC: