Bug 987495

Summary: nullpointer dereference causes xorg-server segfault when nouveau DRI driver is loaded
Product: Red Hat Enterprise Linux 6 Reporter: Martin Schuppert <mschuppe>
Component: mesaAssignee: Dave Airlie <airlied>
Status: CLOSED DUPLICATE QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: tpelka
Target Milestone: rc   
Target Release: 6.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 862466 Environment:
Last Closed: 2013-11-25 15:25:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
upstream patch none

Description Martin Schuppert 2013-07-23 13:53:41 UTC
Description of problem:
Application can crash Xorg when the nouveau DRI driver is loaded. This is due to a nullpointer dereference.

Upstream BUG:
https://bugs.freedesktop.org/show_bug.cgi?id=61947

Upstream bug 61947 is fixed in mesa 9.1.2. This bug causes a crash in LabVIEW when dealing with the 3D Math Plot controls. The fix does stop the crash from happening in LabVIEW and restarting X. Upstream bug mention same thing using Chromium.

Version-Release number of selected component (if applicable):
mesa-dri-drivers-9.0-0.8.el6_4.3.x86_64 

mesa-20120924/src/mesa/drivers/dri/nouveau/nouveau_driver.c:
     69                 __DRIdri2LoaderExtension *dri2 = screen->dri2.loader;
     70                 __DRIdrawable *drawable = nctx->dri_context->driDrawablePriv;
     71 
     72                 dri2->flushFrontBuffer(drawable, drawable->loaderPrivate);
     73         }
     74 }

How reproducible:
always

Steps to Reproduce:


Actual results:
crash

Expected results:
no crash

Additional info:
* Upstream patch:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=17f1cb1d99e66227d1e05925ef937643f5c1089a

--- Mesa-9.1/src/mesa/drivers/dri/nouveau/nouveau_driver.c.orig	2013-03-05 22:45:04.381790793 +0000
+++ Mesa-9.1/src/mesa/drivers/dri/nouveau/nouveau_driver.c	2013-03-05 22:47:45.307338871 +0000
@@ -69,7 +69,9 @@
 		__DRIdri2LoaderExtension *dri2 = screen->dri2.loader;
 		__DRIdrawable *drawable = nctx->dri_context->driDrawablePriv;
 
-		dri2->flushFrontBuffer(drawable, drawable->loaderPrivate);
+		if (drawable && drawable->loaderPrivate) {
+			dri2->flushFrontBuffer(drawable, drawable->loaderPrivate);
+		}
 	}
 }

* Bug 862466 - [abrt] firefox-15.0.1-1.fc17: nouveau_flush: Process /usr/lib/firefox/firefox was killed by signal 11 (SIGSEGV)

Comment 2 Martin Schuppert 2013-07-23 13:56:55 UTC
Created attachment 777332 [details]
upstream patch

Comment 4 RHEL Program Management 2013-10-14 03:03:29 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.