Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11 modular-xorg-*: provide patch (making this package...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/da7872835f8d
branches:  trunk
changeset: 436309:da7872835f8d
user:      maya <maya%pkgsrc.org@localhost>
date:      Fri Jul 31 16:50:57 2020 +0000

description:
modular-xorg-*: provide patch (making this package equivalent to
xorg-server 1.20.9, couldn't find a tarball).

X.Org security advisory: July 31, 2020

X Server Pixel Data Uninitialized Memory Information Disclosure
===============================================================

CVE-2020-14347

Allocation for pixmap data in AllocatePixmap() does not initialize the
memory in xserver, it leads to leak uninitialize heap memory to
clients. When the X server runs with elevated privileges.

This flaw can lead to ASLR bypass, which when combined with other
flaws (known/unknown) could lead to lead to privilege elevation in the
client.

Patch
=====

A patch for this issue has been commited to the xorg server git
repository.  xorg-server 1.20.9 will be released shortly and will
include this patch.

https://gitlab.freedesktop.org/xorg/xserver.git

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;

Thanks
======

This vulnerability was discovered by Jan-Niklas Sohn working with
Trend Micro Zero Day Initiative.

diffstat:

 x11/modular-xorg-server/Makefile                   |   4 +-
 x11/modular-xorg-server/distinfo                   |   3 +-
 x11/modular-xorg-server/patches/patch-dix_pixmap.c |  27 ++++++++++++++++++++++
 x11/modular-xorg-xephyr/Makefile                   |   4 +-
 x11/modular-xorg-xwayland/Makefile                 |   4 +-
 5 files changed, 35 insertions(+), 7 deletions(-)

diffs (89 lines):

diff -r e75d494b9334 -r da7872835f8d x11/modular-xorg-server/Makefile
--- a/x11/modular-xorg-server/Makefile  Fri Jul 31 16:37:14 2020 +0000
+++ b/x11/modular-xorg-server/Makefile  Fri Jul 31 16:50:57 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.127 2020/05/22 10:56:48 adam Exp $
+# $NetBSD: Makefile,v 1.128 2020/07/31 16:50:57 maya Exp $
 
 DISTNAME=      xorg-server-${XORG_VERSION}
 PKGNAME=       modular-${DISTNAME}
-PKGREVISION=   1
+PKGREVISION=   2
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 COMMENT=       Modular X11 server from modular X.org
diff -r e75d494b9334 -r da7872835f8d x11/modular-xorg-server/distinfo
--- a/x11/modular-xorg-server/distinfo  Fri Jul 31 16:37:14 2020 +0000
+++ b/x11/modular-xorg-server/distinfo  Fri Jul 31 16:50:57 2020 +0000
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.101 2020/03/30 11:49:39 wiz Exp $
+$NetBSD: distinfo,v 1.102 2020/07/31 16:50:57 maya Exp $
 
 SHA1 (xorg-server-1.20.8.tar.bz2) = 077d081f912faf11c87ea1c9d0e29490961b0cd4
 RMD160 (xorg-server-1.20.8.tar.bz2) = 74f2a5ab7b482d2aded54fd412e9c0d673f270ba
 SHA512 (xorg-server-1.20.8.tar.bz2) = ab0ec0fcbf490c61558b9297f61b58fd2dedb676c78bef6431dc9166054743b43a0091b88a8b3f4e81d1f539909440ee7e188a298cefabe13ea89159639cd805
 Size (xorg-server-1.20.8.tar.bz2) = 6309640 bytes
 SHA1 (patch-configure) = ce2c732c3d8493445744a927a25b9cd3b45880f8
+SHA1 (patch-dix_pixmap.c) = 92c9343f71ddc418c0f61e8138e0b209cefcb221
 SHA1 (patch-hw_xfree86_common_xf86AutoConfig.c) = 70adf85be9fc6222a335686e7e9e9f385aca02f9
 SHA1 (patch-hw_xfree86_common_xf86sbusBus.h) = f56f87336b2f669413ebb1005a2b64568a111f92
 SHA1 (patch-hw_xfree86_dri2_dri2.c) = 0bf58305059321e10f6f58186301dbb7cb858c2a
diff -r e75d494b9334 -r da7872835f8d x11/modular-xorg-server/patches/patch-dix_pixmap.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/modular-xorg-server/patches/patch-dix_pixmap.c        Fri Jul 31 16:50:57 2020 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-dix_pixmap.c,v 1.1 2020/07/31 16:50:57 maya Exp $
+
+From aac28e162e5108510065ad4c323affd6deffd816 Mon Sep 17 00:00:00 2001
+From: Matthieu Herrb <matthieu%herrb.eu@localhost>
+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%herrb.eu@localhost>
+Reviewed-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+--- dix/pixmap.c.orig  2020-03-29 20:21:15.000000000 +0000
++++ dix/pixmap.c
+@@ -117,7 +117,7 @@ AllocatePixmap(ScreenPtr pScreen, int pi
+     if (pScreen->totalPixmapSize > ((size_t) - 1) - pixDataSize)
+         return NullPixmap;
+ 
+-    pPixmap = malloc(pScreen->totalPixmapSize + pixDataSize);
++    pPixmap = calloc(1, pScreen->totalPixmapSize + pixDataSize);
+     if (!pPixmap)
+         return NullPixmap;
+ 
diff -r e75d494b9334 -r da7872835f8d x11/modular-xorg-xephyr/Makefile
--- a/x11/modular-xorg-xephyr/Makefile  Fri Jul 31 16:37:14 2020 +0000
+++ b/x11/modular-xorg-xephyr/Makefile  Fri Jul 31 16:50:57 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.19 2020/05/22 10:56:48 adam Exp $
+# $NetBSD: Makefile,v 1.20 2020/07/31 16:50:57 maya Exp $
 
 DISTNAME=      xorg-server-${XORG_VERSION}
 PKGNAME=       modular-xorg-xephyr-${XORG_VERSION}
-PKGREVISION=   1
+PKGREVISION=   2
 
 DISTINFO_FILE=         ${.CURDIR}/../../x11/modular-xorg-server/distinfo
 PATCHDIR=              ${.CURDIR}/../../x11/modular-xorg-server/patches
diff -r e75d494b9334 -r da7872835f8d x11/modular-xorg-xwayland/Makefile
--- a/x11/modular-xorg-xwayland/Makefile        Fri Jul 31 16:37:14 2020 +0000
+++ b/x11/modular-xorg-xwayland/Makefile        Fri Jul 31 16:50:57 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2020/05/22 10:56:48 adam Exp $
+# $NetBSD: Makefile,v 1.8 2020/07/31 16:50:57 maya Exp $
 
 DISTNAME=      xorg-server-${XORG_VERSION}
 PKGNAME=       modular-xorg-xwayland-${XORG_VERSION}
-PKGREVISION=   1
+PKGREVISION=   2
 
 DISTINFO_FILE=         ${.CURDIR}/../../x11/modular-xorg-server/distinfo
 PATCHDIR=              ${.CURDIR}/../../x11/modular-xorg-server/patches



Home | Main Index | Thread Index | Old Index