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