diff options
author | Tony Tascioglu <tony.tascioglu@windriver.com> | 2021-07-27 16:20:44 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-28 23:47:00 +0100 |
commit | 92704af67d9bcac0c838f903c5cc2c07a9caf84d (patch) | |
tree | 0a2f49a7baa39eacd3181d62c67cfa9df088e403 /meta/recipes-multimedia | |
parent | e3adc62076733da33d09734d032ed4337003d53e (diff) | |
download | poky-92704af67d9bcac0c838f903c5cc2c07a9caf84d.tar.gz |
ffmpeg: fix CVE-2020-22015
avformat/movenc: Check pal_size before use
Fixes: assertion failure
Fixes: out of array read
Fixes: Ticket8190
Fixes: CVE-2020-22015
(From OE-Core rev: 5953c24ecd2e540483443284111abc883fdb1a10)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
CVE: CVE-2020-22015
Upstream-Status: Backport [4c1afa292520329eecd1cc7631bc59a8cca95c46]
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')
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch | 44 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch new file mode 100644 index 0000000000..5c911299cb --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/fix-CVE-2020-22015.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 4c1afa292520329eecd1cc7631bc59a8cca95c46 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Niedermayer <michael@niedermayer.cc> | ||
3 | Date: Sat, 29 May 2021 09:22:27 +0200 | ||
4 | Subject: [PATCH] avformat/movenc: Check pal_size before use | ||
5 | |||
6 | Fixes: assertion failure | ||
7 | Fixes: out of array read | ||
8 | Fixes: Ticket8190 | ||
9 | Fixes: CVE-2020-22015 | ||
10 | |||
11 | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | ||
12 | |||
13 | |||
14 | CVE: CVE-2020-22015 | ||
15 | Upstream-Status: Backport [4c1afa292520329eecd1cc7631bc59a8cca95c46] | ||
16 | |||
17 | Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> | ||
18 | --- | ||
19 | libavformat/movenc.c | 6 ++++-- | ||
20 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/libavformat/movenc.c b/libavformat/movenc.c | ||
23 | index 2ab507df15..7d839f447b 100644 | ||
24 | --- a/libavformat/movenc.c | ||
25 | +++ b/libavformat/movenc.c | ||
26 | @@ -2160,11 +2160,13 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex | ||
27 | avio_wb16(pb, 0x18); /* Reserved */ | ||
28 | |||
29 | if (track->mode == MODE_MOV && track->par->format == AV_PIX_FMT_PAL8) { | ||
30 | - int pal_size = 1 << track->par->bits_per_coded_sample; | ||
31 | - int i; | ||
32 | + int pal_size, i; | ||
33 | avio_wb16(pb, 0); /* Color table ID */ | ||
34 | avio_wb32(pb, 0); /* Color table seed */ | ||
35 | avio_wb16(pb, 0x8000); /* Color table flags */ | ||
36 | + if (track->par->bits_per_coded_sample < 0 || track->par->bits_per_coded_sample > 8) | ||
37 | + return AVERROR(EINVAL); | ||
38 | + pal_size = 1 << track->par->bits_per_coded_sample; | ||
39 | avio_wb16(pb, pal_size - 1); /* Color table size (zero-relative) */ | ||
40 | for (i = 0; i < pal_size; i++) { | ||
41 | uint32_t rgb = track->palette[i]; | ||
42 | -- | ||
43 | 2.32.0 | ||
44 | |||
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb index 198a44efec..786f7abc20 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.4.bb | |||
@@ -27,6 +27,7 @@ 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 | file://fix-CVE-2020-20453.patch \ |
30 | file://fix-CVE-2020-22015.patch \ | ||
30 | " | 31 | " |
31 | SRC_URI[sha256sum] = "06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909" | 32 | SRC_URI[sha256sum] = "06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909" |
32 | 33 | ||