NetBSD Problem Report #26998

Received: (qmail 28065 invoked by uid 605); 19 Sep 2004 17:34:12 -0000
Message-Id: <20040919173409.61CA2252009@new-www.isc.netbsd.org>
Date: Sun, 19 Sep 2004 17:34:09 +0000 (UTC)
From: Gregory McGarry <g.mcgarry@ieee.org>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: Gregory McGarry <g.mcgarry@ieee.org>
To: gnats-bugs@gnats.NetBSD.org
Subject: xdm segmentation fault when serving remote terminals through Xchooser
X-Send-Pr-Version: www-1.0

>Number:         26998
>Category:       xsrc
>Synopsis:       xdm segmentation fault when serving remote terminals through Xchooser
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dholland
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 19 17:35:00 +0000 2004
>Closed-Date:    Sun Nov 15 21:52:54 +0000 2015
>Last-Modified:  Sun Nov 15 21:52:54 +0000 2015
>Originator:     Gregory McGarry
>Release:        NetBSD 2.0_BETA
>Organization:
>Environment:
NetBSD/i386 host, X-win32 client
>Description:
xdm segfaults when trying to attach from a remote terminal through Xchooser.

Add the following line to /usr/X11R6/lib/X11/xdm/xdm-config for the additional debugging information:

DisplayManager.debugLevel:      100

Enable the Xchooser in /usr/X11R6/lib/X11/xdm/Xaccess:

-#*             CHOOSER BROADCAST       #any indirect host can get a chooser
+*              CHOOSER BROADCAST       #any indirect host can get a chooser

Output:

