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

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