diff options
author | Tony Tascioglu <tony.tascioglu@windriver.com> | 2021-07-27 16:20:43 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-28 23:47:00 +0100 |
commit | e3adc62076733da33d09734d032ed4337003d53e (patch) | |
tree | 9c95eaff999d99f44f93ef2425322acb1dd91606 /meta/recipes-multimedia/ffmpeg | |
parent | 7de4c20e62a0fccede641232a504f2818c05b366 (diff) | |
download | poky-e3adc62076733da33d09734d032ed4337003d53e.tar.gz |
ffmpeg: fix CVE-2020-20453
avcodec/aacenc: Avoid 0 lambda
Fixes: Ticket8003
Fixes: CVE-2020-20453
(From OE-Core rev: 66478fa2b913f69bcad1a1989f716c9c30953fee)
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: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg')
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch | 42 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.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..b1c94057a3 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-20453.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From a7a7f32c8ad0179a1a85d0a8cff35924e6d90be8 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] 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 aa223cf25f..e80591ba86 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/float_dsp.h" | ||
31 | @@ -852,7 +853,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.4.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb index 00640f3cb3..198a44efec 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb | |||
@@ -26,6 +26,7 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | |||
26 | SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ | 26 | SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ |
27 | file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ | 27 | file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ |
28 | file://fix-CVE-2020-20446.patch \ | 28 | file://fix-CVE-2020-20446.patch \ |
29 | file://fix-CVE-2020-20453.patch \ | ||
29 | " | 30 | " |
30 | SRC_URI[sha256sum] = "06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909" | 31 | SRC_URI[sha256sum] = "06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909" |
31 | 32 | ||