summaryrefslogtreecommitdiff
path: root/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13
diff options
context:
space:
mode:
authorYue Tao <Yue.Tao@windriver.com>2014-04-14 18:58:29 +0800
committerSaul Wold <sgw@linux.intel.com>2014-05-21 08:23:10 -0700
commit4a93fc0a63cedbebfdc9577e2f1deb3598fb5851 (patch)
tree3cfd9760cc6304ee0f86270e6d65d560a945c0ba /meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13
parent70bf8c8dea82e914a6dcf67aefb6386dbc7706cd (diff)
downloadopenembedded-core-4a93fc0a63cedbebfdc9577e2f1deb3598fb5851.tar.gz
openembedded-core-4a93fc0a63cedbebfdc9577e2f1deb3598fb5851.tar.bz2
openembedded-core-4a93fc0a63cedbebfdc9577e2f1deb3598fb5851.zip
gst-ffmpeg: fix for Security Advisory CVE-2013-0865
The vqa_decode_chunk function in libavcodec/vqavideo.c in FFmpeg before 1.0.4 and 1.1.x before 1.1.2 allows remote attackers to have an unspecified impact via a large (1) cbp0 or (2) cbpz chunk in Westwood Studios VQA Video file, which triggers an out-of-bounds write. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-0865 Signed-off-by: Yue Tao <Yue.Tao@windriver.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13')
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch
new file mode 100644
index 0000000000..7e4f682167
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch
@@ -0,0 +1,51 @@
+From 2cac35086c9e103fa98960c546d5017e7363803a Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michaelni@gmx.at>
+Date: Fri, 25 Jan 2013 06:11:59 +0100
+Subject: [PATCH] vqavideo: check chunk sizes before reading chunks
+
+Upstream-Status: Backport
+
+Commit 2cac35086c9e103fa98960c546d5017e7363803a release/0.7
+
+Fixes out of array writes
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+(cherry picked from commit ab6c9332bfa1e20127a16392a0b85a4aa4840889)
+
+Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
+---
+ libavcodec/vqavideo.c | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
+index d1eab5b..6e1ce6c 100644
+--- a/gst-libs/ext/libav/libavcodec/vqavideo.c
++++ b/gst-libs/ext/libav/libavcodec/vqavideo.c
+@@ -527,6 +527,11 @@ static void vqa_decode_chunk(VqaContext *s)
+ chunk_size = AV_RB32(&s->buf[cbp0_chunk + 4]);
+ cbp0_chunk += CHUNK_PREAMBLE_SIZE;
+
++ if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
++ av_log(s->avctx, AV_LOG_ERROR, "cbp0 chunk too large (0x%X bytes)\n", chunk_size);
++ return AVERROR_INVALIDDATA;
++ }
++
+ /* accumulate partial codebook */
+ memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
+ &s->buf[cbp0_chunk], chunk_size);
+@@ -550,6 +555,11 @@ static void vqa_decode_chunk(VqaContext *s)
+ chunk_size = AV_RB32(&s->buf[cbpz_chunk + 4]);
+ cbpz_chunk += CHUNK_PREAMBLE_SIZE;
+
++ if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
++ av_log(s->avctx, AV_LOG_ERROR, "cbpz chunk too large (0x%X bytes)\n", chunk_size);
++ return AVERROR_INVALIDDATA;
++ }
++
+ /* accumulate partial codebook */
+ memcpy(&s->next_codebook_buffer[s->next_codebook_buffer_index],
+ &s->buf[cbpz_chunk], chunk_size);
+--
+1.7.5.4
+