Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2004 10:08:58 +0100 (CET)
From:      Nicolas Rachinsky <nicolas@dauerreden.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/61467: bug in security/libident
Message-ID:  <200401170908.i0H98w75067474@pc5.i.0x5.de>
Resent-Message-ID: <200401170910.i0H9A7Ov008831@freefall.freebsd.org>

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

>Number:         61467
>Category:       ports
>Synopsis:       bug in security/libident
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 17 01:10:07 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Nicolas Rachinsky
>Release:        FreeBSD 4.9-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD pc5.i.0x5.de 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #0: Wed Dec 17 22:19:16 CET 2003 nicolas@pc5.i.0x5.de:/usr/src/sys/compile/PC5 i386


>Description:

The bind and connect call in id_open.c fail with EINVAL. The attached patch fixes the problem.

>How-To-Repeat:

Try to use id_name.
	
>Fix:

Include the following patch:

============================================================
--- id_open.c.orig	Mon Aug 11 09:35:36 2003
+++ id_open.c	Sat Jan 17 09:58:50 2004
@@ -127,7 +127,7 @@
     }
 
 
-    if (bind(id->fd, (struct sockaddr *) &ss_laddr, sizeof(ss_laddr)) < 0)
+    if (bind(id->fd, (struct sockaddr *) &ss_laddr, ss_laddr.ss_len) < 0)
     {
 #ifdef DEBUG
 	perror("libident: bind");
@@ -150,7 +150,7 @@
     }
 
     errno = 0;
-    res = connect(id->fd, (struct sockaddr *)&ss_faddr, sizeof(ss_faddr));
+    res = connect(id->fd, (struct sockaddr *)&ss_faddr, ss_faddr.ss_len);
     if (res < 0 && errno != EINPROGRESS)
     {
 #ifdef DEBUG
============================================================

I sent it to the authors, too.

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



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