summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2008-02-29 12:02:40 +0000
committerPeter Volkov <pva@gentoo.org>2008-02-29 12:02:40 +0000
commit54bf231b9641e503608728a0552a55d31bb8df00 (patch)
tree2b8b3632bfd014280333458594f4238e2aa777e7 /app-text
parentbig cleanup of old dosemu stuff (diff)
downloadgentoo-2-54bf231b9641e503608728a0552a55d31bb8df00.tar.gz
gentoo-2-54bf231b9641e503608728a0552a55d31bb8df00.tar.bz2
gentoo-2-54bf231b9641e503608728a0552a55d31bb8df00.zip
Fixed security issue (CVE-2008-0411), bug #208999, thank Robert Buchholz for report and coordination.
(Portage version: 2.1.4.4, RepoMan options: --force)
Diffstat (limited to 'app-text')
-rw-r--r--app-text/ghostscript-gnu/ChangeLog11
-rw-r--r--app-text/ghostscript-gnu/files/ghostscript-8.60-CVE-2008-0411.diff12
-rw-r--r--app-text/ghostscript-gnu/ghostscript-gnu-8.60.0-r2.ebuild96
3 files changed, 117 insertions, 2 deletions
diff --git a/app-text/ghostscript-gnu/ChangeLog b/app-text/ghostscript-gnu/ChangeLog
index 0f9ae76534b7..d7ad9472a6ba 100644
--- a/app-text/ghostscript-gnu/ChangeLog
+++ b/app-text/ghostscript-gnu/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-text/ghostscript-gnu
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gnu/ChangeLog,v 1.35 2007/11/14 06:23:41 corsair Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gnu/ChangeLog,v 1.36 2008/02/29 12:02:39 pva Exp $
+
+*ghostscript-gnu-8.60.0-r2 (29 Feb 2008)
+
+ 29 Feb 2008; <pva@gentoo.org> +files/ghostscript-8.60-CVE-2008-0411.diff,
+ +ghostscript-gnu-8.60.0-r2.ebuild:
+ Fixed security issue (CVE-2008-0411), bug #208999, thank Robert Buchholz for
+ report and coordination.
14 Nov 2007; Markus Rothe <corsair@gentoo.org>
ghostscript-gnu-8.60.0-r1.ebuild:
diff --git a/app-text/ghostscript-gnu/files/ghostscript-8.60-CVE-2008-0411.diff b/app-text/ghostscript-gnu/files/ghostscript-8.60-CVE-2008-0411.diff
new file mode 100644
index 000000000000..a5ddf3a4ff0d
--- /dev/null
+++ b/app-text/ghostscript-gnu/files/ghostscript-8.60-CVE-2008-0411.diff
@@ -0,0 +1,12 @@
+--- src/zicc.c
++++ src/zicc.c 2008-02-05 16:11:59.000000000 +0000
+@@ -77,6 +77,9 @@ zseticcspace(i_ctx_t * i_ctx_p)
+ dict_find_string(op, "N", &pnval);
+ ncomps = pnval->value.intval;
+
++ if (2*ncomps > sizeof(range_buff)/sizeof(float))
++ return_error(e_rangecheck);
++
+ /* verify the DataSource entry */
+ if (dict_find_string(op, "DataSource", &pstrmval) <= 0)
+ return_error(e_undefined);
diff --git a/app-text/ghostscript-gnu/ghostscript-gnu-8.60.0-r2.ebuild b/app-text/ghostscript-gnu/ghostscript-gnu-8.60.0-r2.ebuild
new file mode 100644
index 000000000000..bc9c7d0e4914
--- /dev/null
+++ b/app-text/ghostscript-gnu/ghostscript-gnu-8.60.0-r2.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gnu/ghostscript-gnu-8.60.0-r2.ebuild,v 1.1 2008/02/29 12:02:39 pva Exp $
+
+WANT_AUTOMAKE=1.9
+
+inherit autotools elisp-common eutils versionator flag-o-matic
+
+DESCRIPTION="GNU Ghostscript - patched GPL Ghostscript"
+HOMEPAGE="http://www.gnu.org/software/ghostscript/"
+
+MY_P=gnu-ghostscript-${PV}
+PVM=$(get_version_component_range 1-2)
+SRC_URI="cjk? ( ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200406.tar.gz
+ ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.gz )
+ mirror://gnu/ghostscript/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="X cups cjk gtk jpeg2k"
+
+DEP="virtual/libc
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.2.5
+ >=sys-libs/zlib-1.1.4
+ >=media-libs/tiff-3.7
+ X? ( x11-libs/libXt x11-libs/libXext )
+ gtk? ( >=x11-libs/gtk+-2.0 )
+ cups? ( >=net-print/cups-1.1.20 )
+ !app-text/ghostscript-esp
+ !app-text/ghostscript-gpl"
+
+RDEPEND="${DEP}
+ cjk? ( media-fonts/arphicfonts
+ media-fonts/kochi-substitute
+ media-fonts/baekmuk-fonts )
+ media-fonts/gnu-gs-fonts-std"
+
+DEPEND="${DEP}
+ gtk? ( dev-util/pkgconfig )"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A/adobe-cmaps-200406.tar.gz acro5-cmaps-2001.tar.gz}
+ if use cjk; then
+ cat "${FILESDIR}"/ghostscript-esp-8.15.2-cidfmap.cjk >> "${S}"/lib/cidfmap
+ cat "${FILESDIR}"/ghostscript-esp-8.15.2-FAPIcidfmap.cjk >> "${S}"/lib/FAPIcidfmap
+ cd "${S}"/Resource
+ unpack adobe-cmaps-200406.tar.gz
+ unpack acro5-cmaps-2001.tar.gz
+ cd "${WORKDIR}"
+ fi
+
+ cd "${S}"
+
+ epatch "${FILESDIR}"/ghostscript-CVE-2007-2721.patch
+ epatch "${FILESDIR}"/ghostscript-8.60-CVE-2008-0411.diff
+
+ # search path fix
+ sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
+ -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \
+ -e "s:exdir=.*:exdir=/usr/share/doc/${PF}/examples:" \
+ -e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \
+ -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \
+ Makefile.in src/*.mak || die "sed failed"
+}
+
+src_compile() {
+ econf $(use_with X x) \
+ $(use_with jpeg2k jasper) \
+ $(use_enable cups) \
+ $(use_enable gtk) \
+ --with-ijs \
+ --with-jbig2dec \
+ --disable-compile-inits \
+ --enable-dynamic \
+ || die "econf failed"
+
+ emake -j1 so all || die "emake failed"
+
+ cd ijs
+ econf || die "ijs econf failed"
+ emake || die "ijs emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install-so install || die "emake install failed"
+
+ rm -fr "${D}"/usr/share/doc/${PF}/html/{README,PUBLIC}
+ dodoc doc/README
+
+ cd "${S}"/ijs
+ emake DESTDIR="${D}" install || die "emake ijs install failed"
+}