public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Pavel Zhukov <pavel@zhukoff.net>
To: Steve Sakoman <steve@sakoman.com>
Cc: openembedded-core@lists.openembedded.org,  wentao.zhang@windriver.com
Subject: Re: [OE-core][kirkstone 05/27] harfbuzz: fix CVE-2022-33068
Date: Sun, 17 Jul 2022 21:32:45 +0200	[thread overview]
Message-ID: <87k08bttxw.fsf@gentoo.zhukoff.net> (raw)
In-Reply-To: <537e7d323f57a0484c279c3b52ad5bb45eb44a10.1657772638.git.steve@sakoman.com>


This breaks build with clang:

| In file included from ../harfbuzz-4.0.1/src/hb-ot-face.cc:39:
4429| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
4430|       if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
4431|           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4432|                                    ||
4433| ../harfbuzz-4.0.1/src/hb-ot-color-sbix-table.hh:301:11: note: cast one or both operands to int to silence this warning
4434| 1 error generated.


"Steve Sakoman" <steve@sakoman.com> writes:

> From: Wentao Zhang <wentao.zhang@windriver.com>
>
> Backport patch from
> https://github.com/harfbuzz/harfbuzz/commit/62e803b36173fd096d7ad460dd1d1db9be542593
>
> The 'tff' file in upstream patch is for testing only which cause error during do_patch so need be dropped.
> File test/fuzzing/fonts/sbix-extents.ttf: git binary diffs are not supported.
>
> Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
> Signed-off-by: Steve Sakoman <steve@sakoman.com>
> ---
>  .../harfbuzz/harfbuzz/CVE-2022-33068.patch    | 35 +++++++++++++++++++
>  .../harfbuzz/harfbuzz_4.0.1.bb                |  3 +-
>  2 files changed, 37 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-graphics/harfbuzz/harfbuzz/CVE-2022-33068.patch
>
> 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 @@
> +From 62e803b36173fd096d7ad460dd1d1db9be542593 Mon Sep 17 00:00:00 2001
> +From: Behdad Esfahbod <behdad@behdad.org>
> +Date: Wed, 1 Jun 2022 07:38:21 -0600
> +Subject: [PATCH] [sbix] Limit glyph extents
> +
> +Fixes https://github.com/harfbuzz/harfbuzz/issues/3557
> +
> +Upstream-Status: Backport [https://github.com/harfbuzz/harfbuzz/commit/62e803b36173fd096d7ad460dd1d1db9be542593]
> +CVE:CVE-2022-33068
> +Signed-off-by: Wentao Zhang<Wentao.Zhang@windriver.com>
> +
> +---
> + src/hb-ot-color-sbix-table.hh | 6 ++++++
> + 1 file changed, 6 insertions(+)
> +
> +diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
> +index 9741ebd45..6efae43cd 100644
> +--- a/src/hb-ot-color-sbix-table.hh
> ++++ b/src/hb-ot-color-sbix-table.hh
> +@@ -298,6 +298,12 @@ struct sbix
> + 
> +       const PNGHeader &png = *blob->as<PNGHeader>();
> + 
> ++      if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
> ++      {
> ++	hb_blob_destroy (blob);
> ++	return false;
> ++      }
> ++
> +       extents->x_bearing = x_offset;
> +       extents->y_bearing = png.IHDR.height + y_offset;
> +       extents->width     = png.IHDR.width;
> +-- 
> +2.25.1
> +
> 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 \
>  UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
>  UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar"
>  
> -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz"
> +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz\
> +           file://CVE-2022-33068.patch"
>  SRC_URI[sha256sum] = "98f68777272db6cd7a3d5152bac75083cd52a26176d87bc04c8b3929d33bce49"
>  
>  inherit meson pkgconfig lib_package gtk-doc gobject-introspection



  reply	other threads:[~2022-07-17 19:35 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14  4:35 [OE-core][kirkstone 00/27] Patch review Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 01/27] ruby: add PACKAGECONFIG for capstone Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 02/27] qemu: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 03/27] qemu: Avoid accidental librdmacm linkage Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 04/27] qemu: Avoid accidental libvdeplug linkage Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 05/27] harfbuzz: fix CVE-2022-33068 Steve Sakoman
2022-07-17 19:32   ` Pavel Zhukov [this message]
2022-07-14  4:35 ` [OE-core][kirkstone 06/27] tiff: backport the fix for CVE-2022-2056, CVE-2022-2057, and CVE-2022-2058 Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 07/27] u-boot: fix CVE-2022-34835 Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 08/27] vim: upgrade to 9.0.0021 Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 09/27] openssl: update 3.0.4 -> 3.0.5 Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 10/27] glibc: stable 2.35 branch updates Steve Sakoman
2022-07-24 17:54   ` Martin Jansa
2022-07-25 10:17     ` pgowda cve
2022-07-25 10:33       ` Martin Jansa
2022-07-25 10:51         ` pgowda cve
2022-07-14  4:35 ` [OE-core][kirkstone 11/27] glibc-tests: Avoid reproducibility issues Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 12/27] binutils : stable 2.38 branch updates Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 13/27] gstreamer1.0: upgrade 1.20.2 -> 1.20.3 Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 14/27] gst-devtools: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 15/27] gstreamer1.0-libav: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 16/27] gstreamer1.0-omx: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 17/27] gstreamer1.0-plugins-bad: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 18/27] gstreamer1.0-plugins-base: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 19/27] gstreamer1.0-plugins-good: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 20/27] gstreamer1.0-plugins-ugly: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 21/27] gstreamer1.0-python: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 22/27] gstreamer1.0-rtsp-server: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 23/27] gstreamer1.0-vaapi: " Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 24/27] weston: update 10.0.0 -> 10.0.1 Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 25/27] glib-2.0: upgrade 2.72.2 -> 2.72.3 Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 26/27] glib-networking: upgrade 2.72.0 -> 2.72.1 Steve Sakoman
2022-07-14  4:35 ` [OE-core][kirkstone 27/27] libsoup: upgrade 3.0.6 -> 3.0.7 Steve Sakoman
     [not found] ` <17019818268B4DB5.31059@lists.openembedded.org>
2022-07-14  4:42   ` [OE-core][kirkstone 01/27] ruby: add PACKAGECONFIG for capstone Steve Sakoman
2022-07-14  9:40     ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k08bttxw.fsf@gentoo.zhukoff.net \
    --to=pavel@zhukoff.net \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=steve@sakoman.com \
    --cc=wentao.zhang@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox