Skip to content
Snippets Groups Projects
Commit 9493e46d authored by Dylan Aïssi's avatar Dylan Aïssi
Browse files

Merge updates from debian/bookworm-security

parents 46236eaa 15022348
No related branches found
No related tags found
3 merge requests!83Merge changes from apertis/v2024-security into apertis/v2024,!81Backport v2024 <- v2025pre: Update from debian/bookworm-security,!79Update from debian/bookworm-security for apertis/v2025pre
xorg-server (2:21.1.7-3+deb12u8) bookworm-security; urgency=high
* Non-maintainer upload by the Security Team.
* xkb: Fix buffer overflow in _XkbSetCompatMap() (CVE-2024-9632)
-- Salvatore Bonaccorso <carnil@debian.org> Sat, 26 Oct 2024 13:08:33 +0200
xorg-server (2:21.1.7-3+deb12u7+apertis0) apertis; urgency=medium xorg-server (2:21.1.7-3+deb12u7+apertis0) apertis; urgency=medium
* Sync from debian/bookworm-security. * Sync from debian/bookworm-security.
......
...@@ -23,3 +23,4 @@ dix-Fix-use-after-free-in-input-device-shutdown.patch ...@@ -23,3 +23,4 @@ dix-Fix-use-after-free-in-input-device-shutdown.patch
05_Revert-Unload-submodules.diff 05_Revert-Unload-submodules.diff
06_use-intel-only-on-pre-gen4.diff 06_use-intel-only-on-pre-gen4.diff
07_use-modesetting-driver-by-default-on-GeForce.diff 07_use-modesetting-driver-by-default-on-GeForce.diff
xkb-Fix-buffer-overflow-in-_XkbSetCompatMap.patch
From: Matthieu Herrb <matthieu@herrb.eu>
Date: Thu, 10 Oct 2024 10:37:28 +0200
Subject: xkb: Fix buffer overflow in _XkbSetCompatMap()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2024-9632
The _XkbSetCompatMap() function attempts to resize the `sym_interpret`
buffer.
However, It didn't update its size properly. It updated `num_si` only,
without updating `size_si`.
This may lead to local privilege escalation if the server is run as root
or remote code execution (e.g. x11 over ssh).
CVE-2024-9632, ZDI-CAN-24756
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: José Expósito <jexposit@redhat.com>
---
xkb/xkb.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xkb/xkb.c b/xkb/xkb.c
index bd44a2094f82..6b072087bec4 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -2989,13 +2989,13 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
XkbSymInterpretPtr sym;
unsigned int skipped = 0;
- if ((unsigned) (req->firstSI + req->nSI) > compat->num_si) {
- compat->num_si = req->firstSI + req->nSI;
+ if ((unsigned) (req->firstSI + req->nSI) > compat->size_si) {
+ compat->num_si = compat->size_si = req->firstSI + req->nSI;
compat->sym_interpret = reallocarray(compat->sym_interpret,
- compat->num_si,
+ compat->size_si,
sizeof(XkbSymInterpretRec));
if (!compat->sym_interpret) {
- compat->num_si = 0;
+ compat->num_si = compat->size_si = 0;
return BadAlloc;
}
}
--
2.45.2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment