summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-lib/libx11/CVE-2022-3554.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-lib/libx11/CVE-2022-3554.patch')
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11/CVE-2022-3554.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-lib/libx11/CVE-2022-3554.patch b/meta/recipes-graphics/xorg-lib/libx11/CVE-2022-3554.patch
new file mode 100644
index 0000000000..fb61195225
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/CVE-2022-3554.patch
@@ -0,0 +1,58 @@
1From 8b51d1375a4dd6a7cf3a919da83d8e87e57e7333 Mon Sep 17 00:00:00 2001
2From: Hitendra Prajapati <hprajapati@mvista.com>
3Date: Wed, 2 Nov 2022 17:04:15 +0530
4Subject: [PATCH] CVE-2022-3554
5
6Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/1d11822601fd24a396b354fa616b04ed3df8b4ef]
7CVE: CVE-2022-3554
8Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
9
10fix a memory leak in XRegisterIMInstantiateCallback
11
12Analysis:
13
14 _XimRegisterIMInstantiateCallback() opens an XIM and closes it using
15 the internal function pointers, but the internal close function does
16 not free the pointer to the XIM (this would be done in XCloseIM()).
17
18Report/patch:
19
20 Date: Mon, 03 Oct 2022 18:47:32 +0800
21 From: Po Lu <luangruo@yahoo.com>
22 To: xorg-devel@lists.x.org
23 Subject: Re: Yet another leak in Xlib
24
25 For reference, here's how I'm calling XRegisterIMInstantiateCallback:
26
27 XSetLocaleModifiers ("");
28 XRegisterIMInstantiateCallback (compositor.display,
29 XrmGetDatabase (compositor.display),
30 (char *) compositor.resource_name,
31 (char *) compositor.app_name,
32 IMInstantiateCallback, NULL);
33 and XMODIFIERS is:
34
35 @im=ibus
36
37Signed-off-by: Thomas E. Dickey's avatarThomas E. Dickey <dickey@invisible-island.net>
38---
39 modules/im/ximcp/imInsClbk.c | 3 +++
40 1 file changed, 3 insertions(+)
41
42diff --git a/modules/im/ximcp/imInsClbk.c b/modules/im/ximcp/imInsClbk.c
43index 961aaba..0a8a874 100644
44--- a/modules/im/ximcp/imInsClbk.c
45+++ b/modules/im/ximcp/imInsClbk.c
46@@ -204,6 +204,9 @@ _XimRegisterIMInstantiateCallback(
47 if( xim ) {
48 lock = True;
49 xim->methods->close( (XIM)xim );
50+ /* XIMs must be freed manually after being opened; close just
51+ does the protocol to deinitialize the IM. */
52+ XFree( xim );
53 lock = False;
54 icb->call = True;
55 callback( display, client_data, NULL );
56--
572.25.1
58