Bug 2213748 (CVE-2023-3138) - CVE-2023-3138 libX11: InitExt.c can overwrite unintended portions of the Display structure if the extension request leads to a buffer overflow
Summary: CVE-2023-3138 libX11: InitExt.c can overwrite unintended portions of the Disp...
Keywords:
Status: NEW
Alias: CVE-2023-3138
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2213762 2213763 2215372
Blocks: 2213123
TreeView+ depends on / blocked
 
Reported: 2023-06-09 07:04 UTC by Marian Rehak
Modified: 2024-03-19 17:30 UTC (History)
2 users (show)

Fixed In Version: libX11 1.8.6
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2023:6497 0 None None None 2023-11-07 08:18:23 UTC
Red Hat Product Errata RHSA-2023:7029 0 None None None 2023-11-14 15:18:51 UTC
Red Hat Product Errata RHSA-2024:1088 0 None None None 2024-03-05 08:19:48 UTC
Red Hat Product Errata RHSA-2024:1417 0 None None None 2024-03-19 17:30:33 UTC

Description Marian Rehak 2023-06-09 07:04:56 UTC
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.

Comment 2 Guilherme de Almeida Suckevicz 2023-06-15 18:32:13 UTC
Created libX11 tracking bugs for this issue:

Affects: fedora-all [bug 2215372]

Comment 3 Niels De Graef 2023-06-19 15:38:15 UTC
(In reply to Marian Rehak from comment #0)
> 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.

Probably that link/commit should be

https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/304a654a0d57bf0f00d8998185f0360332cfa36c

Comment 5 errata-xmlrpc 2023-11-07 08:18:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:6497 https://access.redhat.com/errata/RHSA-2023:6497

Comment 6 errata-xmlrpc 2023-11-14 15:18:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:7029 https://access.redhat.com/errata/RHSA-2023:7029

Comment 9 errata-xmlrpc 2024-03-05 08:19:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

Via RHSA-2024:1088 https://access.redhat.com/errata/RHSA-2024:1088

Comment 10 errata-xmlrpc 2024-03-19 17:30:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Extended Update Support

Via RHSA-2024:1417 https://access.redhat.com/errata/RHSA-2024:1417


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