From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70183CD37B3 for ; Sun, 17 Sep 2023 12:48:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1460D61106; Sun, 17 Sep 2023 12:48:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1460D61106 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YQcg3SinIlh4; Sun, 17 Sep 2023 12:48:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 4A995610F6; Sun, 17 Sep 2023 12:48:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4A995610F6 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 0EC561BF473 for ; Sun, 17 Sep 2023 12:48:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E971640531 for ; Sun, 17 Sep 2023 12:48:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E971640531 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OOo7OSrT9w1L for ; Sun, 17 Sep 2023 12:48:17 +0000 (UTC) Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by smtp2.osuosl.org (Postfix) with ESMTPS id DD56D40111 for ; Sun, 17 Sep 2023 12:48:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org DD56D40111 Received: from ymorin.is-a-geek.org (unknown [IPv6:2a01:cb19:8b44:b00:6a7e:c3f3:1d37:8ba2]) (Authenticated sender: yann.morin.1998@free.fr) by smtp1-g21.free.fr (Postfix) with ESMTPSA id 361B7B0054E; Sun, 17 Sep 2023 14:48:13 +0200 (CEST) Received: by ymorin.is-a-geek.org (sSMTP sendmail emulation); Sun, 17 Sep 2023 14:48:12 +0200 Date: Sun, 17 Sep 2023 14:48:12 +0200 From: "Yann E. MORIN" To: Fabrice Fontaine Message-ID: <20230917124812.GU415981@scaer> References: <20230917115139.21621-1-fontaine.fabrice@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230917115139.21621-1-fontaine.fabrice@gmail.com> User-Agent: Mutt/1.5.22 (2013-10-16) X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1694954895; bh=RwANr8AgxojXG/4ag6kPW8PFB1TrdJoaLY1wd3bf1fo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=im1ta1W8eTyzePvymLWPno1RGi8nibM8jqXrTx8MkpB8clNEI9wVxeYaz6Jc0ILzd 9XTK3++ptv/wgiBFUhfWSzmYn+Wb6bEKNMqCTI+nOORTcIZYyLrEx1CkqK7z1gqmL+ nhBB/sDpFyWK2fnvLcoPcGiHVxIsOlDy51C8nlEvYM+Wphzb4NhhhR4FwXZMJkW7gp UdrUV7GLm7OUG9A3EPbyCvsrh4kLwc6pj3pEpIY8Eu/L0n5kSj3PPwRS95bc6tW/9y 5MvvYmqt2AmTFh/P7PSCF6kkaysSonsMQcDtEbXNl/VnAN5zOwX7+sAPTjoet+AfOE Qz0Cj4HbKDqgA== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=free.fr header.i=@free.fr header.a=rsa-sha256 header.s=smtp-20201208 header.b=im1ta1W8 Subject: Re: [Buildroot] [PATCH v2,1/1] package/libraw: fix CVE-2023-1729 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: buildroot@buildroot.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Fabrice, All, On 2023-09-17 13:51 +0200, Fabrice Fontaine spake thusly: > A flaw was found in LibRaw. A heap-buffer-overflow in raw2image_ex() > caused by a maliciously crafted file may lead to an application crash. > > Signed-off-by: Fabrice Fontaine > --- > Changes v1 -> v2: > - Fix title typo *This one* is the patch I applied! ;-) Regards, Yann E. MORIN. > ...shrink-flag-for-3-4-component-images.patch | 24 +++++++++++++++++++ > package/libraw/libraw.mk | 3 +++ > 2 files changed, 27 insertions(+) > create mode 100644 package/libraw/0001-do-not-set-shrink-flag-for-3-4-component-images.patch > > diff --git a/package/libraw/0001-do-not-set-shrink-flag-for-3-4-component-images.patch b/package/libraw/0001-do-not-set-shrink-flag-for-3-4-component-images.patch > new file mode 100644 > index 0000000000..ef93e0901b > --- /dev/null > +++ b/package/libraw/0001-do-not-set-shrink-flag-for-3-4-component-images.patch > @@ -0,0 +1,24 @@ > +From 477e0719ffc07190c89b4f3d12d51b1292e75828 Mon Sep 17 00:00:00 2001 > +From: Alex Tutubalin > +Date: Sat, 14 Jan 2023 18:32:59 +0300 > +Subject: [PATCH] do not set shrink flag for 3/4 component images > + > +Signed-off-by: Fabrice Fontaine > +Upstream: https://github.com/LibRaw/LibRaw/commit/477e0719ffc07190c89b4f3d12d51b1292e75828 > +--- > + src/preprocessing/raw2image.cpp | 2 ++ > + 1 file changed, 2 insertions(+) > + > +diff --git a/src/preprocessing/raw2image.cpp b/src/preprocessing/raw2image.cpp > +index e65e2ad7..702cf290 100644 > +--- a/src/preprocessing/raw2image.cpp > ++++ b/src/preprocessing/raw2image.cpp > +@@ -43,6 +43,8 @@ void LibRaw::raw2image_start() > + > + // adjust for half mode! > + IO.shrink = > ++ !imgdata.rawdata.color4_image && !imgdata.rawdata.color3_image && > ++ !imgdata.rawdata.float4_image && !imgdata.rawdata.float3_image && > + P1.filters && > + (O.half_size || ((O.threshold || O.aber[0] != 1 || O.aber[2] != 1))); > + > diff --git a/package/libraw/libraw.mk b/package/libraw/libraw.mk > index b6616f0c10..cbd509cfea 100644 > --- a/package/libraw/libraw.mk > +++ b/package/libraw/libraw.mk > @@ -18,6 +18,9 @@ LIBRAW_DEPENDENCIES = host-pkgconf > LIBRAW_CXXFLAGS = $(TARGET_CXXFLAGS) > LIBRAW_CONF_ENV = CXXFLAGS="$(LIBRAW_CXXFLAGS)" > > +# 0001-do-not-set-shrink-flag-for-3-4-component-images.patch > +LIBRAW_IGNORE_CVES += 0001-do-not-set-shrink-flag-for-3-4-component-images.patch > + > ifeq ($(BR2_PACKAGE_JASPER),y) > LIBRAW_CONF_OPTS += --enable-jasper > LIBRAW_DEPENDENCIES += jasper > -- > 2.40.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot