Changeset View
Changeset View
Standalone View
Standalone View
head/multimedia/mythtv/files/patch-CVE-2017-14170
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
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); |