Blame SOURCES/0001-Xi-fix-potential-use-after-free-in-DeepCopyPointerCl.patch

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