Starting xdm.
DisplayManager.errorLogFile/DisplayManager.ErrorLogFile value  /var/log/xdm.log
DisplayManager.daemonMode/DisplayManager.DaemonMode value true
DisplayManager.pidFile/DisplayManager.PidFile value  /var/run/xdm.pid
DisplayManager.lockPidFile/DisplayManager.LockPidFile value true
DisplayManager.authDir/DisplayManager.authDir value /usr/X11R6/lib/X11/xdm
DisplayManager.autoRescan/DisplayManager.AutoRescan value true
DisplayManager.removeDomainname/DisplayManager.RemoveDomainname value true
DisplayManager.keyFile/DisplayManager.KeyFile value  /usr/X11R6/lib/X11/xdm/xdm-keys
DisplayManager.accessFile/DisplayManager.AccessFile value  /usr/X11R6/lib/X11/xdm/Xaccess
DisplayManager.exportList/DisplayManager.ExportList value
DisplayManager.greeterLib/DisplayManager.GreeterLib value /usr/X11R6/lib/X11/xdm/libXdmGreet.so
DisplayManager.choiceTimeout/DisplayManager.ChoiceTimeout value 15
DisplayManager.sourceAddress/DisplayManager.SourceAddress value false
DisplayManager.willing/DisplayManager.Willing value  su -m nobody -c /usr/X11R6/lib/X11/xdm/Xwilling
Created chooser socket 4
creating socket to listen on port 177 of address 0.0.0.0
WaitForSomething
select returns 1.  Rescan: 0  ChildReady: 0
ProcessRequestSocket
header: 1 3 1
Indirect respond 1
ConvertAddr returning 0 for family 2
xdm error (pid 201): Cannot convert Internet address 192.168.64.106 to host name
ConvertAddr returning 0 for family 2
all_query_respond: conntype=0, addr=192.168.64.106, len=4
Send willing  1 user, load: 0.08, 0.11, 0.05
signals blocked
WaitForSomething
select returns 1.  Rescan: 0  ChildReady: 0
ProcessRequestSocket
header: 1 3 1
Indirect respond 1
ConvertAddr returning 0 for family 2
xdm error (pid 201): Cannot convert Internet address 192.168.64.106 to host name
ConvertAddr returning 0 for family 2
all_query_respond: conntype=0, addr=192.168.64.106, len=4
Send willing  1 user, load: 0.08, 0.11, 0.05
signals blocked
WaitForSomething
select returns 1.  Rescan: 0  ChildReady: 0
ProcessRequestSocket
header: 1 3 1
Indirect respond 1
ConvertAddr returning 0 for family 2
xdm error (pid 201): Cannot convert Internet address 192.168.64.106 to host name
ConvertAddr returning 0 for family 2
all_query_respond: conntype=0, addr=192.168.64.106, len=4
Send willing  1 user, load: 0.07, 0.10, 0.05
signals blocked
WaitForSomething
select returns 1.  Rescan: 0  ChildReady: 0
ProcessRequestSocket
header: 1 3 1
Indirect respond 1
ConvertAddr returning 0 for family 2
xdm error (pid 201): Cannot convert Internet address 192.168.64.106 to host name
ConvertAddr returning 0 for family 2
all_query_respond: conntype=0, addr=192.168.64.106, len=4
Send willing  1 user, load: 0.07, 0.10, 0.05
signals blocked
WaitForSomething
select returns 1.  Rescan: 0  ChildReady: 0
ProcessRequestSocket
header: 1 7 39
Request respond 39
FindProtoDisplay
NewProtoDisplay
NewProtoDisplay 0x8068b00
Got 0x80690e0 (18 MIT-MAGIC-COOKIE-1)
Accept Session ID 261488001
WaitForSomething
select returns 1.  Rescan: 0  ChildReady: 0
ProcessRequestSocket
header: 1 10 23
Manage 23
FindProtoDisplay
Manage Session ID 261488001, pdpy 0x8068b00
Computed display name: 192.168.64.106:0
ConvertAddr returning 0 for family 2
IsIndirectClient
xdm error (pid 201): Cannot convert Internet address 192.168.64.106 to host name
Use chooser for 192.168.64.106:0
Starting display 192.168.64.106:0,MIT-unspecified
StartDisplay 192.168.64.106:0
DisplayManager.192_168_64_106_0.serverAttempts/DisplayManager.MIT-unspecified.ServerAttempts value 1
DisplayManager.192_168_64_106_0.openDelay/DisplayManager.MIT-unspecified.OpenDelay value 15
DisplayManager.192_168_64_106_0.openRepeat/DisplayManager.MIT-unspecified.OpenRepeat value 5
DisplayManager.192_168_64_106_0.openTimeout/DisplayManager.MIT-unspecified.OpenTimeout value 120
DisplayManager.192_168_64_106_0.startAttempts/DisplayManager.MIT-unspecified.StartAttempts value 4
DisplayManager.192_168_64_106_0.pingInterval/DisplayManager.MIT-unspecified.PingInterval value 5
DisplayManager.192_168_64_106_0.pingTimeout/DisplayManager.MIT-unspecified.PingTimeout value 5
DisplayManager.192_168_64_106_0.terminateServer/DisplayManager.MIT-unspecified.TerminateServer value false
DisplayManager.192_168_64_106_0.grabServer/DisplayManager.MIT-unspecified.GrabServer value false
DisplayManager.192_168_64_106_0.grabTimeout/DisplayManager.MIT-unspecified.GrabTimeout value 3
DisplayManager.192_168_64_106_0.resetSignal/DisplayManager.MIT-unspecified.Signal value 1
DisplayManager.192_168_64_106_0.termSignal/DisplayManager.MIT-unspecified.Signal value 15
DisplayManager.192_168_64_106_0.resetForAuth/DisplayManager.MIT-unspecified.ResetForAuth value false
DisplayManager.192_168_64_106_0.authorize/DisplayManager.MIT-unspecified.Authorize value  true
DisplayManager.192_168_64_106_0.authComplain/DisplayManager.MIT-unspecified.AuthComplain value  true
DisplayManager.192_168_64_106_0.authName/DisplayManager.MIT-unspecified.AuthName value XDM-AUTHORIZATION-1 MIT-MAGIC-COOKIE-1
DisplayManager.192_168_64_106_0.authFile/DisplayManager.MIT-unspecified.AuthFile value
File: /usr/X11R6/lib/X11/xdm/authdir/authfiles/A192.168.64.106:0-00201a auth: 0x8064c40
DisplayManager.192_168_64_106_0.resources/DisplayManager.MIT-unspecified.Resources value  /usr/X11R6/lib/X11/xdm/Xresources
DisplayManager.192_168_64_106_0.xrdb/DisplayManager.MIT-unspecified.Xrdb value /usr/X11R6/bin/xrdb
DisplayManager.192_168_64_106_0.setup/DisplayManager.MIT-unspecified.Setup value
DisplayManager.192_168_64_106_0.startup/DisplayManager.MIT-unspecified.Startup value
DisplayManager.192_168_64_106_0.reset/DisplayManager.MIT-unspecified.Reset value
DisplayManager.192_168_64_106_0.session/DisplayManager.MIT-unspecified.Session value  /usr/X11R6/lib/X11/xdm/Xsession
DisplayManager.192_168_64_106_0.userPath/DisplayManager.MIT-unspecified.Path value /bin:/usr/bin:/usr/pkg/bin:/usr/local/bin:/usr/X11R6/bin
DisplayManager.192_168_64_106_0.systemPath/DisplayManager.MIT-unspecified.Path value /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
DisplayManager.192_168_64_106_0.systemShell/DisplayManager.MIT-unspecified.Shell value /bin/sh
DisplayManager.192_168_64_106_0.failsafeClient/DisplayManager.MIT-unspecified.FailsafeClient value /usr/X11R6/bin/xterm
DisplayManager.192_168_64_106_0.userAuthDir/DisplayManager.MIT-unspecified.UserAuthDir value /tmp
DisplayManager.192_168_64_106_0.chooser/DisplayManager.MIT-unspecified.Chooser value  /usr/X11R6/libexec/chooser
Before XOpenDisplay(192.168.64.106:0)
After XOpenDisplay(192.168.64.106:0)
Got remote address 192.168.64.106:0 16
RunChooser 192.168.64.106:0
Loading resource file: /usr/X11R6/lib/X11/xdm/Xresources
Chooser socket port: 65533
[1]   Segmentation fault (core dumped) /usr/X11R6/bin/xdm

