Bug 1321698 - driver crash (SEGV) during SISUSBRefreshArea (num==0)
Summary: driver crash (SEGV) during SISUSBRefreshArea (num==0)
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-sisusb
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-29 00:24 UTC by Frank Ch. Eigler
Modified: 2016-12-20 19:41 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 19:41:04 UTC
Type: Bug


Attachments (Terms of Use)

Description Frank Ch. Eigler 2016-03-29 00:24:50 UTC
The sisusb_drv experiences a SEGV shortly after xorg startup.
It can initialize the screen of my dongle, but any real activity (such as a window manager starting up) brings it down.

When run under gdb supervision, the problem appears to be that the SISUSBRefreshArea function is called with a num==0 (empty region).  It is not prepared for that, and instead starts decrementing it and scribbling all over memory in a loop.

#0  SISUSBRefreshArea (pScrn=0x8688c0, num=-4, pbox=0x829c68 <nerror>)
    at sisusb_shadow.c:102
(gdb) frame 1
#1  0x000000000051e1ac in DamageReportDamage (pDamage=pDamage@entry=0xb64820, 
    pDamageRegion=pDamageRegion@entry=0xb64878) at damage.c:1913
1913	        (*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
(gdb) frame 2
#2  0x000000000051e9da in damageRegionProcessPending (pDrawable=pDrawable@entry=0xde5d60)
    at damage.c:293
293	                DamageReportDamage(pDamage, &pDamage->pendingDamage);

(gdb) frame 1
(gdb) p pDamageRegion
$14 = (RegionPtr) 0xb64878
(gdb) p *pDamageRegion
$15 = {extents = {x1 = 0, y1 = 0, x2 = 0, y2 = 0}, data = 0x829c40 <RegionEmptyData>}
(gdb) p *pDamageRegion->data
$16 = {size = 0, numRects = 0}


This wee little patch makes the driver work for me:


--- sisusb_shadow.c~	2012-06-06 07:05:19.000000000 -0400
+++ sisusb_shadow.c	2016-03-28 19:03:27.331991994 -0400
@@ -51,6 +51,9 @@
 {
     SISUSBPtr pSiSUSB = SISUSBPTR(pScrn);
 
+    if (num == 0)
+       return;
+
 #if 0
     if(pSiSUSB->IgnoreRefresh) return;
 #endif

Comment 1 Fedora End Of Life 2016-11-24 16:16:25 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2016-12-20 19:41:04 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.