Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 May 2007 17:32:27 +0900 (JST)
From:      Takamichi Tateoka <tate@tateoka.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/112983: XDMCP login from remote host crashs xdm in xorg 7.2
Message-ID:  <20070525083227.E29A8154A16@leaf.mobile.tateoka.org>
Resent-Message-ID: <200705250900.l4P90A8D020771@freefall.freebsd.org>

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

>Number:         112983
>Category:       ports
>Synopsis:       XDMCP login from remote host crashs xdm in xorg 7.2
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 25 09:00:09 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Takamichi Tateoka
>Release:        FreeBSD 6.2-RELEASE-p5 i386
>Organization:
private
>Environment:
System: FreeBSD leaf.mobile.tateoka.org 6.2-RELEASE-p5 FreeBSD 6.2-RELEASE-p5 #1: Fri May 25 02:16:41 JST 2007 tate@leaf.mobile.tateoka.org:/usr/src/sys/i386/compile/GENERIC i386

	xorg 7.2 upgraded.

>Description:
	XDMCP login from remote host crashs xdm.

	Xdm is crashed because pam_get_item() in 
	pam_sm_close_session() makes variable "tty" as NULL.
	Following patch makes it clear:

---BEGIN---
*** /usr/src/lib/libpam/modules/pam_lastlog/pam_lastlog.c.orig	Fri May 25 15:59:00 2007
--- /usr/src/lib/libpam/modules/pam_lastlog/pam_lastlog.c	Fri May 25 16:14:18 2007
***************
*** 173,178 ****
--- 173,183 ----
          const void *tty;
  
          pam_get_item(pamh, PAM_TTY, (const void **)&tty);
+ 	if (tty == NULL){
+ 		syslog(LOG_ERR, "tty is NULL");
+ 		return(PAM_SYSTEM_ERR);
+ 	}
+ 		
  	if (strncmp(tty, _PATH_DEV, strlen(_PATH_DEV)) == 0)
  		tty = (const char *)tty + strlen(_PATH_DEV);
  	if (*(const char *)tty == '\0')
---END---

	With this patch, xdm logged to /var/log/messages following lines:

May 25 16:29:53 leaf xdm: tty is NULL
May 25 16:29:53 leaf xdm: in _openpam_check_error_code(): pam_sm_close_session()
: unexpected return value 4

>How-To-Repeat:
	- add LISTEN and remote host IP address to Xaccess file on target host.
	- comment out DisplayManager.requestPort in xdm-config file on target host.
	- start xdm on target host.
	- execute "X -query targethost" from remote host.
	xdm window appears on remote host, but it cause SEGV if login.

	/var/log/messages on target host says like that:
	May 25 16:05:35 leaf kernel: pid 88443 (xdm), uid 0: exited on signal 11 (core d umped)

>Fix:

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



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