Compare commits
No commits in common. "7d11bec62cdb777a8e768b58d3004c698d2f6f48" and "74354951a57454016b95af95cb204874a708665b" have entirely different histories.
7d11bec62c
...
74354951a5
56
backport-CVE-2022-3554.patch
Normal file
56
backport-CVE-2022-3554.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 1d11822601fd24a396b354fa616b04ed3df8b4ef Mon Sep 17 00:00:00 2001
|
||||
From: "Thomas E. Dickey" <dickey@invisible-island.net>
|
||||
Date: Tue, 4 Oct 2022 18:26:17 -0400
|
||||
Subject: [PATCH] fix a memory leak in XRegisterIMInstantiateCallback
|
||||
|
||||
Analysis:
|
||||
|
||||
_XimRegisterIMInstantiateCallback() opens an XIM and closes it using
|
||||
the internal function pointers, but the internal close function does
|
||||
not free the pointer to the XIM (this would be done in XCloseIM()).
|
||||
|
||||
Report/patch:
|
||||
|
||||
Date: Mon, 03 Oct 2022 18:47:32 +0800
|
||||
From: Po Lu <luangruo@yahoo.com>
|
||||
To: xorg-devel@lists.x.org
|
||||
Subject: Re: Yet another leak in Xlib
|
||||
|
||||
For reference, here's how I'm calling XRegisterIMInstantiateCallback:
|
||||
|
||||
XSetLocaleModifiers ("");
|
||||
XRegisterIMInstantiateCallback (compositor.display,
|
||||
XrmGetDatabase (compositor.display),
|
||||
(char *) compositor.resource_name,
|
||||
(char *) compositor.app_name,
|
||||
IMInstantiateCallback, NULL);
|
||||
|
||||
and XMODIFIERS is:
|
||||
|
||||
@im=ibus
|
||||
|
||||
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=1d11822601fd24a396b354fa616b04ed3df8b4ef
|
||||
---
|
||||
modules/im/ximcp/imInsClbk.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/modules/im/ximcp/imInsClbk.c b/modules/im/ximcp/imInsClbk.c
|
||||
index 95b379cb..c10e347f 100644
|
||||
--- a/modules/im/ximcp/imInsClbk.c
|
||||
+++ b/modules/im/ximcp/imInsClbk.c
|
||||
@@ -212,6 +212,9 @@ _XimRegisterIMInstantiateCallback(
|
||||
if( xim ) {
|
||||
lock = True;
|
||||
xim->methods->close( (XIM)xim );
|
||||
+ /* XIMs must be freed manually after being opened; close just
|
||||
+ does the protocol to deinitialize the IM. */
|
||||
+ XFree( xim );
|
||||
lock = False;
|
||||
icb->call = True;
|
||||
callback( display, client_data, NULL );
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,17 +1,6 @@
|
||||
From f8b0946c5594728ce7e1cd04552acce05571cd4e Mon Sep 17 00:00:00 2001
|
||||
From: leeffo <leeffo@yeah.net>
|
||||
Date: Wed, 12 Apr 2023 10:40:48 +0800
|
||||
Subject: [PATCH] dont forward keycode 0
|
||||
|
||||
---
|
||||
modules/im/ximcp/imDefFlt.c | 2 +-
|
||||
modules/im/ximcp/imDefLkup.c | 24 ++++++++++++++++++++++++
|
||||
2 files changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/im/ximcp/imDefFlt.c b/modules/im/ximcp/imDefFlt.c
|
||||
index 44cc688..f89d2cb 100644
|
||||
--- a/modules/im/ximcp/imDefFlt.c
|
||||
+++ b/modules/im/ximcp/imDefFlt.c
|
||||
diff -up libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx libX11-1.6.3/modules/im/ximcp/imDefFlt.c
|
||||
--- libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx 2015-03-09 18:28:45.000000000 -0400
|
||||
+++ libX11-1.6.3/modules/im/ximcp/imDefFlt.c 2015-03-10 12:32:31.912149644 -0400
|
||||
@@ -142,7 +142,7 @@ _XimProtoKeypressFilter(
|
||||
{
|
||||
Xim im = (Xim)ic->core.im;
|
||||
@ -21,11 +10,10 @@ index 44cc688..f89d2cb 100644
|
||||
_XimPendingFilter(ic);
|
||||
UNMARK_FABRICATED(im);
|
||||
return NOTFILTERD;
|
||||
diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c
|
||||
index dd1adf5..61f9c95 100644
|
||||
--- a/modules/im/ximcp/imDefLkup.c
|
||||
+++ b/modules/im/ximcp/imDefLkup.c
|
||||
@@ -333,6 +333,17 @@ _XimForwardEvent(
|
||||
diff -up libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx libX11-1.6.3/modules/im/ximcp/imDefLkup.c
|
||||
--- libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx 2015-03-09 18:28:45.000000000 -0400
|
||||
+++ libX11-1.6.3/modules/im/ximcp/imDefLkup.c 2015-03-10 12:32:31.911149637 -0400
|
||||
@@ -332,6 +332,17 @@ _XimForwardEvent(
|
||||
XEvent *ev,
|
||||
Bool sync)
|
||||
{
|
||||
@ -43,7 +31,7 @@ index dd1adf5..61f9c95 100644
|
||||
#ifdef EXT_FORWARD
|
||||
if (((ev->type == KeyPress) || (ev->type == KeyRelease)))
|
||||
if (_XimExtForwardKeyEvent(ic, (XKeyEvent *)ev, sync))
|
||||
@@ -605,6 +616,19 @@ _XimUnregCommitInfo(
|
||||
@@ -604,6 +615,19 @@ _XimUnregCommitInfo(
|
||||
Xfree(info->keysym);
|
||||
ic->private.proto.commit_info = info->next;
|
||||
Xfree(info);
|
||||
@ -63,6 +51,3 @@ index dd1adf5..61f9c95 100644
|
||||
return;
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
diff -Naru libX11-1.7.2/src/xcb_io.c libX11-1.7.2-sw/src/xcb_io.c
|
||||
--- libX11-1.7.2/src/xcb_io.c 2021-06-06 16:48:53.000000000 +0000
|
||||
+++ libX11-1.7.2-sw/src/xcb_io.c 2022-09-01 03:24:00.479452203 +0000
|
||||
@@ -542,7 +542,7 @@
|
||||
static const xReq dummy_request;
|
||||
static char const pad[3];
|
||||
struct iovec vec[3];
|
||||
- uint64_t requests;
|
||||
+ unsigned long requests;
|
||||
uint64_t dpy_request;
|
||||
_XExtension *ext;
|
||||
xcb_connection_t *c = dpy->xcb->connection;
|
||||
@@ -563,7 +563,7 @@
|
||||
if(dpy->xcb->event_owner != XlibOwnsEventQueue || dpy->async_handlers)
|
||||
{
|
||||
uint64_t sequence;
|
||||
- for(sequence = dpy->xcb->last_flushed + 1; sequence <= dpy_request; ++sequence)
|
||||
+ for(sequence = dpy->xcb->last_flushed + 1; (unsigned long)sequence <= dpy_request; ++sequence)
|
||||
append_pending_request(dpy, sequence);
|
||||
}
|
||||
requests = dpy_request - dpy->xcb->last_flushed;
|
||||
BIN
libX11-1.8.1.tar.xz
Normal file
BIN
libX11-1.8.1.tar.xz
Normal file
Binary file not shown.
Binary file not shown.
29
libX11.spec
29
libX11.spec
@ -1,13 +1,13 @@
|
||||
Name: libX11
|
||||
Version: 1.8.7
|
||||
Release: 2
|
||||
Version: 1.8.1
|
||||
Release: 4
|
||||
Summary: Core X11 protocol client library
|
||||
License: MIT
|
||||
URL: http://www.x.org
|
||||
Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.xz
|
||||
|
||||
Patch1: dont-forward-keycode-0.patch
|
||||
Patch2: libX11-1.7.2-sw_64.patch
|
||||
Patch6001: backport-CVE-2022-3554.patch
|
||||
|
||||
BuildRequires: xorg-x11-util-macros >= 1.11 xorg-x11-proto-devel perl-Pod-Usage libXau-devel
|
||||
BuildRequires: libxcb-devel >= 1.2 libXdmcp-devel xorg-x11-xtrans-devel >= 1.0.3-4 make
|
||||
@ -36,9 +36,9 @@ The %{name}-devel package contains libraries and header files for %{name}.
|
||||
%build
|
||||
autoreconf -ivf
|
||||
%if 0%{?build_cross} == 1
|
||||
%configure --disable-silent-rules --enable-malloc0returnsnull
|
||||
%configure --disable-silent-rules --enable-malloc0returnsnull --disable-static
|
||||
%else
|
||||
%configure --disable-silent-rules
|
||||
%configure --disable-silent-rules --disable-static
|
||||
%endif
|
||||
%make_build
|
||||
|
||||
@ -66,7 +66,6 @@ make %{?_smp_mflags} check
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/*.a
|
||||
%{_libdir}/*.so
|
||||
%{_includedir}/X11/*.h
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
@ -74,26 +73,10 @@ make %{?_smp_mflags} check
|
||||
|
||||
%files help
|
||||
%defattr(-,root,root)
|
||||
%doc README.md ChangeLog
|
||||
%doc README.md NEWS ChangeLog
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Mon Feb 05 2024 zhouwenpei <zhouwenpei1@h-partners.com> - 1.8.7-2
|
||||
- revent "disable static library"
|
||||
|
||||
* Wed Oct 04 2023 Funda Wang <fundawang@yeah.net> - 1.8.7-1
|
||||
- update to 1.8.7
|
||||
- merge sw64 patch
|
||||
|
||||
* Sat Jul 22 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 1.8.6-1
|
||||
- update to 1.8.6
|
||||
|
||||
* Mon Jun 19 2023 liweigang <liweiganga@uniontech.com> - 1.8.4-2
|
||||
- fix CVE-2023-3138
|
||||
|
||||
* Wed Apr 12 2023 liweiganga <liweiganga@uniontech.com> - 1.8.4-1
|
||||
- update to 1.8.4
|
||||
|
||||
* Tue Apr 11 2023 zhangpan <zhangpan103@h-partners.com> - 1.8.1-4
|
||||
- add build options for i686
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user