From nicolas@dauerreden.de  Sat Jan 17 01:09:05 2004
Return-Path: <nicolas@dauerreden.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2050516A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 Jan 2004 01:09:05 -0800 (PST)
Received: from pc5.i.0x5.de (reverse-213-146-113-119.dialin.kamp-dsl.de [213.146.113.119])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4958843D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 Jan 2004 01:09:01 -0800 (PST)
	(envelope-from nicolas@dauerreden.de)
Received: from pc5.i.0x5.de (nicolas@localhost [127.0.0.1])
	by pc5.i.0x5.de (8.12.9p2/8.12.9) with ESMTP id i0H98w0A067475
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 Jan 2004 10:08:58 +0100 (CET)
	(envelope-from nicolas@pc5.i.0x5.de)
Received: (from nicolas@localhost)
	by pc5.i.0x5.de (8.12.9p2/8.12.9/Submit) id i0H98w75067474;
	Sat, 17 Jan 2004 10:08:58 +0100 (CET)
	(envelope-from nicolas)
Message-Id: <200401170908.i0H98w75067474@pc5.i.0x5.de>
Date: Sat, 17 Jan 2004 10:08:58 +0100 (CET)
From: Nicolas Rachinsky <nicolas@dauerreden.de>
Reply-To: Nicolas Rachinsky <nicolas@dauerreden.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: bug in security/libident
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         61467
>Category:       ports
>Synopsis:       bug in security/libident
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 17 01:10:07 PST 2004
>Closed-Date:    Fri Jan 23 10:42:21 PST 2004
>Last-Modified:  Fri Jan 23 10:42:21 PST 2004
>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:
State-Changed-From-To: open->closed 
State-Changed-By: krion 
State-Changed-When: Fri Jan 23 10:41:20 PST 2004 
State-Changed-Why:  
It was fixed by committing ports/61784, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61467 
>Unformatted:
