aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-11-28 17:41:33 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-11-29 12:53:08 +0100
commit0e7fb0cd9b91e873b5f9d04c49472b06aff6911f (patch)
tree6295ef47a98c55db319bf102ad64a9352278c1c8 /gnu/packages/patches
parentefa6a1ddb57d8a949484ba828effab4c59374f09 (diff)
downloadguix-0e7fb0cd9b91e873b5f9d04c49472b06aff6911f.tar.gz
guix-0e7fb0cd9b91e873b5f9d04c49472b06aff6911f.zip
gnu: optipng: Fix CVE-2017-1000229.
* gnu/packages/image.scm (optipng)[source](patches): New field. * gnu/packages/patches/optipng-CVE-2017-1000229.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/optipng-CVE-2017-1000229.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/gnu/packages/patches/optipng-CVE-2017-1000229.patch b/gnu/packages/patches/optipng-CVE-2017-1000229.patch
new file mode 100644
index 0000000000..2cb3b2f21c
--- /dev/null
+++ b/gnu/packages/patches/optipng-CVE-2017-1000229.patch
@@ -0,0 +1,22 @@
+Fix CVE-2017-1000229:
+
+https://security-tracker.debian.org/tracker/CVE-2017-1000229
+https://people.canonical.com/~ubuntu-security/cve/2017/CVE-2017-1000229.html
+https://nvd.nist.gov/vuln/detail/CVE-2017-1000229
+
+Patch copied from upstream bug tracker:
+https://sourceforge.net/p/optipng/bugs/65/
+
+diff --git a/src/minitiff/tiffread.c b/src/minitiff/tiffread.c
+index b4910ec..5f9b376 100644
+--- a/src/minitiff/tiffread.c
++++ b/src/minitiff/tiffread.c
+@@ -350,6 +350,8 @@ minitiff_read_info(struct minitiff_info *tiff_ptr, FILE *fp)
+ count = tiff_ptr->strip_offsets_count;
+ if (count == 0 || count > tiff_ptr->height)
+ goto err_invalid;
++ if (count > (size_t)-1 / sizeof(long))
++ goto err_memory;
+ tiff_ptr->strip_offsets = (long *)malloc(count * sizeof(long));
+ if (tiff_ptr->strip_offsets == NULL)
+ goto err_memory;