diff options
author | Mark H Weaver <mhw@netris.org> | 2021-03-12 05:24:36 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2021-03-12 06:08:33 -0500 |
commit | bc16eacc99e801ac30cbe2aa649a2be3ca5c102a (patch) | |
tree | 5dd9c659e7f98ea7cb46d1e0ae2eef8c11698fb0 /gnu/packages/patches/cairo-CVE-2018-19876.patch | |
parent | 453e101fc3f7dac9aabcd6122cf05fb7925103c7 (diff) | |
download | guix-bc16eacc99e801ac30cbe2aa649a2be3ca5c102a.tar guix-bc16eacc99e801ac30cbe2aa649a2be3ca5c102a.tar.gz |
gnu: cairo: Fix CVE-2018-19876 and CVE-2020-35492.
* gnu/packages/patches/cairo-CVE-2018-19876.patch,
gnu/packages/patches/cairo-CVE-2020-35492.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/gtk.scm (cairo)[replacement]: New field.
(cairo/fixed): New variable.
(cairo-xcb): Use package/inherit.
Diffstat (limited to 'gnu/packages/patches/cairo-CVE-2018-19876.patch')
-rw-r--r-- | gnu/packages/patches/cairo-CVE-2018-19876.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/patches/cairo-CVE-2018-19876.patch b/gnu/packages/patches/cairo-CVE-2018-19876.patch new file mode 100644 index 0000000000..c0fba2ecaa --- /dev/null +++ b/gnu/packages/patches/cairo-CVE-2018-19876.patch @@ -0,0 +1,37 @@ +Copied from Debian. + +From: Carlos Garcia Campos <cgarcia@igalia.com> +Date: Mon, 19 Nov 2018 12:33:07 +0100 +Subject: ft: Use FT_Done_MM_Var instead of free when available in + cairo_ft_apply_variations + +Fixes a crash when using freetype >= 2.9 + +[This is considered to be security-sensitive because WebKitGTK+ sets its +own memory allocator, which is not compatible with system free(), making +this a remotely triggerable denial of service or memory corruption.] + +Origin: upstream, commit:90e85c2493fdfa3551f202ff10282463f1e36645 +Bug: https://gitlab.freedesktop.org/cairo/cairo/merge_requests/5 +Bug-Debian: https://bugs.debian.org/916389 +Bug-CVE: CVE-2018-19876 +--- + src/cairo-ft-font.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c +index 325dd61..981973f 100644 +--- a/src/cairo-ft-font.c ++++ b/src/cairo-ft-font.c +@@ -2393,7 +2393,11 @@ skip: + done: + free (coords); + free (current_coords); ++#if HAVE_FT_DONE_MM_VAR ++ FT_Done_MM_Var (face->glyph->library, ft_mm_var); ++#else + free (ft_mm_var); ++#endif + } + } + |