Blame SOURCES/0007-xkb-reset-the-radio_groups-pointer-to-NULL-after-fre.patch

72411e
From 774260dbae1fa505cd2848c786baed9a8db5179d Mon Sep 17 00:00:00 2001
72411e
From: Peter Hutterer <peter.hutterer@who-t.net>
72411e
Date: Mon, 5 Dec 2022 15:55:54 +1000
72411e
Subject: [PATCH xserver 7/7] xkb: reset the radio_groups pointer to NULL after
72411e
 freeing it
72411e
72411e
Unlike other elements of the keymap, this pointer was freed but not
72411e
reset. On a subsequent XkbGetKbdByName request, the server may access
72411e
already freed memory.
72411e
72411e
CVE-2022-46283, ZDI-CAN-19530
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
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
72411e
---
72411e
 xkb/xkbUtils.c | 1 +
72411e
 1 file changed, 1 insertion(+)
72411e
72411e
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
72411e
index dd089c2046..3f5791a183 100644
72411e
--- a/xkb/xkbUtils.c
72411e
+++ b/xkb/xkbUtils.c
72411e
@@ -1326,6 +1326,7 @@ _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst)
72411e
         }
72411e
         else {
72411e
             free(dst->names->radio_groups);
72411e
+            dst->names->radio_groups = NULL;
72411e
         }
72411e
         dst->names->num_rg = src->names->num_rg;
72411e
72411e
--
72411e
2.38.1