Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/pango/files/, x11-libs/pango/
Date: Thu, 15 Aug 2019 11:36:26
Message-Id: 1565868956.39892b09bb0b45155d545c6fd9fec43a99ca4ecc.leio@gentoo
1 commit: 39892b09bb0b45155d545c6fd9fec43a99ca4ecc
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 15 11:30:15 2019 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 15 11:35:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39892b09
7
8 x11-libs/pango: fix CVE-2019-1010238
9
10 Bug: https://bugs.gentoo.org/692110
11 Package-Manager: Portage-2.3.62, Repoman-2.3.12
12 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
13
14 x11-libs/pango/files/1.42.4-CVE-2019-1010238.patch | 34 ++++++++++
15 x11-libs/pango/pango-1.42.4-r2.ebuild | 72 ++++++++++++++++++++++
16 2 files changed, 106 insertions(+)
17
18 diff --git a/x11-libs/pango/files/1.42.4-CVE-2019-1010238.patch b/x11-libs/pango/files/1.42.4-CVE-2019-1010238.patch
19 new file mode 100644
20 index 00000000000..eaf0784c1b3
21 --- /dev/null
22 +++ b/x11-libs/pango/files/1.42.4-CVE-2019-1010238.patch
23 @@ -0,0 +1,34 @@
24 +From 490f8979a260c16b1df055eab386345da18a2d54 Mon Sep 17 00:00:00 2001
25 +From: Matthias Clasen <mclasen@××××××.com>
26 +Date: Wed, 10 Jul 2019 20:26:23 -0400
27 +Subject: [PATCH] bidi: Be safer against bad input
28 +
29 +Don't run off the end of an array that we
30 +allocated to certain length.
31 +
32 +Closes: https://gitlab.gnome.org/GNOME/pango/issues/342
33 +---
34 + pango/pango-bidi-type.c | 7 +++++--
35 + 1 file changed, 5 insertions(+), 2 deletions(-)
36 +
37 +diff --git a/pango/pango-bidi-type.c b/pango/pango-bidi-type.c
38 +index 3e46b66c..5c02dbbb 100644
39 +--- a/pango/pango-bidi-type.c
40 ++++ b/pango/pango-bidi-type.c
41 +@@ -181,8 +181,11 @@ pango_log2vis_get_embedding_levels (const gchar *text,
42 + for (i = 0, p = text; p < text + length; p = g_utf8_next_char(p), i++)
43 + {
44 + gunichar ch = g_utf8_get_char (p);
45 +- FriBidiCharType char_type;
46 +- char_type = fribidi_get_bidi_type (ch);
47 ++ FriBidiCharType char_type = fribidi_get_bidi_type (ch);
48 ++
49 ++ if (i == n_chars)
50 ++ break;
51 ++
52 + bidi_types[i] = char_type;
53 + ored_types |= char_type;
54 + if (FRIBIDI_IS_STRONG (char_type))
55 +--
56 +2.21.0
57 +
58
59 diff --git a/x11-libs/pango/pango-1.42.4-r2.ebuild b/x11-libs/pango/pango-1.42.4-r2.ebuild
60 new file mode 100644
61 index 00000000000..7d103157839
62 --- /dev/null
63 +++ b/x11-libs/pango/pango-1.42.4-r2.ebuild
64 @@ -0,0 +1,72 @@
65 +# Copyright 1999-2019 Gentoo Authors
66 +# Distributed under the terms of the GNU General Public License v2
67 +
68 +EAPI=6
69 +GNOME2_LA_PUNT="yes"
70 +
71 +inherit gnome2 multilib-minimal toolchain-funcs
72 +
73 +DESCRIPTION="Internationalized text layout and rendering library"
74 +HOMEPAGE="https://www.pango.org/"
75 +SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz"
76 +
77 +LICENSE="LGPL-2+ FTL"
78 +SLOT="0"
79 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
80 +
81 +IUSE="X +introspection test"
82 +
83 +RDEPEND="
84 + >=media-libs/harfbuzz-1.4.2:=[glib(+),truetype(+),${MULTILIB_USEDEP}]
85 + >=dev-libs/glib-2.50.2:2[${MULTILIB_USEDEP}]
86 + >=media-libs/fontconfig-2.12.92:1.0=[${MULTILIB_USEDEP}]
87 + >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}]
88 + >=x11-libs/cairo-1.12.14-r4:=[X?,${MULTILIB_USEDEP}]
89 + >=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}]
90 + introspection? ( >=dev-libs/gobject-introspection-0.9.5:= )
91 + X? (
92 + >=x11-libs/libXrender-0.9.8[${MULTILIB_USEDEP}]
93 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
94 + >=x11-libs/libXft-2.3.1-r1[${MULTILIB_USEDEP}]
95 + )
96 +"
97 +DEPEND="${RDEPEND}
98 + dev-util/glib-utils
99 + >=dev-util/gtk-doc-am-1.20
100 + virtual/pkgconfig[${MULTILIB_USEDEP}]
101 + test? ( media-fonts/cantarell )
102 + X? ( x11-base/xorg-proto )
103 + !<=sys-devel/autoconf-2.63:2.5
104 +"
105 +
106 +PATCHES=(
107 + "${WORKDIR}"/patches/ # bug fix cherry-picks from master by 20190216; each patch has commit id of origin/master included and will be part of 1.43.1/1.44
108 + "${FILESDIR}"/${PV}-CVE-2019-1010238.patch
109 +)
110 +
111 +src_prepare() {
112 + gnome2_src_prepare
113 + # This should be updated if next release fails to pre-generate the manpage as well, or src_prepare removed if is properly generated
114 + # https://gitlab.gnome.org/GNOME/pango/issues/270
115 + cp -v "${FILESDIR}"/${PV}-pango-view.1.in "${S}/utils/pango-view.1.in" || die
116 +}
117 +
118 +multilib_src_configure() {
119 + tc-export CXX
120 +
121 + ECONF_SOURCE=${S} \
122 + gnome2_src_configure \
123 + --with-cairo \
124 + $(multilib_native_use_enable introspection) \
125 + $(use_with X xft) \
126 + "$(usex X --x-includes="${EPREFIX}/usr/include" "")" \
127 + "$(usex X --x-libraries="${EPREFIX}/usr/$(get_libdir)" "")"
128 +
129 + if multilib_is_native_abi; then
130 + ln -s "${S}"/docs/html docs/html || die
131 + fi
132 +}
133 +
134 +multilib_src_install() {
135 + gnome2_src_install
136 +}