diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2021-02-25 13:40:07 +0100 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2021-02-25 13:40:07 +0100 |
commit | d7dba2fc465810d9cf1a690cdfa878d74c245530 (patch) | |
tree | 1c8341ee804e2b99cbd6a3e8808d56bb61f30db5 | |
parent | 2a8bd0c3ec7d7286dd026c2535f523ce889ecda4 (diff) | |
download | aports-d7dba2fc465810d9cf1a690cdfa878d74c245530.tar.gz aports-d7dba2fc465810d9cf1a690cdfa878d74c245530.tar.bz2 aports-d7dba2fc465810d9cf1a690cdfa878d74c245530.tar.xz |
main/gdk-pixbuf: add patch for CVE-2021-20240
ref #12476
-rw-r--r-- | main/gdk-pixbuf/80704d84055d8f33cd66824d78d16b89fc45db45.patch | 36 | ||||
-rw-r--r-- | main/gdk-pixbuf/APKBUILD | 8 |
2 files changed, 41 insertions, 3 deletions
diff --git a/main/gdk-pixbuf/80704d84055d8f33cd66824d78d16b89fc45db45.patch b/main/gdk-pixbuf/80704d84055d8f33cd66824d78d16b89fc45db45.patch new file mode 100644 index 0000000000..a6850274b2 --- /dev/null +++ b/main/gdk-pixbuf/80704d84055d8f33cd66824d78d16b89fc45db45.patch @@ -0,0 +1,36 @@ +From 80704d84055d8f33cd66824d78d16b89fc45db45 Mon Sep 17 00:00:00 2001 +From: Emmanuele Bassi <ebassi@gnome.org> +Date: Wed, 1 Apr 2020 18:11:55 +0100 +Subject: [PATCH] Check the memset length argument + +Avoid overflows by using the checked multiplication macro for gsize. + +Fixes: #132 +--- + gdk-pixbuf/io-gif-animation.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/gdk-pixbuf/io-gif-animation.c b/gdk-pixbuf/io-gif-animation.c +index c9db3c66e..49674fd2e 100644 +--- a/gdk-pixbuf/io-gif-animation.c ++++ b/gdk-pixbuf/io-gif-animation.c +@@ -412,11 +412,15 @@ gdk_pixbuf_gif_anim_iter_get_pixbuf (GdkPixbufAnimationIter *anim_iter) + + /* If no rendered frame, render the first frame */ + if (anim->last_frame == NULL) { ++ gsize len = 0; + if (anim->last_frame_data == NULL) + anim->last_frame_data = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, anim->width, anim->height); + if (anim->last_frame_data == NULL) + return NULL; +- memset (gdk_pixbuf_get_pixels (anim->last_frame_data), 0, gdk_pixbuf_get_rowstride (anim->last_frame_data) * anim->height); ++ if (g_size_checked_mul (&len, gdk_pixbuf_get_rowstride (anim->last_frame_data), anim->height)) ++ memset (gdk_pixbuf_get_pixels (anim->last_frame_data), 0, len); ++ else ++ return NULL; + composite_frame (anim, g_list_nth_data (anim->frames, 0)); + } + +-- +GitLab + diff --git a/main/gdk-pixbuf/APKBUILD b/main/gdk-pixbuf/APKBUILD index 0c535d4d46..73d97295e5 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=2 +pkgrel=3 pkgdesc="GTK+ image loading library" url="https://wiki.gnome.org/Projects/GdkPixbuf" arch="all" @@ -15,7 +15,8 @@ makedepends="tiff-dev libjpeg-turbo-dev gobject-introspection-dev 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" +source="https://download.gnome.org/sources/gdk-pixbuf/${pkgver%.*}/gdk-pixbuf-$pkgver.tar.xz + 80704d84055d8f33cd66824d78d16b89fc45db45.patch" replaces="gtk+" # secfixes: @@ -60,4 +61,5 @@ dev() { default_dev } -sha512sums="6512befd379494dbfd89a16fc4c92641842eb7b82fc820ec83a5b057526209947db646570db1124c073b0ef69c117bdf0f8d3fea807e302a4950db39187c35aa gdk-pixbuf-2.40.0.tar.xz" +sha512sums="6512befd379494dbfd89a16fc4c92641842eb7b82fc820ec83a5b057526209947db646570db1124c073b0ef69c117bdf0f8d3fea807e302a4950db39187c35aa gdk-pixbuf-2.40.0.tar.xz +7dcb3c295ffd6701170e46cb6163939b087f41d928cb455a31f704fb9660dc110bf464a9a14af6296d5a17c9270ac9f0412dd949a9428644bf8a6e9f22ad0b62 80704d84055d8f33cd66824d78d16b89fc45db45.patch" |