Bug 5719

Summary: xorg server segfaults upon startup
Product: xorg Reporter: Thomas Koeller <thomas>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: high Keywords: patch
Version: 7.0.0   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Thomas Koeller 2006-01-25 12:01:00 UTC
After building and installing the modular X11R7 tree, I found that the Xorg   
server segfaults immediatly. Debugging the server I found that the getifaddrs()  
function returned entries with ifa_addr == NULL. The server tried to 
dereference the NULL pointer and crashed. The patch below fixes the problem. 
 
My system is running Linux (kernel 2.6.15, glibc-2.3.6). 
 
 
--- xorg-server-X11R7.0-1.0.1-orig/os/access.c	2005-11-08 07:33:30.000000000 
+0100 
+++ xorg-server-X11R7.0-1.0.1/os/access.c	2006-01-25 01:37:50.000000000 
+0100 
@@ -975,6 +975,8 @@ DefineSelf (int fd) 
 	return; 
     } 
     for (ifr = ifap; ifr != NULL; ifr = ifr->ifa_next) { 
+        if (!ifr->ifa_addr) 
+		continue; 
 #ifdef DNETCONN 
 	if (ifr->ifa_addr.sa_family == AF_DECnet)  
 	    continue;
Comment 1 Alan Coopersmith 2006-01-25 12:15:16 UTC

*** This bug has been marked as a duplicate of 5218 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.