All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Anuj Mittal" <anuj.mittal@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [hardknott][PATCH 02/28] ffmpeg: fix CVE-2020-20453
Date: Wed, 25 Aug 2021 00:25:04 +0800	[thread overview]
Message-ID: <5e460d2c5d9d4d62cb3fcf090040f4bd1fe30e1f.1629821028.git.anuj.mittal@intel.com> (raw)
In-Reply-To: <cover.1629821028.git.anuj.mittal@intel.com>

From: Tony Tascioglu <tony.tascioglu@windriver.com>

avcodec/aacenc: Avoid 0 lambda

Fixes: Ticket8003
Fixes: CVE-2020-20453

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

CVE: CVE-2020-20453
Upstream-Status: Backport [a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8]

Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 .../ffmpeg/ffmpeg/fix-CVE-2020-20453.patch    | 42 +++++++++++++++++++
 .../recipes-multimedia/ffmpeg/ffmpeg_4.3.2.bb |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch
new file mode 100644
index 0000000000..4e430726b0
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch
@@ -0,0 +1,42 @@
+From 80f9cbee46757430af0769ec999ca702be652f7f Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michael@niedermayer.cc>
+Date: Fri, 28 May 2021 21:37:26 +0200
+Subject: [PATCH 2/5] avcodec/aacenc: Avoid 0 lambda
+
+Fixes: Ticket8003
+Fixes: CVE-2020-20453
+
+Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
+
+CVE: CVE-2020-20453
+Upstream-Status: Backport [a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8]
+
+Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com>
+---
+ libavcodec/aacenc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
+index db11e0ca29..9c6cb75be4 100644
+--- a/libavcodec/aacenc.c
++++ b/libavcodec/aacenc.c
+@@ -28,6 +28,7 @@
+  *              TODOs:
+  * add sane pulse detection
+  ***********************************/
++#include <float.h>
+ 
+ #include "libavutil/libm.h"
+ #include "libavutil/thread.h"
+@@ -856,7 +857,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
+                 /* Not so fast though */
+                 ratio = sqrtf(ratio);
+             }
+-            s->lambda = FFMIN(s->lambda * ratio, 65536.f);
++            s->lambda = av_clipf(s->lambda * ratio, FLT_MIN, 65536.f);
+ 
+             /* Keep iterating if we must reduce and lambda is in the sky */
+             if (ratio > 0.9f && ratio < 1.1f) {
+-- 
+2.32.0
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.2.bb
index b4fbebe414..3917ad9c2c 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.2.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.2.bb
@@ -27,6 +27,7 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
            file://mips64_cpu_detection.patch \
            file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \
            file://fix-CVE-2020-20446.patch \
+           file://fix-CVE-2020-20453.patch \
            "
 SRC_URI[sha256sum] = "46e4e64f1dd0233cbc0934b9f1c0da676008cad34725113fb7f802cfa84ccddb"
 
-- 
2.31.1


  parent reply	other threads:[~2021-08-24 16:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 16:25 [hardknott][PATCH 00/28] Review request Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 01/28] ffmpeg: fix CVE-2020-20446 Anuj Mittal
2021-08-24 16:25 ` Anuj Mittal [this message]
2021-08-24 16:25 ` [hardknott][PATCH 03/28] ffmpeg: fix CVE-2020-22015 Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 04/28] ffmpeg: fix CVE-2020-22021 Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 05/28] ffmpeg: fix CVE-2020-22019 and CVE-2020-22033 Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 06/28] go: upgrade 1.16.5 -> 1.16.7 Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 07/28] linux-firmware: add more Qualcomm firmware packages Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 08/28] sstate.bbclass: fix error handling when sstate mirrors is ro Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 09/28] pixman: re-disable iwmmxt Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 10/28] kmod: use nonarch_base_libdir for depmod.d and modprobe.d Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 11/28] oeqa/runtime/cases: make date.DateTest.test_date more reliable Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 12/28] terminal.bbclass: force bash for devshell Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 13/28] tar: ignore node-tar CVEs Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 14/28] linux-yocto/5.10: update to v5.10.55 Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 15/28] linux-yocto/5.4: update to v5.4.137 Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 16/28] linux-yocto/5.4: update to v5.4.139 Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 17/28] linux-yocto/5.10: update to v5.10.57 Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 18/28] uninative: Improve glob to handle glibc 2.34 Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 19/28] uninative: Upgrade to 3.3, support " Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 20/28] kernel-devsrc: 5.14+ updates Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 21/28] kernel-devsrc: fix 5.14+ objtool compilation Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 22/28] lzo: add CVE_PRODUCT Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 23/28] utils: Reduce the number of calls to the "dirname" command Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 24/28] e2fsprogs: ensure small images have 256-byte inodes Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 25/28] wic: don't forcibly pass -T default Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 26/28] sdk: fix relocate symlink failed Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 27/28] sdk: Enable do_populate_sdk with multilibs Anuj Mittal
2021-08-24 16:25 ` [hardknott][PATCH 28/28] glibc: Fix CVE-2021-38604 Anuj Mittal

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=5e460d2c5d9d4d62cb3fcf090040f4bd1fe30e1f.1629821028.git.anuj.mittal@intel.com \
    --to=anuj.mittal@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.