summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorArchana Polampalli <archana.polampalli@windriver.com>2025-07-03 15:53:53 +0530
committerSteve Sakoman <steve@sakoman.com>2025-07-09 08:23:23 -0700
commit4c0768543aa3855d93f435bbd4421befd8ad9bb6 (patch)
tree9af7250d1550d47731d482916d50fa02589c769a /meta/recipes-graphics
parent53e9e453506f8994026be622b1fb54845fd314a6 (diff)
downloadpoky-4c0768543aa3855d93f435bbd4421befd8ad9bb6.tar.gz
xwayland: fix CVE-2025-49179
A flaw was found in the X server's request handling. Non-zero 'bytes to ignore' in a client's request can cause the server to skip processing another client's request, potentially leading to a denial of service. (From OE-Core rev: 589bf97e1aa236477d895c227446966d0a278f3c) Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/xwayland/xwayland/CVE-2025-49179.patch69
-rw-r--r--meta/recipes-graphics/xwayland/xwayland_22.1.8.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_22.1.8.bb b/meta/recipes-graphics/xwayland/xwayland_22.1.8.bb
index caca8ab0f6..691b017662 100644
--- a/meta/recipes-graphics/xwayland/xwayland_22.1.8.bb
+++ b/meta/recipes-graphics/xwayland/xwayland_22.1.8.bb
@@ -48,6 +48,7 @@ SRC_URI = "https://www.x.org/archive/individual/xserver/xwayland-${PV}.tar.xz \
48 file://CVE-2025-49176-0002.patch \ 48 file://CVE-2025-49176-0002.patch \
49 file://CVE-2025-49177.patch \ 49 file://CVE-2025-49177.patch \
50 file://CVE-2025-49178.patch \ 50 file://CVE-2025-49178.patch \
51 file://CVE-2025-49179.patch \
51" 52"
52SRC_URI[sha256sum] = "d11eeee73290b88ea8da42a7d9350dedfaba856ce4ae44e58c045ad9ecaa2f73" 53SRC_URI[sha256sum] = "d11eeee73290b88ea8da42a7d9350dedfaba856ce4ae44e58c045ad9ecaa2f73"
53 54