summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorVijay Anusuri <vanusuri@mvista.com>2025-02-27 18:02:00 +0530
committerSteve Sakoman <steve@sakoman.com>2025-03-04 08:46:02 -0800
commitee975a71000cdd1ca517f589ac9152e7fea7b275 (patch)
tree84444172c45e0ab237e0bc0fbd06676933bb5a48 /meta/recipes-graphics
parent7a3fba1587550ac21b81879b2a541d2694507a38 (diff)
downloadpoky-ee975a71000cdd1ca517f589ac9152e7fea7b275.tar.gz
xserver-xorg: Fix for CVE-2025-26595
Upstream-Status: Backport from https://gitlab.freedesktop.org/xorg/xserver/-/commit/11fcda87 (From OE-Core rev: 78d718f0a683f9fb81aa24b39f148d2acf2e1fc6) Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26595.patch65
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb1
2 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26595.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26595.patch
new file mode 100644
index 0000000000..a7478d9e2a
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2025-26595.patch
@@ -0,0 +1,65 @@
1From 11fcda8753e994e15eb915d28cf487660ec8e722 Mon Sep 17 00:00:00 2001
2From: Olivier Fourdan <ofourdan@redhat.com>
3Date: Wed, 27 Nov 2024 14:41:45 +0100
4Subject: [PATCH] xkb: Fix buffer overflow in XkbVModMaskText()
5
6The code in XkbVModMaskText() allocates a fixed sized buffer on the
7stack and copies the virtual mod name.
8
9There's actually two issues in the code that can lead to a buffer
10overflow.
11
12First, the bound check mixes pointers and integers using misplaced
13parenthesis, defeating the bound check.
14
15But even though, if the check fails, the data is still copied, so the
16stack overflow will occur regardless.
17
18Change the logic to skip the copy entirely if the bound check fails.
19
20CVE-2025-26595, ZDI-CAN-25545
21
22This vulnerability was discovered by:
23Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
24
25Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
26Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
27Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1828>
28
29Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/11fcda87]
30CVE: CVE-2025-26595
31Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
32---
33 xkb/xkbtext.c | 16 ++++++++--------
34 1 file changed, 8 insertions(+), 8 deletions(-)
35
36diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
37index 0184664207..93262528bb 100644
38--- a/xkb/xkbtext.c
39+++ b/xkb/xkbtext.c
40@@ -173,14 +173,14 @@ XkbVModMaskText(XkbDescPtr xkb,
41 len = strlen(tmp) + 1 + (str == buf ? 0 : 1);
42 if (format == XkbCFile)
43 len += 4;
44- if ((str - (buf + len)) <= VMOD_BUFFER_SIZE) {
45- if (str != buf) {
46- if (format == XkbCFile)
47- *str++ = '|';
48- else
49- *str++ = '+';
50- len--;
51- }
52+ if ((str - buf) + len > VMOD_BUFFER_SIZE)
53+ continue; /* Skip */
54+ if (str != buf) {
55+ if (format == XkbCFile)
56+ *str++ = '|';
57+ else
58+ *str++ = '+';
59+ len--;
60 }
61 if (format == XkbCFile)
62 sprintf(str, "%sMask", tmp);
63--
64GitLab
65
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb
index 11003db04d..94381a1a16 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb
@@ -24,6 +24,7 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
24 file://CVE-2024-9632.patch \ 24 file://CVE-2024-9632.patch \
25 file://CVE-2025-26594-1.patch \ 25 file://CVE-2025-26594-1.patch \
26 file://CVE-2025-26594-2.patch \ 26 file://CVE-2025-26594-2.patch \
27 file://CVE-2025-26595.patch \
27 " 28 "
28SRC_URI[sha256sum] = "38aadb735650c8024ee25211c190bf8aad844c5f59632761ab1ef4c4d5aeb152" 29SRC_URI[sha256sum] = "38aadb735650c8024ee25211c190bf8aad844c5f59632761ab1ef4c4d5aeb152"
29 30