diff options
author | xtraeme <xtraeme@pkgsrc.org> | 2005-09-18 19:33:42 +0000 |
---|---|---|
committer | xtraeme <xtraeme@pkgsrc.org> | 2005-09-18 19:33:42 +0000 |
commit | 3fbb85e5cb80db70cf0a15c37308c147b0a2764c (patch) | |
tree | c9eef251f90996d60be2ae3d1a7d90725aec8359 /x11 | |
parent | 6c3afcf56d63f7ecb57692cca3ded3e34add1336 (diff) | |
download | pkgsrc-3fbb85e5cb80db70cf0a15c37308c147b0a2764c.tar.gz |
Apply patch from FreeBSD ports to fix CAN-2005-2495.
Bump BUILDLINK_RECOMMENDED and PKGREVISION.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/xorg-libs/Makefile | 4 | ||||
-rw-r--r-- | x11/xorg-libs/buildlink3.mk | 4 | ||||
-rw-r--r-- | x11/xorg-libs/distinfo | 3 | ||||
-rw-r--r-- | x11/xorg-libs/patches/patch-bm | 187 |
4 files changed, 193 insertions, 5 deletions
diff --git a/x11/xorg-libs/Makefile b/x11/xorg-libs/Makefile index 410d2462dc0..2e6b64754f1 100644 --- a/x11/xorg-libs/Makefile +++ b/x11/xorg-libs/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.22 2005/04/15 16:38:07 hira Exp $ +# $NetBSD: Makefile,v 1.23 2005/09/18 19:33:42 xtraeme Exp $ DISTNAME= ${DISTFILES} PKGNAME= xorg-libs-${XORG_VER} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_XORG} DISTFILES= X11R${XORG_VER}-src1.tar.gz X11R${XORG_VER}-src2.tar.gz \ diff --git a/x11/xorg-libs/buildlink3.mk b/x11/xorg-libs/buildlink3.mk index 1620f280be5..67c6f451ac7 100644 --- a/x11/xorg-libs/buildlink3.mk +++ b/x11/xorg-libs/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.9 2005/04/14 21:35:51 xtraeme Exp $ +# $NetBSD: buildlink3.mk,v 1.10 2005/09/18 19:33:42 xtraeme Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ XORG_LIBS_BUILDLINK3_MK:= ${XORG_LIBS_BUILDLINK3_MK}+ @@ -19,7 +19,7 @@ BUILDLINK_PACKAGES:= xorg-libs ${BUILDLINK_PACKAGES} .if !empty(XORG_LIBS_BUILDLINK3_MK:M+) BUILDLINK_DEPENDS.xorg-libs+= xorg-libs>=6.8.1 -BUILDLINK_RECOMMENDED.xorg-libs+= xorg-libs>=6.8.2nb1 +BUILDLINK_RECOMMENDED.xorg-libs+= xorg-libs>=6.8.2nb2 BUILDLINK_PKGSRCDIR.xorg-libs?= ../../x11/xorg-libs BUILDLINK_TRANSFORM.xorg-libs+= -e "s|/${X11ROOT_PREFIX}/|/|" diff --git a/x11/xorg-libs/distinfo b/x11/xorg-libs/distinfo index 4504a5094ed..dc92de27a9d 100644 --- a/x11/xorg-libs/distinfo +++ b/x11/xorg-libs/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.21 2005/06/07 02:43:26 xtraeme Exp $ +$NetBSD: distinfo,v 1.22 2005/09/18 19:33:42 xtraeme Exp $ SHA1 (X11R6.8.2-src1.tar.gz) = 23c60680274062a1db17f646a8388149309dc45c RMD160 (X11R6.8.2-src1.tar.gz) = bb170d7a11416c3d9bd1d23d461ba4cea9b1b2c8 @@ -45,3 +45,4 @@ SHA1 (patch-bi) = 4afc732ca451004b600c431ef76956d64317654c SHA1 (patch-bj) = 263336947f34b98c054b75dba204756c8b8f488f SHA1 (patch-bk) = e8b5eca5ce2d3acc77797f16f956dfc9a2fcacc8 SHA1 (patch-bl) = 061ef890491cc131e70c6329a30c9f28a301df92 +SHA1 (patch-bm) = 7cd02712c1ae4ca070564d2f7b5cb4e3e5b6e93b diff --git a/x11/xorg-libs/patches/patch-bm b/x11/xorg-libs/patches/patch-bm new file mode 100644 index 00000000000..00b12341e7e --- /dev/null +++ b/x11/xorg-libs/patches/patch-bm @@ -0,0 +1,187 @@ +$NetBSD: patch-bm,v 1.1 2005/09/18 19:33:42 xtraeme Exp $ + +Single patch to fix CAN-2005-2495. + +--- programs/Xserver/afb/afbpixmap.c.orig Fri Apr 23 20:59:39 2004 ++++ programs/Xserver/afb/afbpixmap.c Sun Sep 18 04:56:02 2005 +@@ -73,10 +73,14 @@ + int depth; + { + PixmapPtr pPixmap; +- int datasize; +- int paddedWidth; ++ size_t datasize; ++ size_t paddedWidth; + + paddedWidth = BitmapBytePad(width); ++ ++ if (paddedWidth > 32767 || height > 32767 || depth > 4) ++ return NullPixmap; ++ + datasize = height * paddedWidth * depth; + pPixmap = AllocatePixmap(pScreen, datasize); + if (!pPixmap) +--- programs/Xserver/cfb/cfbpixmap.c.orig Fri Apr 23 21:00:12 2004 ++++ programs/Xserver/cfb/cfbpixmap.c Sun Sep 18 04:56:02 2005 +@@ -70,10 +70,13 @@ + int depth; + { + PixmapPtr pPixmap; +- int datasize; +- int paddedWidth; ++ size_t datasize; ++ size_t paddedWidth; + + paddedWidth = PixmapBytePad(width, depth); ++ ++ if (paddedWidth / 4 > 32767 || height > 32767) ++ return NullPixmap; + datasize = height * paddedWidth; + pPixmap = AllocatePixmap(pScreen, datasize); + if (!pPixmap) +--- programs/Xserver/dix/dispatch.c.orig Mon Dec 13 02:23:05 2004 ++++ programs/Xserver/dix/dispatch.c Sun Sep 18 04:56:02 2005 +@@ -1506,6 +1506,23 @@ + client->errorValue = 0; + return BadValue; + } ++ if (stuff->width > 32767 || stuff->height > 32767) ++ { ++ /* It is allowed to try and allocate a pixmap which is larger than ++ * 32767 in either dimension. However, all of the framebuffer code ++ * is buggy and does not reliably draw to such big pixmaps, basically ++ * because the Region data structure operates with signed shorts ++ * for the rectangles in it. ++ * ++ * Furthermore, several places in the X server computes the ++ * size in bytes of the pixmap and tries to store it in an ++ * integer. This integer can overflow and cause the allocated size ++ * to be much smaller. ++ * ++ * So, such big pixmaps are rejected here with a BadAlloc ++ */ ++ return BadAlloc; ++ } + if (stuff->depth != 1) + { + pDepth = pDraw->pScreen->allowedDepths; +--- programs/Xserver/dix/pixmap.c.orig Fri Apr 23 21:04:44 2004 ++++ programs/Xserver/dix/pixmap.c Sun Sep 18 04:56:02 2005 +@@ -126,6 +126,9 @@ + unsigned size; + int i; + ++ if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize) ++ return NullPixmap; ++ + pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize); + if (!pPixmap) + return NullPixmap; +--- programs/Xserver/fb/fbpixmap.c.orig Mon Aug 9 05:40:50 2004 ++++ programs/Xserver/fb/fbpixmap.c Sun Sep 18 04:56:02 2005 +@@ -32,12 +32,14 @@ + fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) + { + PixmapPtr pPixmap; +- int datasize; +- int paddedWidth; ++ size_t datasize; ++ size_t paddedWidth; + int adjust; + int base; + + paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits); ++ if (paddedWidth / 4 > 32767 || height > 32767) ++ return NullPixmap; + datasize = height * paddedWidth; + #ifdef PIXPRIV + base = pScreen->totalPixmapSize; +--- programs/Xserver/hw/xfree86/xaa/xaaInit.c.orig Fri Jul 30 22:30:56 2004 ++++ programs/Xserver/hw/xfree86/xaa/xaaInit.c Sun Sep 18 04:56:02 2005 +@@ -498,6 +498,9 @@ + XAAPixmapPtr pPriv; + PixmapPtr pPix = NULL; + int size = w * h; ++ ++ if (w > 32767 || h > 32767) ++ return NullPixmap; + + if (!infoRec->offscreenDepthsInitialized) + XAAInitializeOffscreenDepths (pScreen); +--- programs/Xserver/hw/xfree86/xf4bpp/ppcPixmap.c.orig Fri Apr 23 21:54:17 2004 ++++ programs/Xserver/hw/xfree86/xf4bpp/ppcPixmap.c Sun Sep 18 04:56:02 2005 +@@ -85,7 +85,7 @@ + int depth ; + { + register PixmapPtr pPixmap = (PixmapPtr)NULL; +- int size ; ++ size_t size ; + + TRACE(("xf4bppCreatePixmap(pScreen=0x%x, width=%d, height=%d, depth=%d)\n", pScreen, width, height, depth)) ; + +@@ -93,6 +93,10 @@ + return (PixmapPtr) NULL ; + + size = PixmapBytePad(width, depth); ++ ++ if (size / 4 > 32767 || height > 32767) ++ return (PixmapPtr) NULL ; ++ + pPixmap = AllocatePixmap (pScreen, (height * size)); + + if ( !pPixmap ) +--- programs/Xserver/ilbm/ilbmpixmap.c.orig Fri Apr 23 21:54:22 2004 ++++ programs/Xserver/ilbm/ilbmpixmap.c Sun Sep 18 04:56:02 2005 +@@ -75,10 +75,12 @@ + int depth; + { + PixmapPtr pPixmap; +- int datasize; +- int paddedWidth; ++ size_t datasize; ++ size_t paddedWidth; + + paddedWidth = BitmapBytePad(width); ++ if (paddedWidth > 32767 || height > 32767 || depth > 4) ++ return NullPixmap; + datasize = height * paddedWidth * depth; + pPixmap = AllocatePixmap(pScreen, datasize); + if (!pPixmap) +--- programs/Xserver/iplan2p4/iplpixmap.c.orig Fri Apr 23 21:54:24 2004 ++++ programs/Xserver/iplan2p4/iplpixmap.c Sun Sep 18 04:56:02 2005 +@@ -74,12 +74,14 @@ + int depth; + { + PixmapPtr pPixmap; +- int datasize; +- int paddedWidth; ++ size_t datasize; ++ size_t paddedWidth; + int ipad=INTER_PLANES*2 - 1; + + paddedWidth = PixmapBytePad(width, depth); + paddedWidth = (paddedWidth + ipad) & ~ipad; ++ if (paddedWidth / 4 > 32767 || height > 32767) ++ return NullPixmap; + datasize = height * paddedWidth; + pPixmap = AllocatePixmap(pScreen, datasize); + if (!pPixmap) +--- programs/Xserver/mfb/mfbpixmap.c.orig Fri Nov 14 17:48:57 2003 ++++ programs/Xserver/mfb/mfbpixmap.c Sun Sep 18 04:56:02 2005 +@@ -72,12 +72,14 @@ + int depth; + { + PixmapPtr pPixmap; +- int datasize; +- int paddedWidth; ++ size_t datasize; ++ size_t paddedWidth; + + if (depth != 1) + return NullPixmap; + paddedWidth = BitmapBytePad(width); ++ if (paddedWidth / 4 > 32767 || height > 32767) ++ return NullPixmap; + datasize = height * paddedWidth; + pPixmap = AllocatePixmap(pScreen, datasize); + if (!pPixmap) |