From: <kai.kang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Cc: <randy.macleod@windriver.com>
Subject: [hardknott][PATCH 4/4] xserver-xorg: fix CVE-2021-4011
Date: Wed, 29 Dec 2021 09:30:51 +0800 [thread overview]
Message-ID: <20211229013051.36342-5-kai.kang@windriver.com> (raw)
In-Reply-To: <20211229013051.36342-1-kai.kang@windriver.com>
From: Kai Kang <kai.kang@windriver.com>
Backport patch to fix CVE-2021-4011 for xserver-xorg.
CVE: CVE-2021-4011
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
.../xserver-xorg/CVE-2021-4011.patch | 40 +++++++++++++++++++
.../xorg-xserver/xserver-xorg_1.20.10.bb | 1 +
2 files changed, 41 insertions(+)
create mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4011.patch
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4011.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4011.patch
new file mode 100644
index 0000000000..c7eb03091d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2021-4011.patch
@@ -0,0 +1,40 @@
+Backport patch to fix CVE-2021-4011.
+
+CVE: CVE-2021-4011
+Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/e56f61c]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From e56f61c79fc3cee26d83cda0f84ae56d5979f768 Mon Sep 17 00:00:00 2001
+From: Povilas Kanapickas <povilas@radix.lt>
+Date: Tue, 14 Dec 2021 15:00:00 +0200
+Subject: [PATCH] record: Fix out of bounds access in SwapCreateRegister()
+
+ZDI-CAN-14952, CVE-2021-4011
+
+This vulnerability was discovered and the fix was suggested by:
+Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+
+Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+---
+ record/record.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/record/record.c b/record/record.c
+index be154525d..e123867a7 100644
+--- a/record/record.c
++++ b/record/record.c
+@@ -2516,8 +2516,8 @@ SwapCreateRegister(ClientPtr client, xRecordRegisterClientsReq * stuff)
+ swapl(pClientID);
+ }
+ if (stuff->nRanges >
+- client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
+- - stuff->nClients)
++ (client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)
++ - stuff->nClients) / bytes_to_int32(sz_xRecordRange))
+ return BadLength;
+ RecordSwapRanges((xRecordRange *) pClientID, stuff->nRanges);
+ return Success;
+--
+GitLab
+
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 84b0acb42f..58f1eb328e 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
@@ -12,6 +12,7 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
file://CVE-2021-4008.patch \
file://CVE-2021-4009.patch \
file://CVE-2021-4010.patch \
+ file://CVE-2021-4011.patch \
"
SRC_URI[sha256sum] = "977420c082450dc808de301ef56af4856d653eea71519a973c3490a780cb7c99"
--
2.17.1
next prev parent reply other threads:[~2021-12-29 1:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-29 1:30 [hardknott][PATCH 0/4] Fix CVEs of xserver-xorg kai.kang
2021-12-29 1:30 ` [hardknott][PATCH 1/4] xserver-xorg: fix CVE-2021-4008 kai.kang
2021-12-29 1:30 ` [hardknott][PATCH 2/4] xserver-xorg: fix CVE-2021-4009 kai.kang
2021-12-29 1:30 ` [hardknott][PATCH 3/4] xserver-xorg: fix CVE-2021-4010 kai.kang
2021-12-29 1:30 ` kai.kang [this message]
[not found] ` <16C515AB4535CCA0.27787@lists.openembedded.org>
2022-01-07 2:56 ` [OE-core] [hardknott][PATCH 1/4] xserver-xorg: fix CVE-2021-4008 Kai
2022-01-07 7:51 ` Mittal, Anuj
2022-01-07 7:56 ` Kai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211229013051.36342-5-kai.kang@windriver.com \
--to=kai.kang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=randy.macleod@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox