CVE-2007-6427: Critical severity X.Org X Server vulnerability

Published Dec 6, 2007
·
Updated

iDefense reported a vulnerability discovered by regenrecht affecting Xorg X server:

DESCRIPTION

Local exploitation of a memory corruption vulnerability in the X.Org X server, as included in various vendors' operating system distributions, could allow an attacker to execute arbitrary code with the privileges of the X server, typically root.

The vulnerable code exists within multiple functions in the XInput extension, and occurs when swapping the byte order of client requests. By claiming to be sending integer data in the opposite byte order of the server, the client can cause the server to swap the byte order of a request. The number of bytes swapped can be controlled by the client, and is not properly validated by the server. This results in the corruption of heap memory located after the client's request data.

The vulnerable code is shown below:

From Xi/chgkmap.c:SProcXChangeDeviceKeyMapping()

87 REQUESTATLEASTSIZE(xChangeDeviceKeyMappingReq);

88 p = (long )&stuff[1];

89 count = stuff->keyCodes stuff->keySymsPerKeyCode;

90 for (i = 0; i < count; i++) {

91 swapl(p, n);

92 p++;

93 }

On line 89, the count value is calculated by multiplying two values taken directly from the client request. The for loop then proceeds to swap the byte order of the request data, and eventually of other heap memory as well.

Duplicate vulnerabilities are also found in the following functions:

Xi/chgprop.c, SProcXChangeDeviceDontPropagateList()

Xi/grabdev.c, SProcXGrabDevice()

Xi/grabdevb.c, SProcXGrabDeviceButton()

Xi/grabdevk.c, SProcXGrabDeviceKey()

Xi/selectev.c, SProcXSelectExtensionEvent()

Xi/sendexev.c, SProcXSendExtensionEvent()

ANALYSIS

Exploitation allows an attacker to execute arbitrary code with root privileges. In order to exploit this vulnerability, an attacker must be able to send commands to an affected X server. This typically requires access to the console or access to the same account as a user who is on the console. One method of gaining the required access is to remotely exploit a vulnerability in, for example, a graphical web browser. This would then allow an attacker to exploit this vulnerability and elevate their privileges to root.

If an X Server is configured to listen for TCP based client connections, and a client is granted access to create sessions (via the xhosts file), then the vulnerability can be exploited remotely.

WORKAROUND

iDefense is currently unaware of any workarounds for this issue. The XInput extension is normally compiled into the X Server; as such, it's not possible to disable it from being loaded in the configuration file.

Other sources

The XInput extension in X.Org Xserver before 1.4.1 allows context-dependent attackers to execute arbitrary code via requests related to byte swapping and heap corruption within multiple functions, a different vulnerability than CVE-2007-4990.

Affected Software

23 affected componentsFixes available
X.Org X Server<1.4.1
Canonical Ubuntu Linux=6.06
Canonical Ubuntu Linux=6.10
Canonical Ubuntu Linux=7.04
Canonical Ubuntu Linux=7.10
Debian Debian Linux=3.1
Debian Debian Linux=4.0
Apple iOS and macOS<10.4.11
Apple iOS and macOS>=10.5.0<10.5.2
Fedoraproject Fedora=7
Fedoraproject Fedora=8
openSUSE openSUSE=10.2
openSUSE openSUSE=10.3
SUSE Linux=10.1
SUSE Linux Enterprise Desktop=9
SUSE Linux Enterprise Desktop=10
SUSE Linux Enterprise Desktop=10-sp1
SUSE Linux Enterprise Server=8
SUSE Linux Enterprise Server=9
SUSE Linux Enterprise Server=10-sp1
SUSE Linux Enterprise Software Development Kit=10-sp1
SUSE Open Enterprise Server
redhat/1.3.0.0<39.
39.

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/1.3.0.0 to a version that resolves this vulnerability.

    Fixed in 39.
  2. Upgrade

    Upgrade X.Org X Server to a version that resolves this vulnerability.

    Fixed in 1.4.1

Event History

Dec 6, 2007
Data Sourced
via Red Hat·11:45 AM
DescriptionSeverityAffected Software
Jan 18, 2008
CVE Published
via MITRE·10:00 PM
Data Sourced
via MITRE·10:00 PM
Description
Data Sourced
11:00 PM
DescriptionWeaknessAffected Software
Data Sourced
via NVD·11:00 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 19, 2008
CVE Published
via MITRE·03:00 AM
Nov 20, 2020
Data Sourced
04:47 PM
RemedySeverity

Frequently Asked Questions

1

What is the severity of CVE-2007-6427?

CVE-2007-6427 has a high severity rating due to its potential to allow arbitrary code execution.

2

How do I fix CVE-2007-6427?

To fix CVE-2007-6427, upgrade to X.Org Xserver version 1.4.1 or later.

3

What systems are affected by CVE-2007-6427?

CVE-2007-6427 affects various systems including older versions of X.org, Ubuntu, Debian, macOS, Fedora, and openSUSE.

4

Can CVE-2007-6427 be exploited remotely?

Yes, CVE-2007-6427 can be exploited by context-dependent attackers remotely if they can send specific requests.

5

Is CVE-2007-6427 related to any other vulnerabilities?

CVE-2007-6427 is different from CVE-2007-4990, although both involve vulnerabilities in the XInput extension.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203