Bug 927220 (CVE-2013-7439) - VUL-0: CVE-2013-7439 : libX11,xorg-x11-libX11: buffer overflow in MakeBigReq macro
Summary: VUL-0: CVE-2013-7439 : libX11,xorg-x11-libX11: buffer overflow in MakeBigReq ...
Status: RESOLVED FIXED
Alias: CVE-2013-7439
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Deadline: 2015-07-10
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/115638/
Whiteboard: maint:running:61607:moderate maint:re...
Keywords:
Depends on:
Blocks: 927126
  Show dependency treegraph
 
Reported: 2015-04-15 08:26 UTC by Andreas Stieger
Modified: 2018-04-11 14:41 UTC (History)
5 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Stieger 2015-04-15 08:26:42 UTC
http://lists.x.org/archives/xorg-announce/2015-April/002561.html

X.Org Security Advisory:  April 14, 2015
Buffer overflow in MakeBigReq macro in libX11 prior to 1.6 [CVE-2013-7439]
==========================================================================

Description:
============

It's been brought to X.Org's attention that this commit:

http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=39547d600a13713e15429f49768e54c3173c828d

which was included in libX11 1.5.99.901 (1.6 RC1) and later releases fixed 
an issue which may be exploitable when X clients are rendering untrusted 
content, such as in web browsers.

Mitre has thus issued CVE-2013-7439 for tracking this vulnerability.
Further discussion is available in the oss-security thread starting at 
http://seclists.org/oss-sec/2015/q2/73 .

Note that as this affects a macro in a header file, all software using this
macro will need to be recompiled for the fix to take effect.  Since the
Xlibint.h header provides access to the internals of libX11, it should
not be directly accessed by most clients, but nearly all of the Xlib-based
extension libraries are affected, as are some third-party client libraries
and programs who have ill-advisedly relied on libX11 internals.

X.Org software known to use these macros includes:

        libXext
        libXfixes
        libXi
        libXp
        libXrandr
        libXrender
        libXv
        libXxf86misc
        xf86-video-vmware

Some uses of the macros in other software may be found at:
        http://codesearch.debian.net/results/SetReqLen
        http://codesearch.debian.net/results/MakeBigReq
but of course, only a search of your own code base will be exhaustive.

Affected Versions
=================

The off-by-one-word error in the amount of memory to copy was introduced
in the original integration of the BigRequests extension for X11R6.0:
http://cgit.freedesktop.org/~alanc/xc-historical/commit/?id=57ae039acec35ee7df4bc3f3c02abd957780b026
thus X.Org believes all versions of X11R6.x are affected, as are all versions
of the standalone libX11 prior to the libX11 1.6.0 release in June 2013.

Fixes
=====

As noted above, the fix is already available in this libX11 git commit:
        39547d600a13713e15429f49768e54c3173c828d
which is also included in libX11 1.6.0 and later module releases from X.Org,
however, for the fix to be effective, all software which references the
MakeBigReq() or SetReqLen() macros from Xlibint.h must be recompiled with
the new header.

--
        -Alan Coopersmith-              alan.coopersmith at oracle.com
          X.Org Security Response Team - xorg-security at lists.x.org




References:
https://bugzilla.redhat.com/show_bug.cgi?id=1209943
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-7439
http://seclists.org/oss-sec/2015/q2/81
http://www.debian.org/security/2015/dsa-3224
http://people.canonical.com/~ubuntu-security/cve/2013/CVE-2013-7439.html
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-7439
http://www.heise.de/newsticker/meldung/Alte-Xorg-Luecke-bedroht-haufenweise-Drittsoftware-2606536.html
Comment 1 Andreas Stieger 2015-04-15 08:41:47 UTC
SLE 12 GA libX11 1.6.2 not affected. Version is newer, code lines are fixed.
As all of SLE 12 GA was build with this, it is not affected with other packages.
Comment 2 Andreas Stieger 2015-04-15 09:01:13 UTC
SLE 11 xorg-x11-libX11 7.5 (libX11 1.1.5) affected.

Checking dependent packages for potential use of header macros, as they would need to be included as rebuilt packages in update as well.
Comment 3 Andreas Stieger 2015-04-15 09:03:45 UTC
openSUSE 13.2 libX11 1.6.2 not affected.
openSUSE 13.1 libX11 1.6.2 not affected.
Comment 4 Stefan Dirsch 2015-04-15 12:25:15 UTC
SLE11: 

packages to be fixed: 
- xorg-x11-libX11

packages to be rebuilt and released as well:
- xorg-x11-libXext
- xorg-x11-libXfixes
- xorg-x11-libs (libXi, libXrandr, libXxf86misc)
- xorg-x11-libXp
- xorg-x11-libXrender
- xorg-x11-libXv
- xorg-x11-driver-video (xf86-video-vmware)
Comment 5 Stefan Dirsch 2015-04-15 12:27:17 UTC
SLE10:

packages to be fixed and rebuilt:
- xorg-x11
Comment 7 Swamp Workflow Management 2015-04-15 22:00:14 UTC
bugbot adjusting priority
Comment 9 Stefan Dirsch 2015-04-16 08:18:53 UTC
Andreas, I need to add that I've only mentioned the affected packages coming from X.Org. 

