summaryrefslogtreecommitdiff
path: root/multimedia/mythtv/files/patch-CVE-2017-14170
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/mythtv/files/patch-CVE-2017-14170')
-rw-r--r--multimedia/mythtv/files/patch-CVE-2017-1417043
1 files changed, 43 insertions, 0 deletions
diff --git a/multimedia/mythtv/files/patch-CVE-2017-14170 b/multimedia/mythtv/files/patch-CVE-2017-14170
new file mode 100644
index 000000000000..598f9bde9a7e
--- /dev/null
+++ b/multimedia/mythtv/files/patch-CVE-2017-14170
@@ -0,0 +1,43 @@
+From 9cbac3602610afa0867b03bc1475c5c13441d096 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=28=E6=99=93=E9=BB=91=29?=
+ <tony.sh@alibaba-inc.com>
+Date: Tue, 29 Aug 2017 23:59:21 +0200
+Subject: [PATCH] avformat/mxfdec: Fix DoS issues in
+ mxf_read_index_entry_array()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes: 20170829A.mxf
+
+Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
+Found-by: Xiaohei and Wangchu from Alibaba Security Team
+Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
+(cherry picked from commit 900f39692ca0337a98a7cf047e4e2611071810c2)
+Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
+---
+ libavformat/mxfdec.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git libavformat/mxfdec.c libavformat/mxfdec.c
+index 2ad0c288f89..e2e34b246f7 100644
+--- external/FFmpeg/libavformat/mxfdec.c
++++ external/FFmpeg/libavformat/mxfdec.c
+@@ -899,6 +899,8 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg
+ segment->nb_index_entries = avio_rb32(pb);
+
+ length = avio_rb32(pb);
++ if(segment->nb_index_entries && length < 11)
++ return AVERROR_INVALIDDATA;
+
+ if (!(segment->temporal_offset_entries=av_calloc(segment->nb_index_entries, sizeof(*segment->temporal_offset_entries))) ||
+ !(segment->flag_entries = av_calloc(segment->nb_index_entries, sizeof(*segment->flag_entries))) ||
+@@ -909,6 +911,8 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg
+ }
+
+ for (i = 0; i < segment->nb_index_entries; i++) {
++ if(avio_feof(pb))
++ return AVERROR_INVALIDDATA;
+ segment->temporal_offset_entries[i] = avio_r8(pb);
+ avio_r8(pb); /* KeyFrameOffset */
+ segment->flag_entries[i] = avio_r8(pb);