diff --git a/fix-segfault-if-CreateGC-failed-in-XaceHook.patch b/fix-segfault-if-CreateGC-failed-in-XaceHook.patch new file mode 100644 index 0000000..f114402 --- /dev/null +++ b/fix-segfault-if-CreateGC-failed-in-XaceHook.patch @@ -0,0 +1,35 @@ +From 9b1bb4a69190aaecafcbcafd97f6b42811c6e14b Mon Sep 17 00:00:00 2001 +From: niuwanli +Date: Wed, 24 Jan 2024 17:14:47 +0800 +Subject: [PATCH] Fix the FreeGC call funcs not checked + +--- + dix/gc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/dix/gc.c b/dix/gc.c +index 4ccbd3b..80b375b 100644 +--- a/dix/gc.c ++++ b/dix/gc.c +@@ -770,14 +770,16 @@ FreeGC(void *value, XID gid) + GCPtr pGC = (GCPtr) value; + + CloseFont(pGC->font, (Font) 0); +- (*pGC->funcs->DestroyClip) (pGC); ++ if (pGC->funcs) ++ (*pGC->funcs->DestroyClip) (pGC); + + if (!pGC->tileIsPixel) + (*pGC->pScreen->DestroyPixmap) (pGC->tile.pixmap); + if (pGC->stipple) + (*pGC->pScreen->DestroyPixmap) (pGC->stipple); + +- (*pGC->funcs->DestroyGC) (pGC); ++ if (pGC->funcs) ++ (*pGC->funcs->DestroyGC) (pGC); + if (pGC->dash != DefaultDash) + free(pGC->dash); + dixFreeObjectWithPrivates(pGC, PRIVATE_GC); +-- +2.33.0 + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index c09824d..145db8d 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -16,7 +16,7 @@ Name: xorg-x11-server Version: 1.20.11 -Release: 26 +Release: 27 Summary: X.Org X11 X server License: MIT and GPLv2 URL: https://www.x.org @@ -118,6 +118,7 @@ Patch6032: backport-CVE-2023-6816.patch Patch6033: backport-0001-CVE-2024-0229.patch Patch6034: backport-0002-CVE-2024-0229.patch Patch6035: backport-0003-CVE-2024-0229.patch +Patch6036: fix-segfault-if-CreateGC-failed-in-XaceHook.patch BuildRequires: audit-libs-devel autoconf automake bison dbus-devel flex git gcc BuildRequires: systemtap-sdt-devel libtool pkgconfig @@ -459,6 +460,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %{_mandir}/man*/* %changelog +* Mon Feb 5 2024 niuwanli - 1.20.11-27 +- fix segfault if CreateGC failed in XaceHook + * Mon Jan 29 2024 yangchenguang - 1.20.11-26 - Modify sw_64 patch to use all arch