[FFmpeg-cvslog] vc1dec: check that coded slice positions and interlacing match.
Michael Niedermayer
git at videolan.org
Thu Oct 25 17:10:47 CEST 2012
ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Sat Jul 28 17:14:50 2012 +0600| [3c55bf1201ac75c5e46b03e3e077031f755f85d0] | committer: Reinhard Tartler
vc1dec: check that coded slice positions and interlacing match.
This fixes out of array writes.
Addresses: CVE-2012-2796
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov at gmail.com>
(cherry picked from commit 1100acbab26883007898c53efeb289f562c6e514)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c55bf1201ac75c5e46b03e3e077031f755f85d0
---
libavcodec/vc1dec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 46cfdb0..38b08a5 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5710,6 +5710,12 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
mb_height = s->mb_height >> v->field_mode;
for (i = 0; i <= n_slices; i++) {
if (i > 0 && slices[i - 1].mby_start >= mb_height) {
+ if (v->field_mode <= 0) {
+ av_log(v->s.avctx, AV_LOG_ERROR, "Slice %d starts beyond "
+ "picture boundary (%d >= %d)\n", i,
+ slices[i - 1].mby_start, mb_height);
+ continue;
+ }
v->second_field = 1;
v->blocks_off = s->mb_width * s->mb_height << 1;
v->mb_off = s->mb_stride * s->mb_height >> 1;
More information about the ffmpeg-cvslog
mailing list