aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2021-06-09 14:16:51 -0600
committerAriadne Conill <ariadne@dereferenced.org>2021-06-09 14:19:57 -0600
commitdd281d50f12f83584a449755a44ba09e1ba54fbf (patch)
tree5726c81660ed9175d7c971384f547b7762fda02d
parentf7d64f9e625a0d6b1b2e976115fe69d82e1bb68a (diff)
downloadaports-dd281d50f12f83584a449755a44ba09e1ba54fbf.tar.gz
aports-dd281d50f12f83584a449755a44ba09e1ba54fbf.tar.bz2
aports-dd281d50f12f83584a449755a44ba09e1ba54fbf.tar.xz
main/gdk-pixbuf: add mitigation for CVE-2020-29385, add missing secfixes data for CVE-2021-20240
-rw-r--r--main/gdk-pixbuf/APKBUILD16
-rw-r--r--main/gdk-pixbuf/CVE-2020-29385.patch48
2 files changed, 60 insertions, 4 deletions
diff --git a/main/gdk-pixbuf/APKBUILD b/main/gdk-pixbuf/APKBUILD
index 723047b2e1..64760d44b7 100644
--- a/main/gdk-pixbuf/APKBUILD
+++ b/main/gdk-pixbuf/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gdk-pixbuf
pkgver=2.40.0
-pkgrel=1
+pkgrel=2
pkgdesc="GTK+ image loading library"
url="https://wiki.gnome.org/Projects/GdkPixbuf"
arch="all"
@@ -16,10 +16,15 @@ install="$pkgname.pre-deinstall"
triggers="$pkgname.trigger=/usr/lib/gdk-pixbuf-2.0/*/loaders"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-dbg"
source="https://download.gnome.org/sources/gdk-pixbuf/${pkgver%.*}/gdk-pixbuf-$pkgver.tar.xz
- 80704d84055d8f33cd66824d78d16b89fc45db45.patch"
+ 80704d84055d8f33cd66824d78d16b89fc45db45.patch
+ CVE-2020-29385.patch"
replaces="gtk+"
# secfixes:
+# 2.40.0-r2:
+# - CVE-2020-29385
+# 2.40.0-r1:
+# - CVE-2021-20240
# 2.36.6-r1:
# - CVE-2017-6311
# - CVE-2017-6312
@@ -64,5 +69,8 @@ dev() {
default_dev
}
-sha512sums="6512befd379494dbfd89a16fc4c92641842eb7b82fc820ec83a5b057526209947db646570db1124c073b0ef69c117bdf0f8d3fea807e302a4950db39187c35aa gdk-pixbuf-2.40.0.tar.xz
-7dcb3c295ffd6701170e46cb6163939b087f41d928cb455a31f704fb9660dc110bf464a9a14af6296d5a17c9270ac9f0412dd949a9428644bf8a6e9f22ad0b62 80704d84055d8f33cd66824d78d16b89fc45db45.patch"
+sha512sums="
+6512befd379494dbfd89a16fc4c92641842eb7b82fc820ec83a5b057526209947db646570db1124c073b0ef69c117bdf0f8d3fea807e302a4950db39187c35aa gdk-pixbuf-2.40.0.tar.xz
+7dcb3c295ffd6701170e46cb6163939b087f41d928cb455a31f704fb9660dc110bf464a9a14af6296d5a17c9270ac9f0412dd949a9428644bf8a6e9f22ad0b62 80704d84055d8f33cd66824d78d16b89fc45db45.patch
+5d66c0c4a80d1658fb02275d18ad4b9d77371067ab90091b49609ac6a8e299ae4768a26fdf7db6457172ea246240b2636974b69e15fe2ec425a2f60537e16624 CVE-2020-29385.patch
+"
diff --git a/main/gdk-pixbuf/CVE-2020-29385.patch b/main/gdk-pixbuf/CVE-2020-29385.patch
new file mode 100644
index 0000000000..2a20c3ba32
--- /dev/null
+++ b/main/gdk-pixbuf/CVE-2020-29385.patch
@@ -0,0 +1,48 @@
+From bdd3acbd48a575d418ba6bf1b32d7bda2fae1c81 Mon Sep 17 00:00:00 2001
+From: Robert Ancell <robert.ancell@canonical.com>
+Date: Mon, 30 Nov 2020 12:26:12 +1300
+Subject: [PATCH] gif: Fix LZW decoder accepting invalid LZW code.
+
+The code value after a reset wasn't being validated, which means we would
+accept invalid codes. This could cause an infinite loop in the decoder.
+
+Fixes CVE-2020-29385
+
+Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/164
+---
+ gdk-pixbuf/lzw.c | 13 +++++++------
+ tests/test-images/fail/hang_114.gif | Bin 0 -> 5561 bytes
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+ create mode 100644 tests/test-images/fail/hang_114.gif
+
+diff --git a/gdk-pixbuf/lzw.c b/gdk-pixbuf/lzw.c
+index 9e052a6f7..105daf2b1 100644
+--- a/gdk-pixbuf/lzw.c
++++ b/gdk-pixbuf/lzw.c
+@@ -195,19 +195,20 @@ lzw_decoder_feed (LZWDecoder *self,
+ if (self->last_code != self->clear_code && self->code_table_size < MAX_CODES) {
+ if (self->code < self->code_table_size)
+ add_code (self, self->code);
+- else if (self->code == self->code_table_size)
++ else
+ add_code (self, self->last_code);
+- else {
+- /* Invalid code received - just stop here */
+- self->last_code = self->eoi_code;
+- return output_length;
+- }
+
+ /* When table is full increase code size */
+ if (self->code_table_size == (1 << self->code_size) && self->code_size < LZW_CODE_MAX)
+ self->code_size++;
+ }
+
++ /* Invalid code received - just stop here */
++ if (self->code >= self->code_table_size) {
++ self->last_code = self->eoi_code;
++ return output_length;
++ }
++
+ /* Convert codeword into indexes */
+ n_written += write_indexes (self, output + n_written, output_length - n_written);
+ }