diff options
| author | Yogita Urade <yogita.urade@windriver.com> | 2024-12-12 10:30:36 +0000 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-12-20 06:01:45 -0800 |
| commit | 5ea79cac19c212dc2ac85216003cf6224a071f2f (patch) | |
| tree | 3921ebb413bc68296e7524a29ed3014908236365 /meta | |
| parent | ce1fa3eec036c866e1c0fb091057349f203ea6a2 (diff) | |
| download | poky-5ea79cac19c212dc2ac85216003cf6224a071f2f.tar.gz | |
xserver-xorg: fix CVE-2024-9632
A flaw was found in the X.org server. Due to improperly
tracked allocation size in _XkbSetCompatMap, a local
attacker may be able to trigger a buffer overflow condition
via a specially crafted payload, leading to denial of service
or local privilege escalation in distributions where the
X.org server is run with root privileges.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-9632
Upstream patch:
https://gitlab.freedesktop.org/xorg/xserver/-/commit/ba1d14f8eff2a123bd7ff4d48c02e1d5131358e0
(From OE-Core rev: 95027410dba7a2a7e9b93f76279272f22445399b)
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-9632.patch | 58 | ||||
| -rw-r--r-- | meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.8.bb | 1 |
2 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-9632.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-9632.patch new file mode 100644 index 0000000000..387cdaa3c9 --- /dev/null +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2024-9632.patch | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | From ba1d14f8eff2a123bd7ff4d48c02e1d5131358e0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Matthieu Herrb <matthieu@herrb.eu> | ||
| 3 | Date: Thu, 10 Oct 2024 10:37:28 +0200 | ||
| 4 | Subject: [PATCH] xkb: Fix buffer overflow in _XkbSetCompatMap() | ||
| 5 | |||
| 6 | The _XkbSetCompatMap() function attempts to resize the `sym_interpret` | ||
| 7 | buffer. | ||
| 8 | |||
| 9 | However, It didn't update its size properly. It updated `num_si` only, | ||
| 10 | without updating `size_si`. | ||
| 11 | |||
| 12 | This may lead to local privilege escalation if the server is run as root | ||
| 13 | or remote code execution (e.g. x11 over ssh). | ||
| 14 | |||
| 15 | CVE-2024-9632, ZDI-CAN-24756 | ||
| 16 | |||
| 17 | This vulnerability was discovered by: | ||
| 18 | Jan-Niklas Sohn working with Trend Micro Zero Day Initiative | ||
| 19 | |||
| 20 | Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> | ||
| 21 | Tested-by: Peter Hutterer <peter.hutterer@who-t.net> | ||
| 22 | Reviewed-by: José Expósito <jexposit@redhat.com> | ||
| 23 | (cherry picked from commit 85b77657) | ||
| 24 | |||
| 25 | Part-of: <!1734> | ||
| 26 | |||
| 27 | CVE: CVE-2024-9632 | ||
| 28 | Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/ba1d14f8eff2a123bd7ff4d48c02e1d5131358e0] | ||
| 29 | |||
| 30 | Signed-off-by: Yogita Urade <yogita.urade@windriver.com> | ||
| 31 | --- | ||
| 32 | xkb/xkb.c | 8 ++++---- | ||
| 33 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 34 | |||
| 35 | diff --git a/xkb/xkb.c b/xkb/xkb.c | ||
| 36 | index 276dc19..7da00a0 100644 | ||
| 37 | --- a/xkb/xkb.c | ||
| 38 | +++ b/xkb/xkb.c | ||
| 39 | @@ -2992,13 +2992,13 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev, | ||
| 40 | XkbSymInterpretPtr sym; | ||
| 41 | unsigned int skipped = 0; | ||
| 42 | |||
| 43 | - if ((unsigned) (req->firstSI + req->nSI) > compat->num_si) { | ||
| 44 | - compat->num_si = req->firstSI + req->nSI; | ||
| 45 | + if ((unsigned) (req->firstSI + req->nSI) > compat->size_si) { | ||
| 46 | + compat->num_si = compat->size_si = req->firstSI + req->nSI; | ||
| 47 | compat->sym_interpret = reallocarray(compat->sym_interpret, | ||
| 48 | - compat->num_si, | ||
| 49 | + compat->size_si, | ||
| 50 | sizeof(XkbSymInterpretRec)); | ||
| 51 | if (!compat->sym_interpret) { | ||
| 52 | - compat->num_si = 0; | ||
| 53 | + compat->num_si = compat->size_si = 0; | ||
| 54 | return BadAlloc; | ||
| 55 | } | ||
| 56 | } | ||
| 57 | -- | ||
| 58 | 2.40.0 | ||
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 fe577050d9..a9cb1b5bde 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 | |||
| @@ -21,6 +21,7 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat | |||
| 21 | file://CVE-2024-31082.patch \ | 21 | file://CVE-2024-31082.patch \ |
| 22 | file://CVE-2024-31083-0001.patch \ | 22 | file://CVE-2024-31083-0001.patch \ |
| 23 | file://CVE-2024-31083-0002.patch \ | 23 | file://CVE-2024-31083-0002.patch \ |
| 24 | file://CVE-2024-9632.patch \ | ||
| 24 | " | 25 | " |
| 25 | SRC_URI[sha256sum] = "38aadb735650c8024ee25211c190bf8aad844c5f59632761ab1ef4c4d5aeb152" | 26 | SRC_URI[sha256sum] = "38aadb735650c8024ee25211c190bf8aad844c5f59632761ab1ef4c4d5aeb152" |
| 26 | 27 | ||