GDB says:
#0  0x0804bb2c in getLocalAddress ()
(gdb) bt
#0  0x0804bb2c in getLocalAddress ()
#1  0x0804e6a1 in FormatChooserArgument ()
#2  0x0804ebb6 in RunChooser ()
#3  0x0804f8df in StartDisplay ()
#4  0x08055b72 in manage ()
#5  0x08054b34 in ProcessRequestSocket ()
#6  0x08053a5d in ProcessListenSockets ()
#7  0x08054c03 in WaitForSomething ()
#8  0x0804ee9c in main ()
#9  0x0804b8a2 in ___start ()


>How-To-Repeat:
Run XDM with chooser.
>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Wed, 02 Jun 2010 02:44:55 +0000
State-Changed-Why:
i can't reproduce this with modern xsrc / xorg.  did this go away for you?  i can't
see any potential issue with this or the old code, but i haven't seen other reports
of this crash.


From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/26998 CVS commit: xsrc/xfree/xc/programs/xdm
Date: Mon, 23 Dec 2013 23:14:22 +0000

 Module Name:	xsrc
 Committed By:	dholland
 Date:		Mon Dec 23 23:14:22 UTC 2013

 Modified Files:
 	xsrc/xfree/xc/programs/xdm: access.c

 Log Message:
 Don't crash if the local hostname doesn't resolve. PR 26998


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.8 -r1.2 xsrc/xfree/xc/programs/xdm/access.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: xsrc-manager->dholland
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Mon, 23 Dec 2013 23:20:37 +0000
Responsible-Changed-Why:
I found it


State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 23 Dec 2013 23:20:37 +0000
State-Changed-Why:
fixed, awaiting decisions about pullup
(it is fixed upstream in xorg xdm, only the ancient xfree sources are
affected)


State-Changed-From-To: open->pending-pullups
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 08 Sep 2015 04:51:06 +0000
State-Changed-Why:
pullup-6 #1324


From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/26998 CVS commit: [netbsd-6] xsrc/xfree/xc/programs/xdm
Date: Sun, 15 Nov 2015 17:44:01 +0000

 Module Name:	xsrc
 Committed By:	bouyer
 Date:		Sun Nov 15 17:44:01 UTC 2015

 Modified Files:
 	xsrc/xfree/xc/programs/xdm [netbsd-6]: access.c

 Log Message:
 Pull up following revision(s) (requested by dholland in ticket #1324):
 	xsrc/xfree/xc/programs/xdm/access.c: revision 1.2
 Don't crash if the local hostname doesn't resolve. PR 26998


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.8 -r1.1.1.8.14.1 xsrc/xfree/xc/programs/xdm/access.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 15 Nov 2015 21:52:54 +0000
State-Changed-Why:
pullups completed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.