Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 19:25:05 +0200 (CEST)
From:      Hans Maurer <maurer@amasol.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   misc/43136: Pointer bug in getaddrinfo.c 
Message-ID:  <200209201725.g8KHP58K010610@mrburns.amasol.de>

next in thread | raw e-mail | index | archive | help

>Number:         43136
>Category:       misc
>Synopsis:       Pointer bug in getaddrinfo.c
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 20 10:30:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Hans Maurer
>Release:        FreeBSD 4.7-RC i386
>Organization:
>Environment:
System: FreeBSD mrburns.amasol.de 4.7-RC FreeBSD 4.7-RC #5: Fri Sep 20 10:39:35 CEST 2002 root@mrburns.amasol.de:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
In /usr/src/lib/libc/net/getaddrinfo.c, buf and buf2 have changed to pointer
types between revision 1.9.2.9 and 1.9.2.10.  However, one statement was
overlooked in the process, which causes getaddrinfo to fail on DNS queries.

I noticed when tcp_wrapper wouldn't accept host name in hosts.allow anymore.
	
>How-To-Repeat:
tcpdmatch ftpd ftp.freebsd.org or any other getaddrinfo call.
	
>Fix:
*** lib/libc/net/getaddrinfo.c.orig	Thu Sep 19 16:41:46 2002
--- lib/libc/net/getaddrinfo.c	Fri Sep 20 19:16:40 2002
***************
*** 1460,1466 ****
  		free(buf2);
  		return EAI_NODATA;
  	}
! 	ai = getanswer(&buf, q.n, q.name, q.qtype, pai);
  	if (ai) {
  		cur->ai_next = ai;
  		while (cur && cur->ai_next)
--- 1460,1466 ----
  		free(buf2);
  		return EAI_NODATA;
  	}
! 	ai = getanswer(buf, q.n, q.name, q.qtype, pai);
  	if (ai) {
  		cur->ai_next = ai;
  		while (cur && cur->ai_next)

	


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209201725.g8KHP58K010610>