summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-graphics/xwayland/xwayland/CVE-2025-49179.patch69
-rw-r--r--meta/recipes-graphics/xwayland/xwayland_23.2.5.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49179.patch b/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49179.patch
new file mode 100644
index 0000000000..48c7ed8c13
--- /dev/null
+++ b/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49179.patch
@@ -0,0 +1,69 @@
1From 9d205323894af62b9726fcbaeb5fc69b3c9f61ba Mon Sep 17 00:00:00 2001
2From: Olivier Fourdan <ofourdan@redhat.com>
3Date: Mon, 28 Apr 2025 11:47:15 +0200
4Subject: [PATCH] record: Check for overflow in
5 RecordSanityCheckRegisterClients()
6
7The RecordSanityCheckRegisterClients() checks for the request length,
8but does not check for integer overflow.
9
10A client might send a very large value for either the number of clients
11or the number of protocol ranges that will cause an integer overflow in
12the request length computation, defeating the check for request length.
13
14To avoid the issue, explicitly check the number of clients against the
15limit of clients (which is much lower than an maximum integer value) and
16the number of protocol ranges (multiplied by the record length) do not
17exceed the maximum integer value.
18
19This way, we ensure that the final computation for the request length
20will not overflow the maximum integer limit.
21
22CVE-2025-49179
23
24This issue was discovered by Nils Emmerich <nemmerich@ernw.de> and
25reported by Julian Suleder via ERNW Vulnerability Disclosure.
26
27Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
28Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
29(cherry picked from commit 2bde9ca49a8fd9a1e6697d5e7ef837870d66f5d4)
30
31Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2026>
32
33CVE: CVE-2025-49179
34
35Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/9d205323894af62b9726fcbaeb5fc69b3c9f61ba]
36
37Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
38---
39 record/record.c | 8 ++++++++
40 1 file changed, 8 insertions(+)
41
42diff --git a/record/record.c b/record/record.c
43index e123867..018e53f 100644
44--- a/record/record.c
45+++ b/record/record.c
46@@ -45,6 +45,7 @@ and Jim Haggerty of Metheus.
47 #include "inputstr.h"
48 #include "eventconvert.h"
49 #include "scrnintstr.h"
50+#include "opaque.h"
51
52 #include <stdio.h>
53 #include <assert.h>
54@@ -1298,6 +1299,13 @@ RecordSanityCheckRegisterClients(RecordContextPtr pContext, ClientPtr client,
55 int i;
56 XID recordingClient;
57
58+ /* LimitClients is 2048 at max, way less that MAXINT */
59+ if (stuff->nClients > LimitClients)
60+ return BadValue;
61+
62+ if (stuff->nRanges > (MAXINT - 4 * stuff->nClients) / SIZEOF(xRecordRange))
63+ return BadValue;
64+
65 if (((client->req_len << 2) - SIZEOF(xRecordRegisterClientsReq)) !=
66 4 * stuff->nClients + SIZEOF(xRecordRange) * stuff->nRanges)
67 return BadLength;
68--
692.40.0
diff --git a/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb b/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb
index e150961882..490e1ca05f 100644
--- a/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb
+++ b/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb
@@ -29,6 +29,7 @@ SRC_URI = "https://www.x.org/archive/individual/xserver/xwayland-${PV}.tar.xz \
29 file://CVE-2025-49176-0002.patch \ 29 file://CVE-2025-49176-0002.patch \
30 file://CVE-2025-49177.patch \ 30 file://CVE-2025-49177.patch \
31 file://CVE-2025-49178.patch \ 31 file://CVE-2025-49178.patch \
32 file://CVE-2025-49179.patch \
32" 33"
33SRC_URI[sha256sum] = "33ec7ff2687a59faaa52b9b09aa8caf118e7ecb6aed8953f526a625ff9f4bd90" 34SRC_URI[sha256sum] = "33ec7ff2687a59faaa52b9b09aa8caf118e7ecb6aed8953f526a625ff9f4bd90"
34 35