CVE-2023-3138: Buffer Overflow

Published Jun 9, 2023
·
Updated

A vulnerability was found in libX11. The security flaw occurs because the functions in src/InitExt.c in libX11 do not check that the values provided for the Request, Event, or Error IDs are within the bounds of the arrays that those functions write to, using those IDs as array indexes. They trust that they were called with values provided by an Xserver adhering to the bounds specified in the X11 protocol, as all X servers provided by X.Org do. As the protocol only specifies a single byte for these values, an out-of-bounds value provided by a malicious server (or a malicious proxy-in-the-middle) can only overwrite other portions of the Display structure and not write outside the bounds of the Display structure itself, possibly causing the client to crash with this memory corruption.

Other sources

The functions in src/InitExt.c in libX11 prior to 1.8.6 do not check that the values provided for the Request, Event, or Error IDs are within the bounds of the arrays that those functions write to, using those IDs as array indexes. Instead they trusted that they were called with values provided by an Xserver that was adhering to the bounds specified in the X11 protocol, as all X servers provided by X.Org do.

As the protocol only specifies a single byte for these values, an out-of-bounds value provided by a malicious server (or a malicious proxy-in-the-middle) can only overwrite other portions of the Display structure and not write outside the bounds of the Display structure itself. Testing has found it is possible to at least cause the client to crash with this memory corruption.

This is fixed in: https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/TBD which is included in the libX11 1.8.6 release issued today.

X.Org thanks Gregory James Duck for reporting this issue to our security team.

Red Hat

X.Org libX11 is vulnerable to a denial of service, caused by a buffer overflow in the functions in src/InitExt.c. By sending a specially crafted request, a remote attacker could exploit this vulnerability to cause a denial of service condition.

IBM

Affected Software

6 affected componentsFixes available
redhat/libX11<1.8.6
1.8.6
X.Org libX11<1.8.6
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
IBM Security Verify Governance, Identity Manager software component<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager virtual appliance component<=ISVG 10.0.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 1.8.6
  2. Upgrade

    Upgrade libX11 to a version that resolves this vulnerability.

    Fixed in 1.8.6

Event History

Jun 28, 2023
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Data Sourced
via NVD·09:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2023-3138?

CVE-2023-3138 is a vulnerability found in libX11 that allows attackers to write arbitrary values to arrays, potentially leading to remote code execution or denial of service.

2

How does the vulnerability in libX11 (CVE-2023-3138) occur?

The vulnerability occurs because certain functions in src/InitExt.c in libX11 do not properly check the bounds of array indexes.

3

What is the severity rating of CVE-2023-3138?

CVE-2023-3138 has a severity rating of 7.5 (High).

4

Which software versions are affected by CVE-2023-3138?

X.Org libX11 versions up to 1.8.6, Redhat Enterprise Linux 8.0, and Redhat Enterprise Linux 9.0 are affected by CVE-2023-3138.

5

How can I fix the vulnerability in libX11 (CVE-2023-3138)?

To fix the vulnerability, it is recommended to update to a patched version of libX11 as provided by the vendor or project maintainers.

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