[FFmpeg-cvslog] avformat/asfdec: Fix DoS due to lack of eof check

2017-10-26 Thread 望初
ffmpeg | branch: release/3.0 | 孙浩 and 张洪亮(望初)  | Fri Aug 25 12:37:25 2017 +0200| 
[39ddbd204aad0e1e1988b108a507f3c608b0129b] | committer: Michael Niedermayer

avformat/asfdec: Fix DoS due to lack of eof check

Fixes: loop.asf

Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 7f9ec5593e04827249e7aeb466da06a98a0d7329)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=39ddbd204aad0e1e1988b108a507f3c608b0129b
---

 libavformat/asfdec_f.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
index 3ee0fcd473..42f00259a6 100644
--- a/libavformat/asfdec_f.c
+++ b/libavformat/asfdec_f.c
@@ -749,13 +749,15 @@ static int asf_read_marker(AVFormatContext *s, int64_t 
size)
 count = avio_rl32(pb);// markers count
 avio_rl16(pb);// reserved 2 bytes
 name_len = avio_rl16(pb); // name length
-for (i = 0; i < name_len; i++)
-avio_r8(pb); // skip the name
+avio_skip(pb, name_len);
 
 for (i = 0; i < count; i++) {
 int64_t pres_time;
 int name_len;
 
+if (avio_feof(pb))
+return AVERROR_INVALIDDATA;
+
 avio_rl64(pb); // offset, 8 bytes
 pres_time = avio_rl64(pb); // presentation time
 pres_time -= asf->hdr.preroll * 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/asfdec: Fix DoS due to lack of eof check

2017-09-17 Thread 望初
ffmpeg | branch: release/3.1 | 孙浩 and 张洪亮(望初)  | Fri Aug 25 12:37:25 2017 +0200| 
[0eb399381a2b3429980aa939bcd4dfbf0780f140] | committer: Michael Niedermayer

avformat/asfdec: Fix DoS due to lack of eof check

Fixes: loop.asf

Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 7f9ec5593e04827249e7aeb466da06a98a0d7329)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0eb399381a2b3429980aa939bcd4dfbf0780f140
---

 libavformat/asfdec_f.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
index 2c81b138f2..294fd345f5 100644
--- a/libavformat/asfdec_f.c
+++ b/libavformat/asfdec_f.c
@@ -749,13 +749,15 @@ static int asf_read_marker(AVFormatContext *s, int64_t 
size)
 count = avio_rl32(pb);// markers count
 avio_rl16(pb);// reserved 2 bytes
 name_len = avio_rl16(pb); // name length
-for (i = 0; i < name_len; i++)
-avio_r8(pb); // skip the name
+avio_skip(pb, name_len);
 
 for (i = 0; i < count; i++) {
 int64_t pres_time;
 int name_len;
 
+if (avio_feof(pb))
+return AVERROR_INVALIDDATA;
+
 avio_rl64(pb); // offset, 8 bytes
 pres_time = avio_rl64(pb); // presentation time
 pres_time -= asf->hdr.preroll * 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/asfdec: Fix DoS due to lack of eof check

2017-09-17 Thread 望初
ffmpeg | branch: release/3.2 | 孙浩 and 张洪亮(望初)  | Fri Aug 25 12:37:25 2017 +0200| 
[f94517934bf0ff2510f472fa2bc4cd362951109c] | committer: Michael Niedermayer

avformat/asfdec: Fix DoS due to lack of eof check

Fixes: loop.asf

Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 7f9ec5593e04827249e7aeb466da06a98a0d7329)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f94517934bf0ff2510f472fa2bc4cd362951109c
---

 libavformat/asfdec_f.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
index b973eff96e..2cacafe50d 100644
--- a/libavformat/asfdec_f.c
+++ b/libavformat/asfdec_f.c
@@ -749,13 +749,15 @@ static int asf_read_marker(AVFormatContext *s, int64_t 
size)
 count = avio_rl32(pb);// markers count
 avio_rl16(pb);// reserved 2 bytes
 name_len = avio_rl16(pb); // name length
