From nobody@FreeBSD.org  Sat Jun  2 20:27:13 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E209916A421
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  2 Jun 2007 20:27:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id D2F9B13C45D
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  2 Jun 2007 20:27:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l52KRDJB015346
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 2 Jun 2007 20:27:13 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l52KRD1C015345;
	Sat, 2 Jun 2007 20:27:13 GMT
	(envelope-from nobody)
Message-Id: <200706022027.l52KRD1C015345@www.freebsd.org>
Date: Sat, 2 Jun 2007 20:27:13 GMT
From: "Eirik A. Nygaard"<eirikald@pvv.ntnu.no>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Missing handling of mech_type in gss_init_sec_context being GSS_C_NO_OID
X-Send-Pr-Version: www-3.0

>Number:         113266
>Category:       kern
>Synopsis:       [libgssapi] [patch] Missing handling of mech_type in gss_init_sec_context being GSS_C_NO_OID
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    harti
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 02 20:30:06 GMT 2007
>Closed-Date:    Tue Mar 01 10:15:00 EST 2011
>Last-Modified:  Tue Mar 01 10:15:00 EST 2011
>Originator:     Eirik A. Nygaard
>Release:        7.0-CURRENT
>Organization:
>Environment:
FreeBSD eirik 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue May  8 12:33:42 CEST 2007     eirik@:/usr/obj/home/eirik/FreeBSD/src/sys/EIRIK  i386

>Description:
When passing GSS_C_NO_OID to gss_init_sec_context as the mech_type
argument libgssapi will segfault in _gss_oid_equal(gss_utils.c:39). The
manpage states that:
     mech_type     Object ID of desired mechanism. Supply GSS_C_NO_OID to
                   obtain an implementation specific default

So sending in GSS_C_NO_OID as mech_type should be allowed.
>How-To-Repeat:
Issue a gss_init_sec_context() call with the mech_type argument being
GSS_C_NO_OID. Then wait for the segfault.
>Fix:
Patch can be found at:
http://www.pvv.ntnu.no/~eirikald/patches/gssapi_mech_type_NO_OID.patch

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sat Jun 2 20:58:25 UTC 2007 
State-Changed-Why:  
I'm sure _you_ know which part of the system that this applies to, but from 
reading the PR, I certainly don't.  Can you give us more information, please? 


Responsible-Changed-From-To: freebsd-bugs->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jun 2 20:58:25 UTC 2007 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=113266 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Sun Jun 3 13:05:47 UTC 2007 
State-Changed-Why:  
Feedback received. 


Responsible-Changed-From-To: linimon->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Jun 3 13:05:47 UTC 2007 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=113266 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/113266: commit references a PR
Date: Thu, 14 Jun 2007 19:58:31 +0000 (UTC)

 harti       2007-06-14 19:58:24 UTC
 
   FreeBSD src repository
 
   Modified files:
     lib/libgssapi        gss_init_sec_context.c 
   Log:
   According to the documentation mech_type for gss_init_sec_context() may
   be passed as GSS_C_NO_OID in which case a default mech should be used.
   This case was not handled and leads to core dumps when using nss_ldap.
   Now use the first mech in this case. When there is no mechanism available
   return an error (this part is taken from the PR).
   
   PR:             113266
   Submitted by:   Eirik Nygaard <eirikald@pvv.ntnu.no> (partly)
   
   Revision  Changes    Path
   1.3       +9 -1      src/lib/libgssapi/gss_init_sec_context.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: linimon 
State-Changed-When: Fri Feb 29 02:00:52 UTC 2008 
State-Changed-Why:  
Still needs MFC to 6.  Assign to committer. 


Responsible-Changed-From-To: freebsd-bugs->harti 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Feb 29 02:00:52 UTC 2008 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=113266 
State-Changed-From-To: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Tue Mar 1 10:14:58 EST 2011 
State-Changed-Why:  
This PR is fixed in head, 8.x and 7.x, but will not be merged to 6.x now 
that that branch is unsupported, sorry 

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