From e7fc2b61bc44df58a23d02775847015a52ea8fcb Mon Sep 17 00:00:00 2001 From: Yue Tao Date: Sun, 27 Apr 2014 15:37:10 +0800 Subject: gst-ffmpeg: fix for Security Advisory CVE-2013-0852 The parse_picture_segment function in libavcodec/pgssubdec.c in FFmpeg before 1.1 allows remote attackers to have an unspecified impact via crafted RLE data, which triggers an out-of-bounds array access. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-0852 (From OE-Core rev: 37f9371b44bd914fdd64e4c4e4448a2908512203) Signed-off-by: Yue Tao Signed-off-by: Roy Li Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- ...heck-RLE-size-before-copying.-Fix-out-of-.patch | 34 ++++++++++++++++++++++ .../gstreamer/gst-ffmpeg_0.10.13.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch new file mode 100644 index 0000000000..1041347c87 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch @@ -0,0 +1,34 @@ +From 28bf685bfc6d0c744369cdf367f61a78d80d0b01 Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer +Date: Thu, 15 Nov 2012 16:41:28 +0100 +Subject: [PATCH] pgssubdec: check RLE size before copying. Fix out of array + accesses + +Upstream-Status: Backport + +Commit 28bf685bfc6d0c744369cdf367f61a78d80d0b01 release/1.1 + +Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind +Signed-off-by: Michael Niedermayer +(cherry picked from commit c0d68be555f5858703383040e04fcd6529777061) +--- + libavcodec/pgssubdec.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c +index 728f178..26a3c2a 100644 +--- a/gst-libs/ext/libav/libavcodec/pgssubdec.c ++++ b/gst-libs/ext/libav/libavcodec/pgssubdec.c +@@ -202,6 +202,11 @@ static int parse_picture_segment(AVCodec + return -1; + } + ++ if (buf_size > rle_bitmap_len) { ++ av_log(avctx, AV_LOG_ERROR, "too much RLE data\n"); ++ return AVERROR_INVALIDDATA; ++ } ++ + ctx->picture.w = width; + ctx->picture.h = height; + +-- 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 430bcc7f1d..eded98bb32 100644 --- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb +++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb @@ -29,6 +29,7 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \ file://0001-huffyuvdec-Skip-len-0-cases.patch \ file://0001-huffyuvdec-Check-init_vlc-return-codes.patch \ file://0001-alsdec-check-block-length.patch \ + file://0001-pgssubdec-check-RLE-size-before-copying.-Fix-out-of-.patch \ " SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4" -- cgit 1.2.3-korg