summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2021-12-28 17:29:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-07 23:21:34 +0000
commitc6f04bb30342174663901eac5891bc7de0cc7b47 (patch)
treedb87379aa3a98329a7ff762a1b3dddcb22192194 /meta
parent43e4d5e102afb7ebc86b683c54a0065439357e04 (diff)
downloadpoky-c6f04bb30342174663901eac5891bc7de0cc7b47.tar.gz
xserver-xorg: fix CVE-2021-4008
Backport patch to fix CVE-2021-4008 for xserver-xorg. CVE: CVE-2021-4008 (From OE-Core rev: e975b1741209e298c3b6a5b101c93e1c17dbced6) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch59
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb1
2 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch
new file mode 100644
index 0000000000..3277be0185
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4008.patch
@@ -0,0 +1,59 @@
1Backport patch to fix CVE-2021-4008.
2
3CVE: CVE-2021-4008
4Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/ebce7e2]
5
6Signed-off-by: Kai Kang <kai.kang@windriver.com>
7
8From ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60 Mon Sep 17 00:00:00 2001
9From: Povilas Kanapickas <povilas@radix.lt>
10Date: Tue, 14 Dec 2021 15:00:03 +0200
11Subject: [PATCH] render: Fix out of bounds access in
12 SProcRenderCompositeGlyphs()
13
14ZDI-CAN-14192, CVE-2021-4008
15
16This vulnerability was discovered and the fix was suggested by:
17Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
18
19Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
20---
21 render/render.c | 9 +++++++++
22 1 file changed, 9 insertions(+)
23
24diff --git a/render/render.c b/render/render.c
25index c376090ca..456f156d4 100644
26--- a/render/render.c
27+++ b/render/render.c
28@@ -2309,6 +2309,9 @@ SProcRenderCompositeGlyphs(ClientPtr client)
29
30 i = elt->len;
31 if (i == 0xff) {
32+ if (buffer + 4 > end) {
33+ return BadLength;
34+ }
35 swapl((int *) buffer);
36 buffer += 4;
37 }
38@@ -2319,12 +2322,18 @@ SProcRenderCompositeGlyphs(ClientPtr client)
39 buffer += i;
40 break;
41 case 2:
42+ if (buffer + i * 2 > end) {
43+ return BadLength;
44+ }
45 while (i--) {
46 swaps((short *) buffer);
47 buffer += 2;
48 }
49 break;
50 case 4:
51+ if (buffer + i * 4 > end) {
52+ return BadLength;
53+ }
54 while (i--) {
55 swapl((int *) buffer);
56 buffer += 4;
57--
58GitLab
59
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
index e0551fa999..9a7aa1ed9a 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb
@@ -9,6 +9,7 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
9 file://0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch \ 9 file://0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch \
10 file://CVE-2021-3472.patch \ 10 file://CVE-2021-3472.patch \
11 file://0001-hw-xwayland-Makefile.am-fix-build-without-glx.patch \ 11 file://0001-hw-xwayland-Makefile.am-fix-build-without-glx.patch \
12 file://CVE-2021-4008.patch \
12 " 13 "
13SRC_URI[sha256sum] = "977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99" 14SRC_URI[sha256sum] = "977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99"
14 15