<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=6048&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / X.Org Security Advisory: Issues in libX11 prior to 1.8.7 & libXpm]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=6048</link>
		<description><![CDATA[The most recent posts in X.Org Security Advisory: Issues in libX11 prior to 1.8.7 & libXpm.]]></description>
		<lastBuildDate>Tue, 03 Oct 2023 18:32:05 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[X.Org Security Advisory: Issues in libX11 prior to 1.8.7 & libXpm]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=44659#p44659</link>
			<description><![CDATA[<p>Hello:</p><p>Just got this in my inbox.</p><p>Good to see that things &#039;X11&#039; are rolling along steadily.</p><p>Best,</p><p>A.</p><p>***********************************************************************************</p><p>X.Org Security Advisory:&#160; October 3, 2023</p><p>Issues in libX11 prior to 1.8.7 &amp; libXpm prior to 3.5.17<br />========================================================</p><p>Multiple issues have been found in the libX11 &amp; libXpm libraries published<br />by X.Org for which we are releasing security fixes in libX11 1.8.7 &amp;<br />libXpm 3.5.17.</p><p>The first issue (CVE-2023-43785) can be triggered by connecting to an<br />X server that sends specially crafted replies to X11 protocol requests.</p><p>The other 4 issues can be triggered by opening specially crafted XPM format<br />image files via libXpm.&#160; Two of the four issues have root causes in the<br />libX11 library and are fixed there, but patches have also been applied<br />to libXpm to avoid passing the invalid data to libX11 in the first place.</p><p>----------------------------------------------------------------------------</p><p>1) CVE-2023-43785 libX11: out-of-bounds memory access in _XkbReadKeySyms()</p><p>Introduced in: X11R6.1 [released March 1996]<br />Fixed in: libX11 1.8.7<br />Found by: Gregory James DUCK<br />Fixed by: Alan Coopersmith of Oracle Solaris Engineering</p><p>When libX11 is processing the reply from the X server to the XkbGetMap<br />request, if it detected the number of symbols in the new map was less<br />than the size of the buffer it had allocated, it always added room for<br />128 more symbols, instead of the actual size needed. While the<br />_XkbReadBufferCopyKeySyms() helper function returned an error if asked<br />to copy more keysyms into the buffer than there was space allocated for,<br />the caller never checked for an error and assumed the full set of keysyms<br />was copied into the buffer and could then try to read out of bounds when<br />accessing the buffer.&#160; libX11 1.8.7 has been patched to both fix the size<br />allocated and check for error returns from _XkbReadBufferCopyKeySyms().</p><p>Fix:<br /><a href="https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/6858d468d9ca55fb4c5fd70b223dbc78a3358a7f" rel="nofollow">https://gitlab.freedesktop.org/xorg/lib … 78a3358a7f</a></p><p>2) CVE-2023-43786 libX11: stack exhaustion from infinite recursion<br />&#160; &#160;in PutSubImage()</p><p>Introduced in: X11R2 [released Feb. 1988]<br />Fixed in: libX11 1.8.7<br />Found by: Yair Mizrahi of the JFrog Vulnerability Research team<br />Fixed by: Alan Coopersmith of Oracle Solaris Engineering</p><p>When splitting a single line of pixels into chunks that fit in a single<br />request (not using the BIG-REQUESTS extension) to send to the X server,<br />the code did not take into account the number of bits per pixel, so would<br />just loop forever finding it needed to send more pixels than fit in the<br />given request size and not breaking them down into a small enough chunk to<br />fit.&#160; An XPM file was provided that triggered this bug when loaded via<br />libXpm&#039;s XpmReadFileToPixmap() function, which in turn calls XPutImage()<br />and hit this bug.</p><p>Further hardening to prevent similar bugs was done in libX11 by making<br />XPutImage() clip images to the maximum X protocol pixmap size (limited<br />by the use of unsigned 16-bit integers for height &amp; width) when writing<br />to X pixmaps, and by making XCreatePixmap() generate X errors if a<br />height or width was specified that did not fit into an unsigned 16-bit<br />integer.&#160; In libXpm, hardening was done to return error codes for any<br />call that would have passed out-of-bounds width or height values to<br />XCreatePixmap().</p><p>Fix:<br /><a href="https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/204c3393c4c90a29ed6bef64e43849536e863a86" rel="nofollow">https://gitlab.freedesktop.org/xorg/lib … 536e863a86</a></p><p>Hardening:<br /><a href="https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/73a37d5f2fcadd6540159b432a70d80f442ddf4a" rel="nofollow">https://gitlab.freedesktop.org/xorg/lib … 0f442ddf4a</a><br /><a href="https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/b4031fc023816aca07fbd592ed97010b9b48784b" rel="nofollow">https://gitlab.freedesktop.org/xorg/lib … 0b9b48784b</a><br /><a href="https://gitlab.freedesktop.org/xorg/lib/libxpm/-/commit/84fb14574c039f19ad7face87eb9acc31a50701c" rel="nofollow">https://gitlab.freedesktop.org/xorg/lib … c31a50701c</a></p><p>3) CVE-2023-43787 libX11: integer overflow in XCreateImage() leading to<br />&#160; &#160;a heap overflow</p><p>Introduced in: X11R2 [released Feb. 1988]<br />Fixed in: libX11 1.8.7<br />Found by: Yair Mizrahi of the JFrog Vulnerability Research team<br />Fixed by: Yair Mizrahi of the JFrog Vulnerability Research team</p><p>When creating an image, there was no validation that the multiplication<br />of the caller-provided width by the visual&#039;s bits_per_pixel did not<br />overflow and thus result in the allocation of a buffer too small to hold<br />the data that would be copied into it.&#160; An XPM file was provided that<br />triggered this bug when loaded via libXpm&#039;s XpmReadFileToPixmap() function,<br />which in turn calls XCreateImage() and hit this bug.</p><p>Further hardening to prevent similar bugs was done in libXpm to return<br />error codes for any call to XCreateImage() that would have resulted in<br />this calculation overflowing.</p><p>Fix:<br /><a href="https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/7916869d16bdd115ac5be30a67c3749907aea6a0" rel="nofollow">https://gitlab.freedesktop.org/xorg/lib … 9907aea6a0</a></p><p>Hardening:<br /><a href="https://gitlab.freedesktop.org/xorg/lib/libxpm/-/commit/91f887b41bf75648df725a4ed3be036da02e911e" rel="nofollow">https://gitlab.freedesktop.org/xorg/lib … 6da02e911e</a></p><p>4) CVE-2023-43788 libXpm: out of bounds read in XpmCreateXpmImageFromBuffer()</p><p>Introduced in: unknown - prior to xpm-3.4k [released 1998]<br />Fixed in: libXpm 3.5.17<br />Found by: Alan Coopersmith of Oracle Solaris Engineering<br />Fixed by: Alan Coopersmith of Oracle Solaris Engineering</p><p>When the test case for CVE-2022-46285 (fixed in libXpm 3.5.15) was run<br />with the Address Sanitizer enabled, it found an out-of-bounds read in<br />ParseComment() when reading from a memory buffer instead of a file, as<br />it continued to look for the closing comment marker past the end of the<br />buffer.</p><p>Fix:<br /><a href="https://gitlab.freedesktop.org/xorg/lib/libxpm/-/commit/2fa554b01ef6079a9b35df9332bdc4f139ed67e0" rel="nofollow">https://gitlab.freedesktop.org/xorg/lib … f139ed67e0</a></p><p>5) CVE-2023-43789 libXpm: out of bounds read on XPM with corrupted colormap</p><p>Introduced in: unknown - prior to xpm-3.4k [released 1998]<br />Fixed in: libXpm 3.5.17<br />Found by: Alan Coopersmith of Oracle Solaris Engineering<br />Fixed by: Alan Coopersmith of Oracle Solaris Engineering</p><p>Fuzzing with clang&#039;s -fsanitize/libfuzzer generated an XPM file with a<br />corrupted colormap section which caused libXpm to read out of bounds.</p><p>Fix:<br /><a href="https://gitlab.freedesktop.org/xorg/lib/libxpm/-/commit/7e21cb63b9a1ca760a06cc4cd9b19bbc3fcd8f51" rel="nofollow">https://gitlab.freedesktop.org/xorg/lib … bc3fcd8f51</a></p><p>----------------------------------------------------------------------------</p><p>X.Org thanks all of those who reported and fixed these issues, and those<br />who helped with the review and release of this advisory and these fixes.</p><p>The X.Org security team would like to take this opportunity to remind X client<br />authors that current best practices suggest separating code that requires<br />privileges from the GUI, to reduce the risk of issues like CVE-2023-43785.</p><p>-- <br />&#160; &#160; &#160;-Alan Coopersmith-&#160; &#160; &#160; &#160; &#160; &#160; &#160; alan.coopersmith@oracle.com<br />&#160; &#160; &#160; &#160;X.Org Security Response Team - xorg-security@lists.x.org</p><p>-- <br />&#160; &#160; &#160; &#160; -Alan Coopersmith-&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;alan.coopersmith@oracle.com<br />&#160; &#160; &#160; &#160; &#160;Oracle Solaris Engineering - <a href="https://blogs.oracle.com/solaris" rel="nofollow">https://blogs.oracle.com/solaris</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Tue, 03 Oct 2023 18:32:05 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=44659#p44659</guid>
		</item>
	</channel>
</rss>
