diff --git a/SOURCES/0001-Initialize-temporary-buffers-in-general_composite_re.patch b/SOURCES/0001-Initialize-temporary-buffers-in-general_composite_re.patch new file mode 100644 index 0000000..b6e9a77 --- /dev/null +++ b/SOURCES/0001-Initialize-temporary-buffers-in-general_composite_re.patch @@ -0,0 +1,34 @@ +From 6fe0131394fb029d2fccaee6b8edcb108840ad8a Mon Sep 17 00:00:00 2001 +From: Federico Mena Quintero +Date: Wed, 18 Mar 2020 18:49:30 -0600 +Subject: [PATCH] Initialize temporary buffers in general_composite_rect() + +Otherwise, Valgrind shows things like "conditional jump or move +depends on uninitialised values" errors much later in calling code. +For example, see https://gitlab.gnome.org/GNOME/librsvg/issues/572 + +Fixes https://gitlab.freedesktop.org/pixman/pixman/issues/9 +--- + pixman/pixman-general.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c +index 7d74f98..7e5a0d0 100644 +--- a/pixman/pixman-general.c ++++ b/pixman/pixman-general.c +@@ -165,6 +165,12 @@ general_composite_rect (pixman_implementation_t *imp, + + if (!scanline_buffer) + return; ++ ++ memset (scanline_buffer, 0, width * Bpp * 3 + 15 * 3); ++ } ++ else ++ { ++ memset (stack_scanline_buffer, 0, sizeof (stack_scanline_buffer)); + } + + src_buffer = ALIGN (scanline_buffer); +-- +2.34.1 + diff --git a/SPECS/pixman.spec b/SPECS/pixman.spec index d4c668d..b6244a1 100644 --- a/SPECS/pixman.spec +++ b/SPECS/pixman.spec @@ -3,7 +3,7 @@ Name: pixman Version: 0.38.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Pixel manipulation library Group: System Environment/Libraries @@ -16,6 +16,8 @@ URL: https://gitlab.freedesktop.org/pixman/pixman Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.bz2 Source1: make-pixman-snapshot.sh +Patch0: 0001-Initialize-temporary-buffers-in-general_composite_re.patch + BuildRequires: automake autoconf libtool BuildRequires: gcc @@ -66,6 +68,9 @@ make check %{?_smp_mflags} V=1 %{_libdir}/pkgconfig/pixman-1.pc %changelog +* Tue Feb 22 2022 Adam Jackson - 0.38.4-2 +- Backport the pixman part of cairo CVE-2020-35492 + * Tue Nov 19 2019 Adam Jackson - 0.38.4-1 - pixman 0.38.4