diff options
author | Yue Tao <Yue.Tao@windriver.com> | 2014-04-25 16:26:00 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-29 13:43:29 +0100 |
commit | 48169ac9bcd93f436ce166bd440157948613a495 (patch) | |
tree | f831fa2384dbfc823480d367efa7ce9b18b8a444 | |
parent | f091b8a3cf3fb271f740f98c0805c6027e9ee19f (diff) | |
download | poky-48169ac9bcd93f436ce166bd440157948613a495.tar.gz |
gst-ffmpeg: fix for Security Advisory CVE-2014-2099
The msrle_decode_frame function in libavcodec/msrle.c in FFmpeg before
2.1.4 does not properly calculate line sizes, which allows remote
attackers to cause a denial of service (out-of-bounds array access) or
possibly have unspecified other impact via crafted Microsoft RLE video
data.
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-2099
(From OE-Core rev: 3e27099f9aad1eb48412b07a18dcea398c18245b)
(From OE-Core rev: 5898f20bb2f38a91b2dd1b4cc4798fd960331a14)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch | 50 | ||||
-rw-r--r-- | meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch new file mode 100644 index 0000000000..b0a3fb10c7 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From 573d5fdedae72bf59d8c0b0766fdee171063d36f Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Niedermayer <michaelni@gmx.at> | ||
3 | Date: Sun, 16 Feb 2014 23:08:52 +0100 | ||
4 | Subject: [PATCH] avcodec/msrle: use av_image_get_linesize() to calculate the | ||
5 | linesize | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | Commit 573d5fdedae72bf59d8c0b0766fdee171063d36f release/0.9 | ||
10 | |||
11 | Fixes out of array access | ||
12 | Fixes: 14a74a0a2dc67ede543f0e35d834fbbe-asan_heap-oob_49572c_556_cov_215466444_44_001_engine_room.mov | ||
13 | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind | ||
14 | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> | ||
15 | (cherry picked from commit c919e1ca2ecfc47d796382973ba0e48b8f6f92a2) | ||
16 | |||
17 | Conflicts: | ||
18 | |||
19 | libavcodec/msrle.c | ||
20 | (cherry picked from commit bc1c8ec5e65098fd2ccd8456f667151dfc9cda42) | ||
21 | |||
22 | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> | ||
23 | --- | ||
24 | libavcodec/msrle.c | 3 ++- | ||
25 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
26 | |||
27 | diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c | ||
28 | index 30159bb..c39ae7b 100644 | ||
29 | --- a/gst-libs/ext/libav/libavcodec/msrle.c | ||
30 | +++ b/gst-libs/ext/libav/libavcodec/msrle.c | ||
31 | @@ -35,6 +35,7 @@ | ||
32 | #include "avcodec.h" | ||
33 | #include "dsputil.h" | ||
34 | #include "msrledec.h" | ||
35 | +#include "libavutil/imgutils.h" | ||
36 | |||
37 | typedef struct MsrleContext { | ||
38 | AVCodecContext *avctx; | ||
39 | @@ -107,7 +108,7 @@ static int msrle_decode_frame(AVCodecContext *avctx, | ||
40 | |||
41 | /* FIXME how to correctly detect RLE ??? */ | ||
42 | if (avctx->height * istride == avpkt->size) { /* assume uncompressed */ | ||
43 | - int linesize = avctx->width * avctx->bits_per_coded_sample / 8; | ||
44 | + int linesize = av_image_get_linesize(avctx->pix_fmt, avctx->width, 0); | ||
45 | uint8_t *ptr = s->frame.data[0]; | ||
46 | uint8_t *buf = avpkt->data + (avctx->height-1)*istride; | ||
47 | int i, j; | ||
48 | -- | ||
49 | 1.7.5.4 | ||
50 | |||
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 3d1f207b1b..05cc404050 100644 --- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb | |||
@@ -25,6 +25,7 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \ | |||
25 | file://gst-ffmpeg-CVE-2013-3674.patch \ | 25 | file://gst-ffmpeg-CVE-2013-3674.patch \ |
26 | file://0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch \ | 26 | file://0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch \ |
27 | file://0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch \ | 27 | file://0001-vqavideo-check-chunk-sizes-before-reading-chunks.patch \ |
28 | file://0001-avcodec-msrle-use-av_image_get_linesize-to-calculate.patch \ | ||
28 | " | 29 | " |
29 | 30 | ||
30 | SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4" | 31 | SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4" |