Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xorg-server
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
xorg-server
Merge requests
!37
Update from debian/bullseye-security for apertis/v2024dev1
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update from debian/bullseye-security for apertis/v2024dev1
proposed-updates/debian/bullseye-security/18d1da48
into
apertis/v2024dev1
Overview
0
Commits
3
Pipelines
3
Changes
9
Merged
Apertis CI robot
requested to merge
proposed-updates/debian/bullseye-security/18d1da48
into
apertis/v2024dev1
2 years ago
Overview
0
Commits
3
Pipelines
3
Changes
9
Expand
0
0
Merge request reports
Compare
apertis/v2024dev1
version 1
7319a6ee
2 years ago
apertis/v2024dev1 (base)
and
latest version
latest version
f87e6480
3 commits,
2 years ago
version 1
7319a6ee
3 commits,
2 years ago
9 files
+
452
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
debian/patches/13_Xtest-disallow-GenericEvents-in-XTestSwapFakeInput.patch
0 → 100644
+
54
−
0
Options
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 29 Nov 2022 12:55:45 +1000
Subject: Xtest: disallow GenericEvents in XTestSwapFakeInput
Origin: https://gitlab.freedesktop.org/xorg/xserver/commit/936d34bdff4c479ccd0405fc221ff8e4c6c7014d
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-46340
Bug-Debian: https://bugs.debian.org/1026071
XTestSwapFakeInput assumes all events in this request are
sizeof(xEvent) and iterates through these in 32-byte increments.
However, a GenericEvent may be of arbitrary length longer than 32 bytes,
so any GenericEvent in this list would result in subsequent events to be
misparsed.
Additional, the swapped event is written into a stack-allocated struct
xEvent (size 32 bytes). For any GenericEvent longer than 32 bytes,
swapping the event may thus smash the stack like an avocado on toast.
Catch this case early and return BadValue for any GenericEvent.
Which is what would happen in unswapped setups anyway since XTest
doesn't support GenericEvent.
CVE-2022-46340, ZDI-CAN 19265
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63)
---
Xext/xtest.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 540d270a1c0d..e5d38aa61253 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -502,10 +502,11 @@
XTestSwapFakeInput(ClientPtr client, xReq * req)
nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent);
for (ev = (xEvent *) &req[1]; --nev >= 0; ev++) {
+ int evtype = ev->u.u.type & 0x177;
/* Swap event */
- proc = EventSwapVector[ev->u.u.type & 0177];
+ proc = EventSwapVector[evtype];
/* no swapping proc; invalid event type? */
- if (!proc || proc == NotImplemented) {
+ if (!proc || proc == NotImplemented || evtype == GenericEvent) {
client->errorValue = ev->u.u.type;
return BadValue;
}
--
2.39.0
Loading