-for (i = 0; i < name_len; i++)
-avio_r8(pb); // skip the name
+avio_skip(pb, name_len);
 
 for (i = 0; i < count; i++) {
 int64_t pres_time;
 int name_len;
 
+if (avio_feof(pb))
+return AVERROR_INVALIDDATA;
+
 avio_rl64(pb); // offset, 8 bytes
 pres_time = avio_rl64(pb); // presentation time
 pres_time -= asf->hdr.preroll * 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/asfdec: Fix DoS due to lack of eof check

2017-09-09 Thread 望初
ffmpeg | branch: release/3.3 | 孙浩 and 张洪亮(望初)  | Fri Aug 25 12:37:25 2017 +0200| 
[6447815dfbbe5036c7fa29d285b59896d76f4f9d] | committer: Michael Niedermayer

avformat/asfdec: Fix DoS due to lack of eof check

Fixes: loop.asf

Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 7f9ec5593e04827249e7aeb466da06a98a0d7329)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6447815dfbbe5036c7fa29d285b59896d76f4f9d
---

 libavformat/asfdec_f.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
index be09a92bd1..f3acbae280 100644
--- a/libavformat/asfdec_f.c
+++ b/libavformat/asfdec_f.c
@@ -749,13 +749,15 @@ static int asf_read_marker(AVFormatContext *s, int64_t 
size)
 count = avio_rl32(pb);// markers count
 avio_rl16(pb);// reserved 2 bytes
 name_len = avio_rl16(pb); // name length
-for (i = 0; i < name_len; i++)
-avio_r8(pb); // skip the name
+avio_skip(pb, name_len);
 
 for (i = 0; i < count; i++) {
 int64_t pres_time;
 int name_len;
 
+if (avio_feof(pb))
+return AVERROR_INVALIDDATA;
+
 avio_rl64(pb); // offset, 8 bytes
 pres_time = avio_rl64(pb); // presentation time
 pres_time -= asf->hdr.preroll * 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/asfdec: Fix DoS due to lack of eof check

2017-09-01 Thread 望初
ffmpeg | branch: release/2.8 | 孙浩 and 张洪亮(望初)  | Fri Aug 25 12:37:25 2017 +0200| 
[6904464301bbfff6e21616d43d657b163359bb3d] | committer: Michael Niedermayer

avformat/asfdec: Fix DoS due to lack of eof check

Fixes: loop.asf

Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer 
(cherry picked from commit 7f9ec5593e04827249e7aeb466da06a98a0d7329)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6904464301bbfff6e21616d43d657b163359bb3d
---

 libavformat/asfdec_f.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
index a30b7d7212..babcd6c248 100644
--- a/libavformat/asfdec_f.c
+++ b/libavformat/asfdec_f.c
@@ -749,13 +749,15 @@ static int asf_read_marker(AVFormatContext *s, int64_t 
size)
 count = avio_rl32(pb);// markers count
 avio_rl16(pb);// reserved 2 bytes
 name_len = avio_rl16(pb); // name length
-for (i = 0; i < name_len; i++)
-avio_r8(pb); // skip the name
+avio_skip(pb, name_len);
 
 for (i = 0; i < count; i++) {
 int64_t pres_time;
 int name_len;
 
+if (avio_feof(pb))
+return AVERROR_INVALIDDATA;
+
 avio_rl64(pb); // offset, 8 bytes
 pres_time = avio_rl64(pb); // presentation time
 pres_time -= asf->hdr.preroll * 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/asfdec: Fix DoS due to lack of eof check

2017-08-27 Thread 望初
ffmpeg | branch: master | 孙浩 and 张洪亮(望初)  | Fri Aug 25 12:37:25 2017 +0200| 
[7f9ec5593e04827249e7aeb466da06a98a0d7329] | committer: Michael Niedermayer

avformat/asfdec: Fix DoS due to lack of eof check

Fixes: loop.asf

Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f9ec5593e04827249e7aeb466da06a98a0d7329
---

 libavformat/asfdec_f.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
index be09a92bd1..f3acbae280 100644
--- a/libavformat/asfdec_f.c
+++ b/libavformat/asfdec_f.c
@@ -749,13 +749,15 @@ static int asf_read_marker(AVFormatContext *s, int64_t 
size)
 count = avio_rl32(pb);// markers count
 avio_rl16(pb);// reserved 2 bytes
 name_len = avio_rl16(pb); // name length
-for (i = 0; i < name_len; i++)
-avio_r8(pb); // skip the name
+avio_skip(pb, name_len);
 
 for (i = 0; i < count; i++) {
 int64_t pres_time;
 int name_len;
 
+if (avio_feof(pb))
+return AVERROR_INVALIDDATA;
+
 avio_rl64(pb); // offset, 8 bytes
 pres_time = avio_rl64(pb); // presentation time
 pres_time -= asf->hdr.preroll * 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog