[OE-core] [dora][master][PATCH 2/2] gst-ffmpeg: fix CVE-2013-3674

Mark Hatle mark.hatle at windriver.com
Thu Nov 21 07:05:05 UTC 2013


From: Ming Liu <ming.liu at windriver.com>

The cdg_decode_frame function in cdgraphics.c in libavcodec in FFmpeg before
1.2.1 does not validate the presence of non-header data in a buffer, which
allows remote attackers to cause a denial of service (out-of-bounds array
access and application crash) via crafted CD Graphics Video data.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-3674

Signed-off-by: Ming Liu <ming.liu at windriver.com>
Signed-off-by: Jeff Polk <jeff.polk at windriver.com>
---
 .../gst-ffmpeg-CVE-2013-3674.patch                 | 26 ++++++++++++++++++++++
 .../gstreamer/gst-ffmpeg_0.10.13.bb                |  3 ++-
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-3674.patch

diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-3674.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-3674.patch
new file mode 100644
index 0000000..a28404b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/gst-ffmpeg-CVE-2013-3674.patch
@@ -0,0 +1,26 @@
+avcodec/cdgraphics: check buffer size before use
+
+Fixes out of array accesses
+
+Backported from:http://git.videolan.org/?p=ffmpeg.git;a=commit;h=ad002e1a13a8df934bd6cb2c84175a4780ab8942
+
+Upstream-status: Backport
+
+Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
+Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
+Signed-off-by: Ming Liu <ming.liu at windriver.com>
+
+diff -urpN a/gst-libs/ext/libav/libavcodec/cdgraphics.c b/gst-libs/ext/libav/libavcodec/cdgraphics.c
+--- a/gst-libs/ext/libav/libavcodec/cdgraphics.c	2013-07-18 13:17:08.399876575 +0800
++++ b/gst-libs/ext/libav/libavcodec/cdgraphics.c	2013-07-18 13:18:05.880502267 +0800
+@@ -291,7 +291,9 @@ static int cdg_decode_frame(AVCodecConte
+     inst    = bytestream_get_byte(&buf);
+     inst    &= CDG_MASK;
+     buf += 2;  /// skipping 2 unneeded bytes
+-    bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
++
++    if (buf_size > CDG_HEADER_SIZE)
++        bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
+ 
+     if ((command & CDG_MASK) == CDG_COMMAND) {
+         switch (inst) {
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
index 8873105..e1257a2 100644
--- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
@@ -22,12 +22,13 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://h264_qpel_mmx.patch \
            file://libav_e500mc.patch \
            file://libav_e5500.patch \
+           file://gst-ffmpeg-CVE-2013-3674.patch \
 "
 
 SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"
 SRC_URI[sha256sum] = "76fca05b08e00134e3cb92fa347507f42cbd48ddb08ed3343a912def187fbb62"
 
-PR = "r7"
+PR = "r8"
 
 GSTREAMER_DEBUG ?= "--disable-debug"
 
-- 
1.8.1.2.545.g2f19ada




More information about the Openembedded-core mailing list