summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch35
-rw-r--r--meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb3
2 files changed, 37 insertions, 1 deletions
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch b/meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch
new file mode 100644
index 0000000000..931b9abe1e
--- /dev/null
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch
@@ -0,0 +1,35 @@
1From 62e803b36173fd096d7ad460dd1d1db9be542593 Mon Sep 17 00:00:00 2001
2From: Behdad Esfahbod <behdad@behdad.org>
3Date: Wed, 1 Jun 2022 07:38:21 -0600
4Subject: [PATCH] [sbix] Limit glyph extents
5
6Fixes https://github.com/harfbuzz/harfbuzz/issues/3557
7
8Upstream-Status: Backport [https://github.com/harfbuzz/harfbuzz/commit/62e803b36173fd096d7ad460dd1d1db9be542593]
9CVE:CVE-2022-33068
10Signed-off-by: Wentao Zhang<Wentao.Zhang@windriver.com>
11
12---
13 src/hb-ot-color-sbix-table.hh | 6 ++++++
14 1 file changed, 6 insertions(+)
15
16diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
17index 9741ebd45..6efae43cd 100644
18--- a/src/hb-ot-color-sbix-table.hh
19+++ b/src/hb-ot-color-sbix-table.hh
20@@ -298,6 +298,12 @@ struct sbix
21
22 const PNGHeader &png = *blob->as<PNGHeader>();
23
24+ if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
25+ {
26+ hb_blob_destroy (blob);
27+ return false;
28+ }
29+
30 extents->x_bearing = x_offset;
31 extents->y_bearing = png.IHDR.height + y_offset;
32 extents->width = png.IHDR.width;
33--
342.25.1
35
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
index bf77a5e56c..81518a53ea 100644
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb
@@ -11,7 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6ee0f16281694fb6aa689cca1e0fb3da \
11UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" 11UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
12UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar" 12UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar"
13 13
14SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz" 14SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz\
15 file://CVE-2022-33068.patch"
15SRC_URI[sha256sum] = "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49" 16SRC_URI[sha256sum] = "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49"
16 17
17inherit meson pkgconfig lib_package gtk-doc gobject-introspection 18inherit meson pkgconfig lib_package gtk-doc gobject-introspection