diff options
author | maya <maya@pkgsrc.org> | 2020-07-31 16:50:57 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2020-07-31 16:50:57 +0000 |
commit | bc342a44937a6acd48867a2320a69ccd49ed0a74 (patch) | |
tree | dea3b8863a1388106243ec2fbadaf9e8abed5173 | |
parent | 503784cf9c4d502a0e2a4a6bde3f15c403739f0f (diff) | |
download | pkgsrc-bc342a44937a6acd48867a2320a69ccd49ed0a74.tar.gz |
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.
-rw-r--r-- | x11/modular-xorg-server/Makefile | 4 | ||||
-rw-r--r-- | x11/modular-xorg-server/distinfo | 3 | ||||
-rw-r--r-- | x11/modular-xorg-server/patches/patch-dix_pixmap.c | 27 | ||||
-rw-r--r-- | x11/modular-xorg-xephyr/Makefile | 4 | ||||
-rw-r--r-- | x11/modular-xorg-xwayland/Makefile | 4 |
5 files changed, 35 insertions, 7 deletions
diff --git a/x11/modular-xorg-server/Makefile b/x11/modular-xorg-server/Makefile index 64ae960761f..db3c39a0340 100644 --- a/x11/modular-xorg-server/Makefile +++ b/x11/modular-xorg-server/Makefile @@ -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 COMMENT= Modular X11 server from modular X.org diff --git a/x11/modular-xorg-server/distinfo b/x11/modular-xorg-server/distinfo index d523491c983..b28212e9ffe 100644 --- a/x11/modular-xorg-server/distinfo +++ b/x11/modular-xorg-server/distinfo @@ -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 --git a/x11/modular-xorg-server/patches/patch-dix_pixmap.c b/x11/modular-xorg-server/patches/patch-dix_pixmap.c new file mode 100644 index 00000000000..8711a558c00 --- /dev/null +++ b/x11/modular-xorg-server/patches/patch-dix_pixmap.c @@ -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> +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> +Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +--- 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 --git a/x11/modular-xorg-xephyr/Makefile b/x11/modular-xorg-xephyr/Makefile index 57deacef38d..e0c511cef96 100644 --- a/x11/modular-xorg-xephyr/Makefile +++ b/x11/modular-xorg-xephyr/Makefile @@ -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 --git a/x11/modular-xorg-xwayland/Makefile b/x11/modular-xorg-xwayland/Makefile index e99fb5e872a..4ed833cf6b8 100644 --- a/x11/modular-xorg-xwayland/Makefile +++ b/x11/modular-xorg-xwayland/Makefile @@ -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 |