diff options
author | Kai Kang <kai.kang@windriver.com> | 2021-12-28 17:29:12 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-07 23:21:34 +0000 |
commit | cf5da90349232565c9507fcf0cf333c2b7fa425b (patch) | |
tree | 6d4e4eeaee0704e02f0844cfc48a662f8e7a1092 /meta | |
parent | c6f04bb30342174663901eac5891bc7de0cc7b47 (diff) | |
download | poky-cf5da90349232565c9507fcf0cf333c2b7fa425b.tar.gz |
xserver-xorg: fix CVE-2021-4009
Backport patch to fix CVE-2021-4009 for xserver-xorg.
CVE: CVE-2021-4009
(From OE-Core rev: 33581b19a2eb00b5905325e966edd7f7519a2924)
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-4009.patch | 50 | ||||
-rw-r--r-- | meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.10.bb | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4009.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4009.patch new file mode 100644 index 0000000000..ddfbb43ee4 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4009.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | Backport patch to fix CVE-2021-4009. | ||
2 | |||
3 | CVE: CVE-2021-4009 | ||
4 | Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/b519675] | ||
5 | |||
6 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
7 | |||
8 | From b5196750099ae6ae582e1f46bd0a6dad29550e02 Mon Sep 17 00:00:00 2001 | ||
9 | From: Povilas Kanapickas <povilas@radix.lt> | ||
10 | Date: Tue, 14 Dec 2021 15:00:01 +0200 | ||
11 | Subject: [PATCH] xfixes: Fix out of bounds access in | ||
12 | *ProcXFixesCreatePointerBarrier() | ||
13 | |||
14 | ZDI-CAN-14950, CVE-2021-4009 | ||
15 | |||
16 | This vulnerability was discovered and the fix was suggested by: | ||
17 | Jan-Niklas Sohn working with Trend Micro Zero Day Initiative | ||
18 | |||
19 | Signed-off-by: Povilas Kanapickas <povilas@radix.lt> | ||
20 | --- | ||
21 | xfixes/cursor.c | 6 ++++-- | ||
22 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
23 | |||
24 | diff --git a/xfixes/cursor.c b/xfixes/cursor.c | ||
25 | index 60580b88f..c5d4554b2 100644 | ||
26 | --- a/xfixes/cursor.c | ||
27 | +++ b/xfixes/cursor.c | ||
28 | @@ -1010,7 +1010,8 @@ ProcXFixesCreatePointerBarrier(ClientPtr client) | ||
29 | { | ||
30 | REQUEST(xXFixesCreatePointerBarrierReq); | ||
31 | |||
32 | - REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices)); | ||
33 | + REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, | ||
34 | + pad_to_int32(stuff->num_devices * sizeof(CARD16))); | ||
35 | LEGAL_NEW_RESOURCE(stuff->barrier, client); | ||
36 | |||
37 | return XICreatePointerBarrier(client, stuff); | ||
38 | @@ -1027,7 +1028,8 @@ SProcXFixesCreatePointerBarrier(ClientPtr client) | ||
39 | |||
40 | swaps(&stuff->length); | ||
41 | swaps(&stuff->num_devices); | ||
42 | - REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices)); | ||
43 | + REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, | ||
44 | + pad_to_int32(stuff->num_devices * sizeof(CARD16))); | ||
45 | |||
46 | swapl(&stuff->barrier); | ||
47 | swapl(&stuff->window); | ||
48 | -- | ||
49 | GitLab | ||
50 | |||
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 9a7aa1ed9a..ac32bb25c2 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 | |||
@@ -10,6 +10,7 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat | |||
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 | file://CVE-2021-4008.patch \ |
13 | file://CVE-2021-4009.patch \ | ||
13 | " | 14 | " |
14 | SRC_URI[sha256sum] = "977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99" | 15 | SRC_URI[sha256sum] = "977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99" |
15 | 16 | ||