diff options
Diffstat (limited to 'dev-libs/libcroco')
-rw-r--r-- | dev-libs/libcroco/Manifest | 7 | ||||
-rw-r--r-- | dev-libs/libcroco/files/0.6.12-CVE-2017-7960.patch | 40 | ||||
-rw-r--r-- | dev-libs/libcroco/files/0.6.12-CVE-2017-7961.patch | 42 | ||||
-rw-r--r-- | dev-libs/libcroco/libcroco-0.6.12-r1.ebuild | 59 | ||||
-rw-r--r-- | dev-libs/libcroco/metadata.xml | 16 |
5 files changed, 164 insertions, 0 deletions
diff --git a/dev-libs/libcroco/Manifest b/dev-libs/libcroco/Manifest new file mode 100644 index 000000000000..290868bd03ff --- /dev/null +++ b/dev-libs/libcroco/Manifest @@ -0,0 +1,7 @@ +AUX 0.6.12-CVE-2017-7960.patch 1285 SHA256 5d1aeec6b3598d52182b06a19e992bbf71264dd660f274a094529eacbe9299e5 SHA512 736240327aeddbb9a2d7272a7dd3dff2b459e5b99bd81ab9d881644c995e51879d9b3e9c8080571bd387d8dd46ab5cf656f8e2b4e3715fd5548ca32b1d77d58d WHIRLPOOL 8f9768be514b2584fd8e68c8cbee873f1243716005f23320eaefa1f795e8ceb77b7667bdc68544d972701a92765bc03a0cf77fb78eca5ba14fb6a2e4aa1dfb5f +AUX 0.6.12-CVE-2017-7961.patch 1437 SHA256 341bdff497a3b4bb86250f0d5b8d6aa7e07106e94a80369bacead98a7882a9d6 SHA512 88cbcaf64e4c8ceb7002ffd05ce5f42880bd37a25f8c89e927760f0fa982122cde3819ace2e730cc0dd0e093812ad8470e8783477bc2bd10fe05aacf0b3e0e4f WHIRLPOOL 2d0e0273d161ef8e13279e5263344a06ab0a29a85c652575b9ac6ae5b3c4a7c267fc6208b3d54b17a385893403b56ace27ca86594aefdf464ec2e74c3643d90e +DIST libcroco-0.6.12.tar.xz 482028 SHA256 ddc4b5546c9fb4280a5017e2707fbd4839034ed1aba5b7d4372212f34f84f860 SHA512 af9a171d5ccded255b57f170576e67155f12fa0f61ab3e379e907975f77afc37e82e22772c6019b2897cffc15b2425faf3ccfda92b1a45b23eda2519debabeb6 WHIRLPOOL b3626257b56b9e104307cd3da01366a5eb929d0afc6669a80f4a94748c434afdc8c3828e008ab786ab28ca72d799a79804e9a296d9428504829521516366e039 +EBUILD libcroco-0.6.12-r1.ebuild 1467 SHA256 f901e8295b1980a40dd291ab90d7629245ad6c75a1bd2fc343b0385ce030bdae SHA512 ccccc41f71b1a3aef0d43d9f9dc60d313f17ac7a0be6b60eb7ad408074b24bec466232314ed10e216f95c92731c72159dd16b78e75827e9cf9809b83c9523a10 WHIRLPOOL 2e85c8cc46ce45e184d7a5c6f6c5984d359c94751d4e8fe442f2709783ae3eae26b5bd261382b02e47241bc4c2a5ada56da93a2c4ff1943cd7cca602ad251db4 +MISC ChangeLog 5866 SHA256 48e41af81edf5687eb4f7001dd9ad9197f7deeef009cc14761c5a7e33f95929d SHA512 b37dc8155bfcc117a846064d665e0c64e679f8da38547df0941c45cd2f9c8a94975385a5cb79c2d0213c169dd75281d482849bd96e541f8e0a53b76d43ba45a6 WHIRLPOOL e614f3830faf36a882c18fe0fc78d1a74c6933f5e4b9d228c73529226dce9f088a704419199bd3a18fd90f5f5938a9f194156dbb6878ec22ca36125c216dc544 +MISC ChangeLog-2015 12499 SHA256 14e9a132e7166bfbf734190e6ebae3c894407f07768591073f53b8f315ae5554 SHA512 740e50990d2b3dcd3fa391a0e6c4ba05d3daa6edcd64d151e3740d0565eba366ba2385756246da33febe57a6b8566ee3beb6e9799d9f34d23bc5394341485d32 WHIRLPOOL 48593ce74c4db71e7483db8f1270293706a1b9450f0f298eb04d3f7c3d5301add047ad68daeaaaecb0b6c6bd122adf03ebabb218ad4c5fb53778138c854cb798 +MISC metadata.xml 597 SHA256 049c2e541dd1da161011adc1d85d6394d5df0432ed3aa8dc4580222c45009c39 SHA512 9161b1cf0d796d0aeb681374b278be7938bc551316d6d7fc4fc1e19bfff4477f6b12bf606df0eb17c57e08ecb257f358f579a232ce6dbd6cc2f838aee4e2b9bf WHIRLPOOL 08f1da9b902d28ed16f74f6dfde2bd38f8925d338db0920abd7552588fa8f42c64b6eaaa6b76f328957206bc5f1fe0d6b879afdd6a413db239e30fcd90bc85e0 diff --git a/dev-libs/libcroco/files/0.6.12-CVE-2017-7960.patch b/dev-libs/libcroco/files/0.6.12-CVE-2017-7960.patch new file mode 100644 index 000000000000..50095d50b898 --- /dev/null +++ b/dev-libs/libcroco/files/0.6.12-CVE-2017-7960.patch @@ -0,0 +1,40 @@ +From 898e3a8c8c0314d2e6b106809a8e3e93cf9d4394 Mon Sep 17 00:00:00 2001 +From: Ignacio Casal Quinteiro +Date: Sun, 16 Apr 2017 13:13:43 +0200 +Subject: [PATCH 1/3] input: check end of input before reading a byte + +When reading bytes we weren't check that the index wasn't +out of bound and this could produce an invalid read which +could deal to a security bug. +--- +leio: Snipped cosmetic chunks + +diff --git a/src/cr-input.c b/src/cr-input.c +index 49000b1..3b63a88 100644 +--- a/src/cr-input.c ++++ b/src/cr-input.c +@@ -404,6 +404,8 @@ cr_input_get_nb_bytes_left (CRInput const * a_this) + enum CRStatus + cr_input_read_byte (CRInput * a_this, guchar * a_byte) + { ++ gulong nb_bytes_left = 0; ++ + g_return_val_if_fail (a_this && PRIVATE (a_this) + && a_byte, CR_BAD_PARAM_ERROR); + +@@ -413,6 +415,12 @@ cr_input_read_byte (CRInput * a_this, guchar * a_byte) + if (PRIVATE (a_this)->end_of_input == TRUE) + return CR_END_OF_INPUT_ERROR; + ++ nb_bytes_left = cr_input_get_nb_bytes_left (a_this); ++ ++ if (nb_bytes_left < 1) { ++ return CR_END_OF_INPUT_ERROR; ++ } ++ + *a_byte = PRIVATE (a_this)->in_buf[PRIVATE (a_this)->next_byte_index]; + + if (PRIVATE (a_this)->nb_bytes - +-- +2.10.1 + diff --git a/dev-libs/libcroco/files/0.6.12-CVE-2017-7961.patch b/dev-libs/libcroco/files/0.6.12-CVE-2017-7961.patch new file mode 100644 index 000000000000..65a08f4ebabc --- /dev/null +++ b/dev-libs/libcroco/files/0.6.12-CVE-2017-7961.patch @@ -0,0 +1,42 @@ +From 9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 Mon Sep 17 00:00:00 2001 +From: Ignacio Casal Quinteiro <qignacio@amazon.com> +Date: Sun, 16 Apr 2017 13:56:09 +0200 +Subject: [PATCH 3/3] tknzr: support only max long rgb values + +This fixes a possible out of bound when reading rgbs which +are longer than the support MAXLONG +--- + src/cr-tknzr.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/cr-tknzr.c b/src/cr-tknzr.c +index 1a7cfeb..1548c35 100644 +--- a/src/cr-tknzr.c ++++ b/src/cr-tknzr.c +@@ -1279,6 +1279,11 @@ cr_tknzr_parse_rgb (CRTknzr * a_this, CRRgb ** a_rgb) + status = cr_tknzr_parse_num (a_this, &num); + ENSURE_PARSING_COND ((status == CR_OK) && (num != NULL)); + ++ if (num->val > G_MAXLONG) { ++ status = CR_PARSING_ERROR; ++ goto error; ++ } ++ + red = num->val; + cr_num_destroy (num); + num = NULL; +@@ -1298,6 +1303,11 @@ cr_tknzr_parse_rgb (CRTknzr * a_this, CRRgb ** a_rgb) + status = cr_tknzr_parse_num (a_this, &num); + ENSURE_PARSING_COND ((status == CR_OK) && (num != NULL)); + ++ if (num->val > G_MAXLONG) { ++ status = CR_PARSING_ERROR; ++ goto error; ++ } ++ + PEEK_BYTE (a_this, 1, &next_bytes[0]); + if (next_bytes[0] == '%') { + SKIP_CHARS (a_this, 1); +-- +2.10.1 + diff --git a/dev-libs/libcroco/libcroco-0.6.12-r1.ebuild b/dev-libs/libcroco/libcroco-0.6.12-r1.ebuild new file mode 100644 index 000000000000..67c3539760fc --- /dev/null +++ b/dev-libs/libcroco/libcroco-0.6.12-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +GNOME2_LA_PUNT="yes" + +inherit gnome2 multilib-minimal + +DESCRIPTION="Generic Cascading Style Sheet (CSS) parsing and manipulation toolkit" +HOMEPAGE="https://git.gnome.org/browse/libcroco/" + +LICENSE="LGPL-2" +SLOT="0.6" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="test" + +RDEPEND=" + >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] + >=dev-libs/libxml2-2.9.1-r4[${MULTILIB_USEDEP}] +" +DEPEND="${RDEPEND} + dev-util/gtk-doc-am + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +PATCHES=( + "${FILESDIR}"/${PV}-CVE-2017-7960.patch + "${FILESDIR}"/${PV}-CVE-2017-7961.patch +) + +src_prepare() { + if ! use test; then + # don't waste time building tests + sed 's/^\(SUBDIRS .*\=.*\)tests\(.*\)$/\1\2/' -i Makefile.am Makefile.in \ + || die "sed failed" + fi + + gnome2_src_prepare +} + +multilib_src_configure() { + ECONF_SOURCE=${S} \ + gnome2_src_configure \ + --disable-static \ + $([[ ${CHOST} == *-darwin* ]] && echo --disable-Bsymbolic) + + if multilib_is_native_abi; then + ln -s "${S}"/docs/reference/html docs/reference/html || die + fi +} + +multilib_src_install() { + gnome2_src_install +} + +multilib_src_install_all() { + DOCS="AUTHORS ChangeLog HACKING NEWS README TODO" + einstalldocs +} diff --git a/dev-libs/libcroco/metadata.xml b/dev-libs/libcroco/metadata.xml new file mode 100644 index 000000000000..d296a917b37c --- /dev/null +++ b/dev-libs/libcroco/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> +</maintainer> +<longdescription> +The Libcroco project is an effort to build a generic Cascading Style Sheet (CSS) parsing and manipulation toolkit that can be used by GNOME applications in need of CSS support. + +provided is : +A parser module with : A SAC like api and A CSSOM like api. +A CSS2 selection engine +An XML/CSS layout/rendering engine +</longdescription> +</pkgmetadata> |