summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/ffmpeg
diff options
context:
space:
mode:
authorKiran Surendran <kiran.surendran@windriver.com>2021-09-23 15:25:26 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-26 14:36:48 +0100
commitbcf0b252485550d6ba7ff6ef2ecc1a783820669e (patch)
treef1423cd955bd7f6cce46519921ba9d1b9446cc7b /meta/recipes-multimedia/ffmpeg
parenteafac9940adb69f085e1448516ab59976a16489b (diff)
downloadpoky-bcf0b252485550d6ba7ff6ef2ecc1a783820669e.tar.gz
ffmpeg: fix CVE-2021-38171
backport from upstream (From OE-Core rev: 3cb40cabc79e4c9b4ffaf99543368b0c57d18df1) Signed-off-by: Kiran Surendran <kiran.surendran@windriver.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-2021-38171.patch42
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb3
2 files changed, 44 insertions, 1 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38171.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38171.patch
new file mode 100644
index 0000000000..d82f3a4b63
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2021-38171.patch
@@ -0,0 +1,42 @@
1CVE: CVE-2021-38171
2Upstream-Status: Backport
3Signed-off-by: Kiran Surendran <kiran.surendran@windriver.com>
4
5From fb993619d1035fa9646506925ea70fb122038999 Mon Sep 17 00:00:00 2001
6From: maryam ebrahimzadeh <me22bee@outlook.com>
7Date: Wed, 4 Aug 2021 16:15:18 -0400
8Subject: [PATCH] avformat/adtsenc: return value check for init_get_bits in
9 adts_decode_extradata
10
11As the second argument for init_get_bits (buf) can be crafted, a return value check for this function call is necessary.
12'buf' is part of 'AVPacket pkt'.
13replace init_get_bits with init_get_bits8.
14
15Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16(cherry picked from commit 9ffa49496d1aae4cbbb387aac28a9e061a6ab0a6)
17Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
18---
19 libavformat/adtsenc.c | 6 ++++--
20 1 file changed, 4 insertions(+), 2 deletions(-)
21
22diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c
23index 3595cb3bb2..c35a12a628 100644
24--- a/libavformat/adtsenc.c
25+++ b/libavformat/adtsenc.c
26@@ -51,9 +51,11 @@ static int adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, const ui
27 GetBitContext gb;
28 PutBitContext pb;
29 MPEG4AudioConfig m4ac;
30- int off;
31+ int off, ret;
32
33- init_get_bits(&gb, buf, size * 8);
34+ ret = init_get_bits8(&gb, buf, size);
35+ if (ret < 0)
36+ return ret;
37 off = avpriv_mpeg4audio_get_config2(&m4ac, buf, size, 1, s);
38 if (off < 0)
39 return off;
40--
412.31.1
42
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
index fc1834c00b..0c6af6549d 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb
@@ -31,7 +31,8 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
31 file://fix-CVE-2020-22021.patch \ 31 file://fix-CVE-2020-22021.patch \
32 file://fix-CVE-2020-22033-CVE-2020-22019.patch \ 32 file://fix-CVE-2020-22033-CVE-2020-22019.patch \
33 file://fix-CVE-2021-33815.patch \ 33 file://fix-CVE-2021-33815.patch \
34 " 34 file://fix-CVE-2021-38171.patch \
35 "
35SRC_URI[sha256sum] = "06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909" 36SRC_URI[sha256sum] = "06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909"
36 37
37# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 38# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717