Bug 649810 - Integer overflow for dashed lines longer than 46340
Summary: Integer overflow for dashed lines longer than 46340
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xorg-x11-server
Version: 5.5
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Adam Jackson
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On: 649809 649811
Blocks: 726826
TreeView+ depends on / blocked
 
Reported: 2010-11-04 15:51 UTC by Olivier Fourdan
Modified: 2018-11-26 19:33 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 649809
Environment:
Last Closed: 2012-02-21 03:11:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Reproducer program (1.93 KB, text/plain)
2010-11-04 15:51 UTC, Olivier Fourdan
no flags Details
Proposed patch (1.09 KB, patch)
2010-11-04 15:51 UTC, Olivier Fourdan
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 31093 0 None None None Never
Red Hat Product Errata RHSA-2012:0303 0 normal SHIPPED_LIVE Low: xorg-x11-server security and bug fix update 2012-02-21 07:24:37 UTC

Description Olivier Fourdan 2010-11-04 15:51:09 UTC
Created attachment 457833 [details]
Reproducer program

+++ This bug was initially created as a clone of Bug #649809 +++

Description of problem:

Lines of length greater than 46340 can be drawn with one of the coordinates being negative. However for dashed lines, miPolyBuildPoly() overflows the "int" type when setting up edges for a section of the dashed line. This results in the dashed segments not being drawn at all.

Version-Release number of selected component (if applicable):

xorg-x11-server-1.7.7-26.el6

How reproducible:

Always

Steps to Reproduce:

1. Save attached reproducer program as line.c
2. Build the rproducer program with
   $ gcc -DBREAK -o line line.c -lX11
3. Run the test program in X11
   $ ./line
4. Right-click within the window created by the test application
  
Actual results:

No dotted line is displayed

Expected results:

A dotted line is shown

Additional info:

Remove the "-DBREAK"  from step #2 to get the expected result. The difference is that defining BREAK sets y2 to 31341 causing the overflow.

This has been reported upstream as bug 31093:

  https://bugs.freedesktop.org/show_bug.cgi?id=31093

The patch proposed by Siddhesh Poyarekar has been reviewed by Keith Packard:

  http://lists.x.org/archives/xorg-devel/2010-October/014559.html

Comment 1 Olivier Fourdan 2010-11-04 15:51:46 UTC
Created attachment 457834 [details]
Proposed patch

Patch by Siddhesh Poyarekar proposed in upstream bug fd.o #31093

Comment 2 Matěj Cepl 2010-11-12 21:06:49 UTC
Actually, on RHEL-5 it is even more complicated than on Fedora 14 and RHEL 6. While there the bug is reproducable with results exactly as described in the comment 0, it is slightly different here. When -DBREAK is present and I right-clicked on the window, there was some delay when nothing happened and then continuous (uninterrupted) line was drawn in the place where without -DBREAK interrupted line was.

Comment 3 Matěj Cepl 2010-11-13 19:51:39 UTC
Hmm, next time I tried it didn't show anything like with other versions of RHEL.

Comment 5 RHEL Program Management 2011-05-31 14:38:41 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 8 Adam Jackson 2011-08-17 19:08:31 UTC
3564178 build (dist-5E-qu-candidate, /cvs/dist:rpms/xorg-x11-server/RHEL-5:xorg-x11-server-1_1_1-48_82_el5) completed successfully

MODIFIED

Comment 11 errata-xmlrpc 2012-02-21 03:11:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0303.html


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