Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2000 07:39:25 -0500 (EST)
From:      brianmcd@columbus.rr.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/23500: XFree86 3.3.6 xdm dies with signal 11 on startup.
Message-ID:  <20001212123925.01B3A5DA2@galatea.internal.lustygrapes.net>
Resent-Message-ID: <200012121240.eBCCe3E14237@freefall.freebsd.org>

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

>Number:         23500
>Category:       ports
>Synopsis:       XFree86 3.3.6 xdm dies with signal 11 on startup.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 12 04:40:02 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Brian McDonald
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
Smartpipes, Inc.
>Environment:

    XFree86 3.3.6 installed from /usr/ports/x11/XFree86.
    Ports tree built via cvsup on September 16th, 2000.

>Description:

    A few weeks ago, xdm started dying with signal 11 shortly after starting
    the X server.  This only happened when xdm was started from init.
    Looking at the core files revealed there was a segfault in strcpy().
    After debugging the problem, three typos were found in one of
    the XFree86 header files which corrupted the return from getpwuid,
    causing the GetRootDirName function to segfault during initialization of
    the screen database.

>How-To-Repeat:

    This problem is related to the data in your password file, specifically
    your login class and gecos informaiton.  I'm not sure exactly what
    combination of values led to the problem.  It's probably why it hasn't
    been found until now.

	With my password data, the problem could be repeated at will by running
	xdm from init.

>Fix:

    Add this file to x11/XFree86/patches.  OLD PORTS TREE ALERT!  I think this
    goes in files/ on new ports trees - I don't have a box I can test
    this on right now, although I did verify with a friend/cvsweb that the
    port is still broken.

--- include/Xos_r.h.orig        Tue Dec 12 00:07:42 2000
+++ include/Xos_r.h     Tue Dec 12 00:09:15 2000
@@ -248,7 +248,7 @@
     ((p).len = strlen((p).pwp->pw_passwd)), \
     strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd), \
     \
-    ((p).pws.pw_class = (p).pws.pw_class + (p).len + 1), \
+    ((p).pws.pw_class = (p).pws.pw_passwd + (p).len + 1), \
     ((p).len = strlen((p).pwp->pw_class)), \
     strcpy((p).pws.pw_class, (p).pwp->pw_class), \
     \
@@ -256,7 +256,7 @@
     ((p).len = strlen((p).pwp->pw_gecos)), \
     strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos), \
     \
-    ((p).pws.pw_dir = (p).pws.pw_class + (p).len + 1), \
+    ((p).pws.pw_dir = (p).pws.pw_gecos + (p).len + 1), \
     ((p).len = strlen((p).pwp->pw_dir)), \
     strcpy((p).pws.pw_dir, (p).pwp->pw_dir), \
     \
@@ -289,7 +289,7 @@
     ((p).len = strlen((p).pwp->pw_gecos)), \
     strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos), \
     \
-    ((p).pws.pw_dir = (p).pws.pw_comment + (p).len + 1), \
+    ((p).pws.pw_dir = (p).pws.pw_gecos + (p).len + 1), \
     ((p).len = strlen((p).pwp->pw_dir)), \
     strcpy((p).pws.pw_dir, (p).pwp->pw_dir), \
     \

    I've already filed a bug report with XFree86.

Thanks!

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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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