summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorYue Tao <Yue.Tao@windriver.com>2014-04-14 18:38:34 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-21 19:50:20 +0100
commit46a9ffc167f6c95218cf7eb6653876492e494569 (patch)
tree5a0b789403ce960370dc5fcc1ece1cfa5ba7389f /meta
parent1532ea067d084e1659a0cb9a6374da1e6c86ba1f (diff)
downloadpoky-46a9ffc167f6c95218cf7eb6653876492e494569.tar.gz
gst-ffmpeg: fix for Security Advisory CVE-2014-2263
The mpegts_write_pmt function in the MPEG2 transport stream (aka DVB) muxer (libavformat/mpegtsenc.c) in FFmpeg, possibly 2.1 and earlier, allows remote attackers to have unspecified impact and vectors, which trigger an out-of-bounds write. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-2263 (From OE-Core rev: 70bf8c8dea82e914a6dcf67aefb6386dbc7706cd) 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>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch69
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch
new file mode 100644
index 0000000000..68bb66e4e2
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avformat-mpegtsenc-Check-data-array-size-in-mpegts_w.patch
@@ -0,0 +1,69 @@
1From 12770701856a05b6b3cd706f708f8e9a4e8a1336 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Thu, 13 Feb 2014 13:59:51 +0100
4Subject: [PATCH] avformat/mpegtsenc: Check data array size in
5 mpegts_write_pmt()
6
7Upstream-Status: Backport
8
9COmmit 12770701856a05b6b3cd706f708f8e9a4e8a1336 release/0.11
10
11Prevents out of array writes
12
13Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14(cherry picked from commit 842b6c14bcfc1c5da1a2d288fd65386eb8c158ad)
15
16Conflicts:
17
18 libavformat/mpegtsenc.c
19(cherry picked from commit e87de3f50b765134588d0b048c32ed4b8acc16fb)
20
21Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
22---
23 libavformat/mpegtsenc.c | 9 +++++++--
24 1 files changed, 7 insertions(+), 2 deletions(-)
25
26diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
27index 793e205..a12d19f 100644
28--- a/gst-libs/ext/libav/libavformat/mpegtsenc.c
29+++ b/gst-libs/ext/libav/libavformat/mpegtsenc.c
30@@ -240,7 +240,7 @@ static void mpegts_write_pat(AVFormatContext *s)
31 data, q - data);
32 }
33
34-static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
35+static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
36 {
37 // MpegTSWrite *ts = s->priv_data;
38 uint8_t data[1012], *q, *desc_length_ptr, *program_info_length_ptr;
39@@ -293,6 +293,10 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
40 stream_type = STREAM_TYPE_PRIVATE_DATA;
41 break;
42 }
43+
44+ if (q - data > sizeof(data) - 32)
45+ return AVERROR(EINVAL);
46+
47 *q++ = stream_type;
48 put16(&q, 0xe000 | ts_st->pid);
49 desc_length_ptr = q;
50@@ -324,7 +328,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
51 len_ptr = q++;
52 *len_ptr = 0;
53
54- for (p = lang->value; next && *len_ptr < 255 / 4 * 4; p = next + 1) {
55+ for (p = lang->value; next && *len_ptr < 255 / 4 * 4 && q - data < sizeof(data) - 4; p = next + 1) {
56 next = strchr(p, ',');
57 if (strlen(p) != 3 && (!next || next != p + 3))
58 continue; /* not a 3-letter code */
59@@ -386,6 +390,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
60 }
61 mpegts_write_section1(&service->pmt, PMT_TID, service->sid, 0, 0, 0,
62 data, q - data);
63+ return 0;
64 }
65
66 /* NOTE: str == NULL is accepted for an empty string */
67--
681.7.5.4
69
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 e1257a2697..4913539c68 100644
--- a/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
@@ -23,6 +23,7 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${BPN}/${BPN}-${PV}.tar.bz2 \
23 file://libav_e500mc.patch \ 23 file://libav_e500mc.patch \
24 file://libav_e5500.patch \ 24 file://libav_e5500.patch \
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" 27"
27 28
28SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4" 29SRC_URI[md5sum] = "7f5beacaf1312db2db30a026b36888c4"