summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch')
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch
new file mode 100644
index 0000000000..8860125030
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2017-14170.patch
@@ -0,0 +1,49 @@
1From 900f39692ca0337a98a7cf047e4e2611071810c2 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=28=E6=99=93=E9=BB=91=29?=
3 <tony.sh@alibaba-inc.com>
4Date: Tue, 29 Aug 2017 23:59:21 +0200
5Subject: [PATCH] avformat/mxfdec: Fix DoS issues in
6 mxf_read_index_entry_array()
7MIME-Version: 1.0
8Content-Type: text/plain; charset=UTF-8
9Content-Transfer-Encoding: 8bit
10
11Fixes: 20170829A.mxf
12
13Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
14Found-by: Xiaohei and Wangchu from Alibaba Security Team
15Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16
17CVE: CVE-2017-14170
18Upstream-Status: Backport
19
20Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
21---
22 libavformat/mxfdec.c | 4 ++++
23 1 file changed, 4 insertions(+)
24
25diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
26index f8d0f9e..6adb77d 100644
27--- a/libavformat/mxfdec.c
28+++ b/libavformat/mxfdec.c
29@@ -899,6 +899,8 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg
30 segment->nb_index_entries = avio_rb32(pb);
31
32 length = avio_rb32(pb);
33+ if(segment->nb_index_entries && length < 11)
34+ return AVERROR_INVALIDDATA;
35
36 if (!(segment->temporal_offset_entries=av_calloc(segment->nb_index_entries, sizeof(*segment->temporal_offset_entries))) ||
37 !(segment->flag_entries = av_calloc(segment->nb_index_entries, sizeof(*segment->flag_entries))) ||
38@@ -909,6 +911,8 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg
39 }
40
41 for (i = 0; i < segment->nb_index_entries; i++) {
42+ if(avio_feof(pb))
43+ return AVERROR_INVALIDDATA;
44 segment->temporal_offset_entries[i] = avio_r8(pb);
45 avio_r8(pb); /* KeyFrameOffset */
46 segment->flag_entries[i] = avio_r8(pb);
47--
482.1.0
49