diff options
author | Archana Polampalli <archana.polampalli@windriver.com> | 2025-07-02 21:16:19 +0530 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-07-09 08:43:32 -0700 |
commit | 0717b8bbc0c8adc388de85c06e48fd772f47c55d (patch) | |
tree | 2f6f8970f97064fc08d18e6bd48516fa647ee6ab /meta | |
parent | b4ccec2a44013926d5e7d8553afbfb17192946bc (diff) | |
download | poky-scarthgap.tar.gz |
xwayland: fix CVE-2025-49180scarthgap
A flaw was found in the RandR extension, where the RRChangeProviderProperty function
does not properly validate input. This issue leads to an integer overflow when
computing the total size to allocate.
(From OE-Core rev: 15881f41f8c00c5f0a68628c2d49ca1aa1999c2e)
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-graphics/xwayland/xwayland/CVE-2025-49180.patch | 45 | ||||
-rw-r--r-- | meta/recipes-graphics/xwayland/xwayland_23.2.5.bb | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49180.patch b/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49180.patch new file mode 100644 index 0000000000..51939acf63 --- /dev/null +++ b/meta/recipes-graphics/xwayland/xwayland/CVE-2025-49180.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 3c3a4b767b16174d3213055947ea7f4f88e10ec6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Olivier Fourdan <ofourdan@redhat.com> | ||
3 | Date: Tue, 20 May 2025 15:18:19 +0200 | ||
4 | Subject: [PATCH] randr: Check for overflow in RRChangeProviderProperty() | ||
5 | |||
6 | A client might send a request causing an integer overflow when computing | ||
7 | the total size to allocate in RRChangeProviderProperty(). | ||
8 | |||
9 | To avoid the issue, check that total length in bytes won't exceed the | ||
10 | maximum integer value. | ||
11 | |||
12 | CVE-2025-49180 | ||
13 | |||
14 | This issue was discovered by Nils Emmerich <nemmerich@ernw.de> and | ||
15 | reported by Julian Suleder via ERNW Vulnerability Disclosure. | ||
16 | |||
17 | Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> | ||
18 | Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> | ||
19 | Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2024> | ||
20 | |||
21 | CVE: CVE-2025-49180 | ||
22 | |||
23 | Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/3c3a4b767b16174d3213055947ea7f4f88e10ec6] | ||
24 | |||
25 | Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | ||
26 | --- | ||
27 | randr/rrproviderproperty.c | 3 ++- | ||
28 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
29 | |||
30 | diff --git a/randr/rrproviderproperty.c b/randr/rrproviderproperty.c | ||
31 | index 90c5a9a..0aa35ad 100644 | ||
32 | --- a/randr/rrproviderproperty.c | ||
33 | +++ b/randr/rrproviderproperty.c | ||
34 | @@ -179,7 +179,8 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type, | ||
35 | |||
36 | if (mode == PropModeReplace || len > 0) { | ||
37 | void *new_data = NULL, *old_data = NULL; | ||
38 | - | ||
39 | + if (total_len > MAXINT / size_in_bytes) | ||
40 | + return BadValue; | ||
41 | total_size = total_len * size_in_bytes; | ||
42 | new_value.data = (void *) malloc(total_size); | ||
43 | if (!new_value.data && total_size) { | ||
44 | -- | ||
45 | 2.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 490e1ca05f..49e35ca442 100644 --- a/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb +++ b/meta/recipes-graphics/xwayland/xwayland_23.2.5.bb | |||
@@ -30,6 +30,7 @@ SRC_URI = "https://www.x.org/archive/individual/xserver/xwayland-${PV}.tar.xz \ | |||
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 | file://CVE-2025-49179.patch \ |
33 | file://CVE-2025-49180.patch \ | ||
33 | " | 34 | " |
34 | SRC_URI[sha256sum] = "33ec7ff2687a59faaa52b9b09aa8caf118e7ecb6aed8953f526a625ff9f4bd90" | 35 | SRC_URI[sha256sum] = "33ec7ff2687a59faaa52b9b09aa8caf118e7ecb6aed8953f526a625ff9f4bd90" |
35 | 36 | ||