I would prefer to leave it up to you/security team to extract any package source of sle <= 11 to grep for the usage of the affected macros.
Comment 10 Andreas Stieger 2015-04-17 12:54:50 UTC
(In reply to Stefan Dirsch from comment #9)
> Andreas, I need to add that I've only mentioned the affected packages coming
> from X.Org. 
> 
> I would prefer to leave it up to you/security team to extract any package
> source of sle <= 11 to grep for the usage of the affected macros.

My analysis is as follows:

SLE 11: 

packages to be fixed: 
- xorg-x11-libX11

packages to be rebuilt and released as well:
- xorg-x11-libXext
- xorg-x11-libXfixes
- xorg-x11-libs (libXi, libXrandr, libXxf86misc)
- xorg-x11-libXp
- xorg-x11-libXrender
- xorg-x11-libXv
- xorg-x11-driver-video (xf86-video-vmware)
- SDL


SLE 10:

packages to be fixed: 
- xorg-x11 

packages to be rebuilt and released as well:
- SDL
Comment 11 Stefan Dirsch 2015-04-20 09:57:00 UTC
sle11-sp3: SR#55684
sle11-sp4: SR#55688
sle11-sp1: SR#55686
sle10-sp4: SR#55690
Comment 13 Swamp Workflow Management 2015-04-24 09:16:38 UTC
An update workflow for this issue was started.
This issue was rated as low.
Please submit fixed packages until 2015-05-22.
https://swamp.suse.de/webswamp/wf/61607
Comment 16 Swamp Workflow Management 2015-06-26 08:03:51 UTC
An update workflow for this issue was started.
This issue was rated as moderate.
Please submit fixed packages until 2015-07-10.
When done, reassign the bug to security-team@suse.de.
https://swamp.suse.de/webswamp/wf/62128
Comment 17 Stefan Dirsch 2015-06-26 12:15:15 UTC
sle10:sp3: SR#61154 (for Teradata customer)
Comment 19 Viktor Kijasev 2015-07-16 08:47:26 UTC
Hello Andreas, Stefan

Here the guy have the reproducer:

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

" Peter Hutterer 2013-02-18 01:19:30 UTC

Confirmed and I have a reliable reproducer here. Requirement for the overrun is that the fixed-length bit of the request is aligned at the end of the dpy buffer."

Can we have the reproducer as well?
Comment 20 Andreas Stieger 2015-07-16 08:53:39 UTC
(In reply to Viktor Kijasev from comment #19)
> Here the guy have the reproducer:
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=56508
> 
> " Peter Hutterer 2013-02-18 01:19:30 UTC
> 
> Confirmed and I have a reliable reproducer here. Requirement for the overrun
> is that the fixed-length bit of the request is aligned at the end of the dpy
> buffer."
> 
> Can we have the reproducer as well?

We do not have it.
Comment 21 Viktor Kijasev 2015-07-20 05:50:23 UTC
Reproducer from Peter Huterer:

it's part of the XIT here:
http://cgit.freedesktop.org/xorg/test/xorg-integration-tests/tree/tests/lib/libX11.cpp#n59
Comment 22 Stefan Dirsch 2015-07-31 11:57:21 UTC
Viktor, xtest isn't easy to use. Please concentrate on regression tests instead.
Comment 23 Swamp Workflow Management 2015-08-03 09:09:20 UTC
SUSE-SU-2015:1334-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 927220
CVE References: CVE-2013-7439
Sources used:
SUSE Linux Enterprise Software Development Kit 11-SP4 (src):    xorg-x11-libX11-7.4-5.11.15.1
SUSE Linux Enterprise Software Development Kit 11-SP3 (src):    xorg-x11-libX11-7.4-5.11.15.1
SUSE Linux Enterprise Server for VMWare 11-SP3 (src):    xorg-x11-libX11-7.4-5.11.15.1
SUSE Linux Enterprise Server 11-SP4 (src):    xorg-x11-libX11-7.4-5.11.15.1
SUSE Linux Enterprise Server 11-SP3 (src):    xorg-x11-libX11-7.4-5.11.15.1
SUSE Linux Enterprise Server 11-SP2-LTSS (src):    xorg-x11-libX11-7.4-5.11.15.1
SUSE Linux Enterprise Server 11-SP1-LTSS (src):    xorg-x11-libX11-7.4-5.11.15.1
SUSE Linux Enterprise Desktop 11-SP4 (src):    xorg-x11-libX11-7.4-5.11.15.1
SUSE Linux Enterprise Desktop 11-SP3 (src):    xorg-x11-libX11-7.4-5.11.15.1
SUSE Linux Enterprise Debuginfo 11-SP3 (src):    xorg-x11-libX11-7.4-5.11.15.1
Comment 25 Sebastian Krahmer 2016-11-30 09:48:55 UTC
Cant this bug be closed as resolved?
Comment 26 Stefan Dirsch 2016-11-30 10:50:30 UTC
Well, I'm afraid maintenance/release team needs to decide, whether we want to rebuild affected packages and push them to our update repo. Some of the affected packages meanwhile have seen updates due to different security issues.
Comment 28 Marcus Meissner 2016-12-18 19:51:18 UTC
we meanwhile also pushed quite some of the other X packages. so we can consider this resolved