diff options
author | Tony Tascioglu <tony.tascioglu@windriver.com> | 2021-08-20 14:31:54 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-26 08:32:13 +0100 |
commit | 2bb72f85515db42fe3a896660151e8e6db65f022 (patch) | |
tree | dac0d63f131a724dbe8ec425cdfbc634baf23c26 /meta | |
parent | 5dffafd6c9f540ec76504c7ecc022c3b2ac9b627 (diff) | |
download | poky-2bb72f85515db42fe3a896660151e8e6db65f022.tar.gz |
ffmpeg: fix CVE-2020-20453
avcodec/aacenc: Avoid 0 lambda
Fixes: Ticket8003
Fixes: CVE-2020-20453
(From OE-Core rev: 5e460d2c5d9d4d62cb3fcf090040f4bd1fe30e1f)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch | 42 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.2.bb | 1 |
2 files changed, 43 insertions, 0 deletions
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 @@ | |||
1 | From 80f9cbee46757430af0769ec999ca702be652f7f Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Niedermayer <michael@niedermayer.cc> | ||
3 | Date: Fri, 28 May 2021 21:37:26 +0200 | ||
4 | Subject: [PATCH 2/5] avcodec/aacenc: Avoid 0 lambda | ||
5 | |||
6 | Fixes: Ticket8003 | ||
7 | Fixes: CVE-2020-20453 | ||
8 | |||
9 | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | ||
10 | |||
11 | CVE: CVE-2020-20453 | ||
12 | Upstream-Status: Backport [a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8] | ||
13 | |||
14 | Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> | ||
15 | --- | ||
16 | libavcodec/aacenc.c | 3 ++- | ||
17 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c | ||
20 | index db11e0ca29..9c6cb75be4 100644 | ||
21 | --- a/libavcodec/aacenc.c | ||
22 | +++ b/libavcodec/aacenc.c | ||
23 | @@ -28,6 +28,7 @@ | ||
24 | * TODOs: | ||
25 | * add sane pulse detection | ||
26 | ***********************************/ | ||
27 | +#include <float.h> | ||
28 | |||
29 | #include "libavutil/libm.h" | ||
30 | #include "libavutil/thread.h" | ||
31 | @@ -856,7 +857,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, | ||
32 | /* Not so fast though */ | ||
33 | ratio = sqrtf(ratio); | ||
34 | } | ||
35 | - s->lambda = FFMIN(s->lambda * ratio, 65536.f); | ||
36 | + s->lambda = av_clipf(s->lambda * ratio, FLT_MIN, 65536.f); | ||
37 | |||
38 | /* Keep iterating if we must reduce and lambda is in the sky */ | ||
39 | if (ratio > 0.9f && ratio < 1.1f) { | ||
40 | -- | ||
41 | 2.32.0 | ||
42 | |||
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 \ | |||
27 | file://mips64_cpu_detection.patch \ | 27 | file://mips64_cpu_detection.patch \ |
28 | file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ | 28 | file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ |
29 | file://fix-CVE-2020-20446.patch \ | 29 | file://fix-CVE-2020-20446.patch \ |
30 | file://fix-CVE-2020-20453.patch \ | ||
30 | " | 31 | " |
31 | SRC_URI[sha256sum] = "46e4e64f1dd0233cbc0934b9f1c0da676008cad34725113fb7f802cfa84ccddb" | 32 | SRC_URI[sha256sum] = "46e4e64f1dd0233cbc0934b9f1c0da676008cad34725113fb7f802cfa84ccddb" |
32 | 33 | ||