aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2018-11-06 15:48:36 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-11-06 15:48:39 +0000
commit684888b0f6c5624eef4f30a93821830c29483953 (patch)
tree3532c6b243c10f174a5d817fd10aed54436660ce
parent949010814f11ac10dd7a4b0ccf70090b10aa29bd (diff)
main/pango: security fix (CVE-2018-15120)
Fixes #9449
-rw-r--r--main/pango/APKBUILD13
-rw-r--r--main/pango/CVE-2018-15120.patch36
2 files changed, 46 insertions, 3 deletions
diff --git a/main/pango/APKBUILD b/main/pango/APKBUILD
index d4e13676cb1..cacd653b06a 100644
--- a/main/pango/APKBUILD
+++ b/main/pango/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pango
pkgver=1.40.14
-pkgrel=0
+pkgrel=1
pkgdesc="A library for layout and rendering of text"
url="http://www.pango.org/"
arch="all"
@@ -12,7 +12,13 @@ makedepends="$depends_dev cairo-dev expat-dev gobject-introspection-dev
fontconfig-dev freetype-dev glib-dev harfbuzz-dev libxft-dev"
install="$pkgname.pre-deinstall"
triggers="$pkgname.trigger=/usr/lib/pango/*/modules"
-source="https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
+source="https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
+ CVE-2018-15120.patch
+ "
+
+# secfixes
+# 1.40.14-r1:
+# - CVE-2018-15120
build () {
cd "$srcdir"/$pkgname-$pkgver
@@ -31,4 +37,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="35ba7bc8be3992f206ccc2cc5aca0b94e2a3832f887fc9c45b0e29fddcb9051ce05a74377de0ca4ff95a87983b15688fa5d379d592faf87aa8eaca25ac18b7ea pango-1.40.14.tar.xz"
+sha512sums="35ba7bc8be3992f206ccc2cc5aca0b94e2a3832f887fc9c45b0e29fddcb9051ce05a74377de0ca4ff95a87983b15688fa5d379d592faf87aa8eaca25ac18b7ea pango-1.40.14.tar.xz
+5c5f1a094f6a896e17f06b755e6024661eef6bc5b1a7d5f4208aa17e6305b029d929c3a2ca15f65db50d89bb6e62218828f3a90aa0e76d9145cfa2f7dfe66885 CVE-2018-15120.patch"
diff --git a/main/pango/CVE-2018-15120.patch b/main/pango/CVE-2018-15120.patch
new file mode 100644
index 00000000000..4d50fd8cf05
--- /dev/null
+++ b/main/pango/CVE-2018-15120.patch
@@ -0,0 +1,36 @@
+From 71aaeaf020340412b8d012fe23a556c0420eda5f Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Fri, 17 Aug 2018 22:29:36 -0400
+Subject: [PATCH] Prevent an assertion with invalid Unicode sequences
+
+Invalid Unicode sequences, such as 0x2665 0xfe0e 0xfe0f,
+can trick the Emoji iter code into returning an empty
+segment, which then triggers an assertion in the itemizer.
+
+Prevent this by ensuring that we make progress.
+
+This issue was reported by Jeffrey M.
+---
+ pango/pango-emoji.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/pango/pango-emoji.c b/pango/pango-emoji.c
+index 0e332dff..29472452 100644
+--- a/pango/pango-emoji.c
++++ b/pango/pango-emoji.c
+@@ -253,6 +253,12 @@ _pango_emoji_iter_next (PangoEmojiIter *iter)
+ if (iter->is_emoji == PANGO_EMOJI_TYPE_IS_EMOJI (current_emoji_type))
+ {
+ iter->is_emoji = !PANGO_EMOJI_TYPE_IS_EMOJI (current_emoji_type);
++
++ /* Make sure we make progress. Weird sequences, like a VC15 followed
++ * by VC16, can trick us into stalling otherwise. */
++ if (iter->start == iter->end)
++ iter->end = g_utf8_next_char (iter->end);
++
+ return TRUE;
+ }
+ }
+--
+2.18.1
+