Blame SOURCES/0001-Xi-fix-potential-use-after-free-in-DeepCopyPointerCl.patch
|
|
0edaf9 |
From 8660dd164882ce5fc1f274427e2ff3dc020d6273 Mon Sep 17 00:00:00 2001
|
|
|
0edaf9 |
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
0edaf9 |
Date: Wed, 25 Jan 2023 11:41:40 +1000
|
|
|
0edaf9 |
Subject: [PATCH xserver] Xi: fix potential use-after-free in
|
|
|
0edaf9 |
DeepCopyPointerClasses
|
|
|
0edaf9 |
|
|
|
0edaf9 |
CVE-2023-0494, ZDI-CAN-19596
|
|
|
0edaf9 |
|
|
|
0edaf9 |
This vulnerability was discovered by:
|
|
|
0edaf9 |
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
|
|
|
0edaf9 |
|
|
|
0edaf9 |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
0edaf9 |
(cherry picked from commit 0ba6d8c37071131a49790243cdac55392ecf71ec)
|
|
|
0edaf9 |
---
|
|
|
0edaf9 |
Xi/exevents.c | 4 +++-
|
|
|
0edaf9 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
0edaf9 |
|
|
|
0edaf9 |
diff --git a/Xi/exevents.c b/Xi/exevents.c
|
|
|
0edaf9 |
index 217baa956..dcd4efb3b 100644
|
|
|
0edaf9 |
--- a/Xi/exevents.c
|
|
|
0edaf9 |
+++ b/Xi/exevents.c
|
|
|
0edaf9 |
@@ -619,8 +619,10 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
|
|
|
0edaf9 |
memcpy(to->button->xkb_acts, from->button->xkb_acts,
|
|
|
0edaf9 |
sizeof(XkbAction));
|
|
|
0edaf9 |
}
|
|
|
0edaf9 |
- else
|
|
|
0edaf9 |
+ else {
|
|
|
0edaf9 |
free(to->button->xkb_acts);
|
|
|
0edaf9 |
+ to->button->xkb_acts = NULL;
|
|
|
0edaf9 |
+ }
|
|
|
0edaf9 |
|
|
|
0edaf9 |
memcpy(to->button->labels, from->button->labels,
|
|
|
0edaf9 |
from->button->numButtons * sizeof(Atom));
|
|
|
0edaf9 |
--
|
|
|
0edaf9 |
2.39.1
|
|
|
0edaf9 |
|