From nullguid@a-tuin.t72.ru  Fri May 23 01:19:14 2003
Return-Path: <nullguid@a-tuin.t72.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4A5F337B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 May 2003 01:19:14 -0700 (PDT)
Received: from a-tuin.t72.ru (a-tuin.t72.ru [193.111.45.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 04D8443F93
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 May 2003 01:19:13 -0700 (PDT)
	(envelope-from nullguid@a-tuin.t72.ru)
Received: from a-tuin.t72.ru (localhost [127.0.0.1])
	by a-tuin.t72.ru (8.12.8/8.12.3) with ESMTP id h4N8J8TU005281
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 May 2003 14:19:08 +0600 (YEKST)
	(envelope-from nullguid@a-tuin.t72.ru)
Received: (from nullguid@localhost)
	by a-tuin.t72.ru (8.12.8/8.12.3/Submit) id h4N8J7kw005280;
	Fri, 23 May 2003 14:19:07 +0600 (YEKST)
	(envelope-from nullguid)
Message-Id: <200305230819.h4N8J7kw005280@a-tuin.t72.ru>
Date: Fri, 23 May 2003 14:19:07 +0600 (YEKST)
From: Ilya Novoselov <nullguid@t72.ru>
Reply-To: Ilya Novoselov <nullguid@t72.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: security/ident2 port segfaults when returning username
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         52602
>Category:       ports
>Synopsis:       security/ident2 port segfaults when returning username
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 23 01:20:15 PDT 2003
>Closed-Date:    Tue Dec 16 15:40:37 PST 2003
>Last-Modified:  Tue Dec 16 15:40:37 PST 2003
>Originator:     Ilya Novoselov
>Release:        FreeBSD 4.6.2-RELEASE i386
>Organization:
Russian Company JSC
>Environment:
System: FreeBSD a-tuin.t72.ru 4.6.2-RELEASE FreeBSD 4.6.2-RELEASE #2: Sun Aug 25 18:09:24 YEKST 2002 rz@a-tuin.t72.ru:/usr/src/sys/compile/A-TUIN i386


	
>Description:
inetd2 segfaults because buffer get freed before value accessed, fix follows
	
>How-To-Repeat:
	
>Fix:
--- machine.c.orig      Fri May 23 11:40:55 2003
+++ machine.c   Fri May 23 11:42:16 2003
@@ -101,6 +101,7 @@
        struct xinpgen *xig, *oxig;
        struct xsocket *so;
        size_t len;
+       uid_t uid;

        if (sysctlbyname (mibvar, 0, &len, 0, 0) < 0) {
                syslog (LOG_WARNING, "sysctl: %s: %s\n", mibvar,
@@ -135,8 +136,9 @@
                &&  (laddr->s_addr) == inp->inp_laddr.s_addr
                && rp == ntohs (inp->inp_fport)
                && lp == ntohs (inp->inp_lport)) {
+                       uid = so->so_uid;
                        free (buf);
-                       return so->so_uid;
+                       return uid;
                }
        }
        free (buf);
>Release-Note:
>Audit-Trail:

From: Edwin Groothuis <edwin@freebsd.org>
To: scorpio@drkshdw.org
Cc: FreeBSD Gnats Submit <freebsd-gnats-submit@freebsd.org>
Subject: ports/52602 - security/ident2 port segfaults when returning username
Date: Thu, 9 Oct 2003 21:57:07 +1000

 Hello,
 
 Could you please have a look at PR 52602:
 	http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/52602
 
 and tell me if you approve this patch (maybe feed it back to the
 author too)
 
 Edwin
 
 -- 
 Edwin Groothuis
 edwin@freebsd.org
 http://www.mavetju.org

From: Jeff Palmer <scorpio@drkshdw.org>
To: freebsd-gnats-submit@FreeBSD.org, nullguid@t72.ru
Cc:  
Subject: Re: ports/52602: security/ident2 port segfaults when returning
  username
Date: Mon, 03 Nov 2003 01:07:39 -0500

 I've contacted the software developer,   It appears he is going to roll a 
 new version and test it.
 When he has the new version up,  I'll update the port.
 
 Thanks for the heads up,  I was unable to duplicate the segfault until last 
 night (sorry, hectic schedule)
 
 
 
 Jeff Palmer
 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Tue Dec 16 15:39:58 PST 2003 
State-Changed-Why:  
This fix was indeed included in 1.04 version, which is 
in ports tree since 7th Oct. 

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