From jdc@koitsu.org  Sun Mar 10 08:35:47 2013
Return-Path: <jdc@koitsu.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 06787726
	for <freebsd-gnats-submit@freebsd.org>; Sun, 10 Mar 2013 08:35:47 +0000 (UTC)
	(envelope-from jdc@koitsu.org)
Received: from qmta03.emeryville.ca.mail.comcast.net (qmta03.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:43:76:96:30:32])
	by mx1.freebsd.org (Postfix) with ESMTP id BD742249
	for <freebsd-gnats-submit@freebsd.org>; Sun, 10 Mar 2013 08:35:46 +0000 (UTC)
Received: from omta06.emeryville.ca.mail.comcast.net ([76.96.30.51])
	by qmta03.emeryville.ca.mail.comcast.net with comcast
	id 9kbM1l00116AWCUA3kbmQ2; Sun, 10 Mar 2013 08:35:46 +0000
Received: from koitsu.strangled.net ([67.180.84.87])
	by omta06.emeryville.ca.mail.comcast.net with comcast
	id 9kbl1l00G1t3BNj8Skblzd; Sun, 10 Mar 2013 08:35:46 +0000
Received: by icarus.home.lan (Postfix, from userid 1000)
	id 9A7E373A31; Sun, 10 Mar 2013 00:35:45 -0800 (PST)
Message-Id: <20130310083545.9A7E373A31@icarus.home.lan>
Date: Sun, 10 Mar 2013 00:35:45 -0800 (PST)
From: Jeremy Chadwick <jdc@koitsu.org>
Reply-To: Jeremy Chadwick <jdc@koitsu.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: libgssapi causes segfaults on i386
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         176807
>Category:       bin
>Synopsis:       [libgssapi] [patch] libgssapi causes segfaults on i386
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 10 08:40:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Tue Mar 12 06:58:18 UTC 2013
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD icarus.home.lan 9.1-STABLE FreeBSD 9.1-STABLE #0 r247132: Thu Feb 21 19:15:34 PST 2013 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_9_amd64 amd64
>Description:
	Issue:

http://lists.freebsd.org/pipermail/freebsd-stable/2010-July/057734.html

	Some key details -- such as that Heimdal is **not** the problem:

http://lists.freebsd.org/pipermail/freebsd-stable/2010-July/057818.html

	Fix/patch for the issue:

http://lists.freebsd.org/pipermail/freebsd-stable/2010-July/057830.html

	Possibly related PR:

	kern/147454
>How-To-Repeat:
	The thread/issue actually contains the necessary "bits" that you
	need to install + configuration details to reproduce the issue.
	I was able to reproduce it on a freshly installed system.  So
	for how to repeat the problem, you gotta read the communications
	between Reko Turja and myself.
>Fix:
	Patch is available for download here:

	http://jdc.koitsu.org/freebsd/gss_release_buffer.c.patch

	And is also attached below.

--- lib/libgssapi/gss_release_buffer.c.orig	2009-08-03 01:13:06.000000000 -0700
+++ lib/libgssapi/gss_release_buffer.c	2010-07-17 19:47:25.000000000 -0700
@@ -37,7 +37,7 @@
 {
 
 	*minor_status = 0;
-	if (buffer->value)
+	if (buffer->length && buffer->value)
 		free(buffer->value);
 	_gss_buffer_zero(buffer);
 
>Release-Note:
>Audit-Trail:
>Unformatted:
