[arch-commits] Commit in xorg-server/trunk (3 files)

Laurent Carlier lcarlier at archlinux.org
Wed Sep 2 06:19:48 UTC 2020


    Date: Wednesday, September 2, 2020 @ 06:19:48
  Author: lcarlier
Revision: 395120

upgpkg: xorg-server 1.20.9-2: fix FS#67774

Added:
  xorg-server/trunk/0001-xfree86-Take-second-reference-for-SavedCursor-in-xf8.patch
Modified:
  xorg-server/trunk/PKGBUILD
Deleted:
  xorg-server/trunk/0001-fix-for-ZDI-11426.patch

-----------------------------------------------------------------+
 0001-fix-for-ZDI-11426.patch                                    |   34 ----------
 0001-xfree86-Take-second-reference-for-SavedCursor-in-xf8.patch |   34 ++++++++++
 PKGBUILD                                                        |    7 +-
 3 files changed, 40 insertions(+), 35 deletions(-)

Deleted: 0001-fix-for-ZDI-11426.patch
===================================================================
--- 0001-fix-for-ZDI-11426.patch	2020-09-02 06:07:37 UTC (rev 395119)
+++ 0001-fix-for-ZDI-11426.patch	2020-09-02 06:19:48 UTC (rev 395120)
@@ -1,34 +0,0 @@
-From aac28e162e5108510065ad4c323affd6deffd816 Mon Sep 17 00:00:00 2001
-From: Matthieu Herrb <matthieu at herrb.eu>
-Date: Sat, 25 Jul 2020 19:33:50 +0200
-Subject: [PATCH] fix for ZDI-11426
-
-Avoid leaking un-initalized memory to clients by zeroing the
-whole pixmap on initial allocation.
-
-This vulnerability was discovered by:
-Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
-
-Signed-off-by: Matthieu Herrb <matthieu at herrb.eu>
-Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
-Signed-off-by: Laurent Carlier <lordheavym at gmail.com>
----
- dix/pixmap.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/dix/pixmap.c b/dix/pixmap.c
-index 1186d7dbb..5a0146bbb 100644
---- a/dix/pixmap.c
-+++ b/dix/pixmap.c
-@@ -116,7 +116,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
-     if (pScreen->totalPixmapSize > ((size_t) - 1) - pixDataSize)
-         return NullPixmap;
- 
--    pPixmap = malloc(pScreen->totalPixmapSize + pixDataSize);
-+    pPixmap = calloc(1, pScreen->totalPixmapSize + pixDataSize);
-     if (!pPixmap)
-         return NullPixmap;
- 
--- 
-2.28.0
-

Added: 0001-xfree86-Take-second-reference-for-SavedCursor-in-xf8.patch
===================================================================
--- 0001-xfree86-Take-second-reference-for-SavedCursor-in-xf8.patch	                        (rev 0)
+++ 0001-xfree86-Take-second-reference-for-SavedCursor-in-xf8.patch	2020-09-02 06:19:48 UTC (rev 395120)
@@ -0,0 +1,34 @@
+From 919f1f46fc67dae93b2b3f278fcbfc77af34ec58 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer at redhat.com>
+Date: Mon, 31 Aug 2020 12:10:43 +0200
+Subject: [PATCH] xfree86: Take second reference for SavedCursor in
+ xf86CursorSetCursor
+
+The same pointer is kept in CurrentCursor as well, therefore two
+RefCursor calls are needed.
+
+Fixes use-after-free after switching VTs.
+
+Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1067
+Signed-off-by: Laurent Carlier <lordheavym at gmail.com>
+---
+ hw/xfree86/ramdac/xf86CursorRD.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/hw/xfree86/ramdac/xf86CursorRD.c b/hw/xfree86/ramdac/xf86CursorRD.c
+index 9aa3de97b..c8362d169 100644
+--- a/hw/xfree86/ramdac/xf86CursorRD.c
++++ b/hw/xfree86/ramdac/xf86CursorRD.c
+@@ -334,6 +334,9 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
+         ScreenPriv->HotY = cursor->bits->yhot;
+ 
+         if (!infoPtr->pScrn->vtSema) {
++            cursor = RefCursor(cursor);
++            if (ScreenPriv->SavedCursor)
++                FreeCursor(ScreenPriv->SavedCursor, None);
+             ScreenPriv->SavedCursor = cursor;
+             return;
+         }
+-- 
+2.28.0
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-09-02 06:07:37 UTC (rev 395119)
+++ PKGBUILD	2020-09-02 06:19:48 UTC (rev 395120)
@@ -5,7 +5,7 @@
 pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xvfb' 'xorg-server-xnest'
          'xorg-server-xwayland' 'xorg-server-common' 'xorg-server-devel')
 pkgver=1.20.9
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 license=('custom')
 groups=('xorg')
@@ -20,6 +20,7 @@
         xserver-autobind-hotplug.patch
         0001-v2-FS-58644.patch
         0002-fix-libshadow-2.patch
+        0001-xfree86-Take-second-reference-for-SavedCursor-in-xf8.patch
         xvfb-run # with updates from FC master
         xvfb-run.1)
 validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C'
@@ -32,6 +33,7 @@
             'd84f4d63a502b7af76ea49944d1b21e2030dfd250ac1e82878935cf631973310ac9ba1f0dfedf10980ec6c7431d61b7daa4b7bbaae9ee477b2c19812c1661a22'
             '74e1aa0c101e42f0f25349d305641873b3a79ab3b9bb2d4ed68ba8e392b4db2701fcbc35826531ee2667d3ee55673e4b4fecc2a9f088141af29ceb400f72f363'
             '3d3be34ad9fa976daec53573d3a30a9f1953341ba5ee27099af0141f0ef7994fa5cf84dc08aae848380e6abfc10879f9a67f07601c7a437abf8aef13a3ec9fe1'
+            '7511af2aa99e2f6398987350ad0ff089c22c10017d40981ab610201b953ca4b29cd24aa1ff201ba792f03bdcca7d59d34c2809f4691f84bd86e8ec8016dd279d'
             '73c8ead9fba6815dabfec0a55b3a53f01169f6f2d14ac4a431e53b2d96028672dbd6b50a3314568847b37b1e54ea4fc02bdf677feabb3b2697af55e2e5331810'
             'de5e2cb3c6825e6cf1f07ca0d52423e17f34d70ec7935e9dd24be5fb9883bf1e03b50ff584931bd3b41095c510ab2aa44d2573fd5feaebdcb59363b65607ff22')
 
@@ -47,6 +49,9 @@
 
   # Fix libshadow.so: libfb.so => not found - merge in master
   patch -Np1 -i ../0002-fix-libshadow-2.patch
+  
+  # Fix FS#67774 - merged upstream
+  patch -Np1 -i ../0001-xfree86-Take-second-reference-for-SavedCursor-in-xf8.patch
 }
 
 build() {


More information about the arch-commits mailing list