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

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