diff options
| -rw-r--r-- | meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch | 35 | ||||
| -rw-r--r-- | meta/recipes-graphics/harfbuzz/harfbuzz_4.0.1.bb | 3 |
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 @@ | |||
| 1 | From 62e803b36173fd096d7ad460dd1d1db9be542593 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Behdad Esfahbod <behdad@behdad.org> | ||
| 3 | Date: Wed, 1 Jun 2022 07:38:21 -0600 | ||
| 4 | Subject: [PATCH] [sbix] Limit glyph extents | ||
| 5 | |||
| 6 | Fixes https://github.com/harfbuzz/harfbuzz/issues/3557 | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://github.com/harfbuzz/harfbuzz/commit/62e803b36173fd096d7ad460dd1d1db9be542593] | ||
| 9 | CVE:CVE-2022-33068 | ||
| 10 | Signed-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 | |||
| 16 | diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh | ||
| 17 | index 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 | -- | ||
| 34 | 2.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 \ | |||
| 11 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" | 11 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" |
| 12 | UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar" | 12 | UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar" |
| 13 | 13 | ||
| 14 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz" | 14 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz\ |
| 15 | file://CVE-2022-33068.patch" | ||
| 15 | SRC_URI[sha256sum] = "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49" | 16 | SRC_URI[sha256sum] = "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49" |
| 16 | 17 | ||
| 17 | inherit meson pkgconfig lib_package gtk-doc gobject-introspection | 18 | inherit meson pkgconfig lib_package gtk-doc gobject-introspection |
