public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/spice/files/, app-emulation/spice/
@ 2015-11-18 19:26 Matthias Maier
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Maier @ 2015-11-18 19:26 UTC (permalink / raw
  To: gentoo-commits

commit:     b74805e260664d8d968d65ca63c00c99c31e762d
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 18 19:25:53 2015 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Wed Nov 18 19:25:53 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b74805e2

app-emulation/spice: drop vulnerable (bug #562890, CVE-2015-{5260,5261})

Drop vulnerable version 0.12.5

Gentoo-Bug: 562890

Package-Manager: portage-2.2.24

 app-emulation/spice/Manifest                       |  1 -
 ...n-mjpeg_encoder_adjust_params_to_bit_rate.patch | 30 --------
 ....5-fix-crash-when-clearing-surface-memory.patch | 31 --------
 ...ver-dont-assert-on-invalid-client-message.patch | 30 --------
 app-emulation/spice/spice-0.12.5-r1.ebuild         | 82 ----------------------
 5 files changed, 174 deletions(-)

diff --git a/app-emulation/spice/Manifest b/app-emulation/spice/Manifest
index fe05937..cd51bb5 100644
--- a/app-emulation/spice/Manifest
+++ b/app-emulation/spice/Manifest
@@ -1,2 +1 @@
-DIST spice-0.12.5.tar.bz2 1737169 SHA256 4209a20d8f67cb99a8a6ac499cfe79a18d4ca226360457954a223d6795c2f581 SHA512 1501c913ba3b1856444536a9bfda7a2138a96088f940b483e963df342b91deb945d77bfb3c83ebddfcd7c3008695c0dd7df30ff9fd8502cbbcac1c610a273572 WHIRLPOOL 8f50a91febb0d2279ac867ae31cb14f996106625f0f26ba1bb8b5b576eedce6839f52c70e19a03f03be209f695c36b3ba1d94fadee6c9f134e2afffd5b99c476
 DIST spice-0.12.6.tar.bz2 1181088 SHA256 f148ea30135bf80a4f465ce723a1cd6d4ccb34c098b6298a020b378ace8569b6 SHA512 877d9c447a09055c61db7839ae1a2bbd97ab1178d8fd30fff83883064f8a2f269479649e696732095833ed3fda2d0cc0cbe2a420decb89d36d2cf2f18ad9a3db WHIRLPOOL e381cf469a29be9a91ab442ee5f426a44ee569528d9297401df1c927cbf558e9daee7709cd69a4cc6389481b0c5aa26b19e56f0e97576e270d768842581544fe

diff --git a/app-emulation/spice/files/spice-0.12.5-fix-assert-in-mjpeg_encoder_adjust_params_to_bit_rate.patch b/app-emulation/spice/files/spice-0.12.5-fix-assert-in-mjpeg_encoder_adjust_params_to_bit_rate.patch
deleted file mode 100644
index 0ced728..0000000
--- a/app-emulation/spice/files/spice-0.12.5-fix-assert-in-mjpeg_encoder_adjust_params_to_bit_rate.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 284cca2a5ebc98257275585083321a7100fb89b3 Mon Sep 17 00:00:00 2001
-From: Jonathon Jongsma <jjongsma@redhat.com>
-Date: Fri, 30 May 2014 18:45:02 +0000
-Subject: Fix assert in mjpeg_encoder_adjust_params_to_bit_rate()
-
-If mjpeg_encoder_reset_quality() is called with the same quality as currently
-set, it will not reset last_enc_size but not reset num_recent_enc_frames,
-violating some assumptions in _adjust_params_to_bit_rate(). To avoid aborting
-the server, simply return early from this function.
-
-Resolves: rhbz#1086820
----
-diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c
-index f465d88..12447da 100644
---- a/server/mjpeg_encoder.c
-+++ b/server/mjpeg_encoder.c
-@@ -625,7 +625,10 @@ static void mjpeg_encoder_adjust_params_to_bit_rate(MJpegEncoder *encoder)
-         return;
-     }
- 
--    spice_assert(rate_control->num_recent_enc_frames);
-+    if (!rate_control->num_recent_enc_frames) {
-+        spice_debug("No recent encoded frames");
-+        return;
-+    }
- 
-     if (rate_control->num_recent_enc_frames < MJPEG_AVERAGE_SIZE_WINDOW &&
-         rate_control->num_recent_enc_frames < rate_control->fps) {
---
-cgit v0.9.0.2-2-gbebe

diff --git a/app-emulation/spice/files/spice-0.12.5-fix-crash-when-clearing-surface-memory.patch b/app-emulation/spice/files/spice-0.12.5-fix-crash-when-clearing-surface-memory.patch
deleted file mode 100644
index b14a56b..0000000
--- a/app-emulation/spice/files/spice-0.12.5-fix-crash-when-clearing-surface-memory.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 1898f3949cf75422aa1fedba40c429b28d8d6b67 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@gmail.com>
-Date: Wed, 6 Aug 2014 18:34:56 +0200
-Subject: Fix crash when clearing surface memory
-
-The beginning of the surface data needs to be computed correctly if the
-stride is negative, otherwise, it should point already to the beginning
-of the surface data. This bug seems to exists since 4a208b (0.5.2)
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1029646
-
-diff --git a/server/red_worker.c b/server/red_worker.c
-index 6bdad93..35a1a04 100644
---- a/server/red_worker.c
-+++ b/server/red_worker.c
-@@ -9470,7 +9470,11 @@ static inline void red_create_surface(RedWorker *worker, uint32_t surface_id, ui
-     surface->context.stride = stride;
-     surface->context.line_0 = line_0;
-     if (!data_is_valid) {
--        memset((char *)line_0 + (int32_t)(stride * (height - 1)), 0, height*abs(stride));
-+        char *data = line_0;
-+        if (stride < 0) {
-+            data -= abs(stride) * (height - 1);
-+        }
-+        memset(data, 0, height*abs(stride));
-     }
-     surface->create.info = NULL;
-     surface->destroy.info = NULL;
--- 
-cgit v0.10.2
-

diff --git a/app-emulation/spice/files/spice-0.12.5-server-dont-assert-on-invalid-client-message.patch b/app-emulation/spice/files/spice-0.12.5-server-dont-assert-on-invalid-client-message.patch
deleted file mode 100644
index d9b49a4..0000000
--- a/app-emulation/spice/files/spice-0.12.5-server-dont-assert-on-invalid-client-message.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 3c25192ee90f843a2f84ff99d119b1cb45979bac Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@gmail.com>
-Date: Wed, 25 Jun 2014 14:36:03 +0200
-Subject: server: don't assert on invalid client message
-
-Some users have been reaching this error:
-snd_receive: ASSERT n failed
-
-A misbehaving client could easily hit that condition by sending too big
-messages. Instead of assert(), replace with a warning. When a message
-too big to fit is received, it will simply disconnect the channel.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=962187
-
-diff --git a/server/snd_worker.c b/server/snd_worker.c
-index 7d52ded..70148b7 100644
---- a/server/snd_worker.c
-+++ b/server/snd_worker.c
-@@ -421,7 +421,7 @@ static void snd_receive(void* data)
-     for (;;) {
-         ssize_t n;
-         n = channel->receive_data.end - channel->receive_data.now;
--        spice_assert(n);
-+        spice_warn_if(n <= 0);
-         n = reds_stream_read(channel->stream, channel->receive_data.now, n);
-         if (n <= 0) {
-             if (n == 0) {
--- 
-cgit v0.10.2
-

diff --git a/app-emulation/spice/spice-0.12.5-r1.ebuild b/app-emulation/spice/spice-0.12.5-r1.ebuild
deleted file mode 100644
index e33e68a..0000000
--- a/app-emulation/spice/spice-0.12.5-r1.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils python-any-r1
-
-DESCRIPTION="SPICE server and client"
-HOMEPAGE="http://spice-space.org/"
-SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="client sasl smartcard static-libs" # static
-
-# only the client links against libcacard, the libspice-server only uses the headers
-# the client cannot be built statically since alsa and qemu[smartcard] are missing static-libs
-RDEPEND=">=x11-libs/pixman-0.17.7[static-libs(+)?]
-	>=dev-libs/glib-2.22:2[static-libs(+)?]
-	>=media-libs/celt-0.5.1.1:0.5.1[static-libs(+)?]
-	media-libs/opus[static-libs(+)?]
-	dev-libs/openssl[static-libs(+)?]
-	virtual/jpeg[static-libs(+)?]
-	sys-libs/zlib[static-libs(+)?]
-	sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )
-	client? (
-		media-libs/alsa-lib
-		>=x11-libs/libXrandr-1.2
-		x11-libs/libX11
-		x11-libs/libXext
-		>=x11-libs/libXinerama-1.0
-		x11-libs/libXfixes
-		x11-libs/libXrender
-		smartcard? ( app-emulation/qemu[smartcard] )
-	)"
-
-DEPEND="virtual/pkgconfig
-	$(python_gen_any_dep \
-		'>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]')
-	smartcard? ( app-emulation/qemu[smartcard] )
-	${RDEPEND}"
-
-python_check_deps() {
-	has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
-}
-
-# maintainer notes:
-# * opengl support is currently broken
-
-src_prepare() {
-	epatch \
-		"${FILESDIR}/0.11.0-gold.patch" \
-		"${FILESDIR}/${P}-fix-assert-in-mjpeg_encoder_adjust_params_to_bit_rate.patch" \
-		"${FILESDIR}/${P}-server-dont-assert-on-invalid-client-message.patch" \
-		"${FILESDIR}/${P}-fix-crash-when-clearing-surface-memory.patch"
-
-	epatch_user
-}
-
-src_configure() {
-	econf \
-		$(use_enable static-libs static) \
-		$(use_enable client) \
-		$(use_with sasl) \
-		$(use_enable smartcard) \
-		--disable-gui \
-		--disable-static-linkage
-#		$(use_enable static static-linkage) \
-}
-
-src_install() {
-	default
-	use static-libs || prune_libtool_files
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/spice/files/, app-emulation/spice/
@ 2016-08-17  6:37 Yixun Lan
  0 siblings, 0 replies; 7+ messages in thread
From: Yixun Lan @ 2016-08-17  6:37 UTC (permalink / raw
  To: gentoo-commits

commit:     8292cfd3fd12eac8eee9df72a0464f7eb4a30bc7
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 17 02:22:59 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Aug 17 06:36:25 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8292cfd3

app-emulation/spice: version bump 0.13.2

1) add gstreamer support, possible using mjpeg, vp8, x264 video encodec
   upstream support both gstreamer version 1.0 & 0.10, but for now we only
   choose 1.0
2) notify user to install extra gstreamer plugins via readme.gentoo
3) bump EAPI=6

Package-Manager: portage-2.3.0

 app-emulation/spice/Manifest            |  1 +
 app-emulation/spice/files/README.gentoo |  7 +++
 app-emulation/spice/metadata.xml        |  3 ++
 app-emulation/spice/spice-0.13.2.ebuild | 77 +++++++++++++++++++++++++++++++++
 4 files changed, 88 insertions(+)

diff --git a/app-emulation/spice/Manifest b/app-emulation/spice/Manifest
index 45c923c..b1bc248 100644
--- a/app-emulation/spice/Manifest
+++ b/app-emulation/spice/Manifest
@@ -1,2 +1,3 @@
 DIST spice-0.12.7.tar.bz2 1220405 SHA256 1c8e96cb9e833e23372e2f461508135903b697fd8c6daff565e9e87f6d2f6aba SHA512 a740d500d0ccad3edd1f2f71e51c5a120d6ae98e44125f33870c12f5d1eeb30b809e588d05b2d0cadb4216e889b38e57d2278916817538311b875ff22e3b31ae WHIRLPOOL 61ffa3e280a346a2667ddd38dcfd63ffa6c1e6efd0f05da4fad43b00ca5e1a1587411a907b929b75e4d1e72ebcef29621ccdd76dfb313e8f3a5513a5a367132b
 DIST spice-0.13.1.tar.bz2 1245323 SHA256 9ecb130424da02e90c235c1294f6e759d7c676c5e710587a5c98a1f20f991da2 SHA512 a8e65cc02c802686f2e0c21615401e13b337e050c40938bebefa684abc1ce0e2d478136d0fec481a8ee30ed98f2e2fb909dfbf6cd65e9dfd7093d59f825b95d5 WHIRLPOOL 068d7d26f18435995546d84b0d8d81ced4973773303463e597cf05e1c5accd9ac8554f22032eb55827bebbe6c0fc14915455da24c58fc70b135d955fe3442db7
+DIST spice-0.13.2.tar.bz2 1284734 SHA256 045a1f145d8207ecf33105c8a8917252c1201c45791fdc544733465a37974954 SHA512 7220c6550446a8077522442bd518cff68439bb0b00ee199920b32a97c3655ccad75a0cdfc822a99be678e6098ad33698b26340caddae0400403490a89137d367 WHIRLPOOL f2bd409e87203c2bbe481e6b6ba9ae3c6cfee0e67b0dd5073c97e9ff14d9c02a7cec0606700717ce9c25e478a38eefc925f9c797697981528f357464f388b65d

diff --git a/app-emulation/spice/files/README.gentoo b/app-emulation/spice/files/README.gentoo
new file mode 100644
index 0000000..1920ea6
--- /dev/null
+++ b/app-emulation/spice/files/README.gentoo
@@ -0,0 +1,7 @@
+
+If you choose to enable the video streaming support of gstreamer,
+please try to install addtional gst-plugins which matching the video codecs
+
+	mjpeg		media-plugins/gst-plugins-libav:1.0
+	vpx		media-plugins/gst-plugins-vpx:1.0
+	x264		media-plugins/gst-plugins-x264:1.0

diff --git a/app-emulation/spice/metadata.xml b/app-emulation/spice/metadata.xml
index 0f32fa2..81ba74a 100644
--- a/app-emulation/spice/metadata.xml
+++ b/app-emulation/spice/metadata.xml
@@ -8,5 +8,8 @@
 	<use>
 		<flag name="lz4">Enable support for LZ4 compression using <pkg>app-arch/lz4</pkg></flag>
 		<flag name="smartcard">Enable smartcard remoting using <pkg>app-emulation/libcacard</pkg></flag>
+		<flag name="mjpeg">Enables mjpeg encodec support using <pkg>media-plugins/gst-plugins-libav</pkg></flag>
+		<flag name="vpx">Enables vp8 encodec support using <pkg>media-plugins/gst-plugins-vpx</pkg></flag>
+		<flag name="x264">Enables x264 encodec support using <pkg>media-plugins/gst-plugins-x264</pkg></flag>
 	</use>
 </pkgmetadata>

diff --git a/app-emulation/spice/spice-0.13.2.ebuild b/app-emulation/spice/spice-0.13.2.ebuild
new file mode 100644
index 0000000..0b41187
--- /dev/null
+++ b/app-emulation/spice/spice-0.13.2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils python-any-r1 readme.gentoo-r1
+
+DESCRIPTION="SPICE server"
+HOMEPAGE="http://spice-space.org/"
+SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libressl lz4 sasl smartcard static-libs gstreamer"
+
+# the libspice-server only uses the headers of libcacard
+RDEPEND="
+	>=dev-libs/glib-2.22:2[static-libs(+)?]
+	>=media-libs/celt-0.5.1.1:0.5.1[static-libs(+)?]
+	media-libs/opus[static-libs(+)?]
+	sys-libs/zlib[static-libs(+)?]
+	virtual/jpeg:0=[static-libs(+)?]
+	>=x11-libs/pixman-0.17.7[static-libs(+)?]
+	!libressl? ( dev-libs/openssl:0[static-libs(+)?] )
+	libressl? ( dev-libs/libressl[static-libs(+)?] )
+	lz4? ( app-arch/lz4 )
+	smartcard? ( >=app-emulation/libcacard-0.1.2 )
+	sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )
+	gstreamer? ( media-libs/gstreamer:1.0 )"
+
+DEPEND="
+	~app-emulation/spice-protocol-0.12.12
+	virtual/pkgconfig
+	$(python_gen_any_dep '
+		>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
+		dev-python/six[${PYTHON_USEDEP}]
+	')
+	smartcard? ( app-emulation/qemu[smartcard] )
+	${RDEPEND}"
+
+# Prevent sandbox violations, bug #586560
+# https://bugzilla.gnome.org/show_bug.cgi?id=581836
+addpredict /dev
+
+python_check_deps() {
+	has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
+	has_version "dev-python/six[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
+}
+
+# maintainer notes:
+# * opengl support is currently broken
+src_configure() {
+	local myconf="
+		$(use_enable static-libs static)
+		$(use_enable lz4)
+		$(use_with sasl)
+		$(use_enable smartcard)
+		$(usex gstreamer "1.0" "no")
+		--enable-celt051
+		--disable-gui
+		"
+	econf ${myconf}
+}
+
+src_install() {
+	default
+	use static-libs || prune_libtool_files
+	readme.gentoo_create_doc
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/spice/files/, app-emulation/spice/
@ 2017-05-11  5:07 Matthias Maier
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Maier @ 2017-05-11  5:07 UTC (permalink / raw
  To: gentoo-commits

commit:     434ade008ad3c7097abf2c9074b6953de53488cf
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu May 11 05:07:07 2017 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu May 11 05:07:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=434ade00

app-emulation/spice: compatibility fixes for app-arch/lz4-1.7.4, bug #617202

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 .../spice/files/spice-0.13.3-skip_faulty_lz4_check.patch   | 13 +++++++++++++
 app-emulation/spice/spice-0.13.3-r1.ebuild                 | 14 ++++++++++++--
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/app-emulation/spice/files/spice-0.13.3-skip_faulty_lz4_check.patch b/app-emulation/spice/files/spice-0.13.3-skip_faulty_lz4_check.patch
new file mode 100644
index 00000000000..6ae65ba6d13
--- /dev/null
+++ b/app-emulation/spice/files/spice-0.13.3-skip_faulty_lz4_check.patch
@@ -0,0 +1,13 @@
+diff --git a/spice-common/m4/spice-deps.m4 b/spice-common/m4/spice-deps.m4
+index adedec4..6cb8bde 100644
+--- a/spice-common/m4/spice-deps.m4
++++ b/spice-common/m4/spice-deps.m4
+@@ -185,7 +185,7 @@ AC_DEFUN([SPICE_CHECK_LZ4], [
+ 
+     have_lz4="no"
+     if test "x$enable_lz4" != "xno"; then
+-      PKG_CHECK_MODULES([LZ4], [liblz4 >= 129], [have_lz4="yes"], [have_lz4="no"])
++      PKG_CHECK_MODULES([LZ4], [liblz4], [have_lz4="yes"], [have_lz4="no"])
+ 
+       if test "x$have_lz4" = "xyes"; then
+         AC_DEFINE(USE_LZ4, [1], [Define to build with lz4 support])

diff --git a/app-emulation/spice/spice-0.13.3-r1.ebuild b/app-emulation/spice/spice-0.13.3-r1.ebuild
index 1ac1307cb87..ad83ef4e2ef 100644
--- a/app-emulation/spice/spice-0.13.3-r1.ebuild
+++ b/app-emulation/spice/spice-0.13.3-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=6
 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
 
-inherit ltprune python-any-r1 readme.gentoo-r1 xdg-utils
+inherit autotools ltprune python-any-r1 readme.gentoo-r1 xdg-utils
 
 DESCRIPTION="SPICE server"
 HOMEPAGE="http://spice-space.org/"
@@ -25,7 +25,7 @@ RDEPEND="
 	>=x11-libs/pixman-0.17.7[static-libs(+)?]
 	!libressl? ( dev-libs/openssl:0=[static-libs(+)?] )
 	libressl? ( dev-libs/libressl:0=[static-libs(+)?] )
-	lz4? ( app-arch/lz4 )
+	lz4? ( app-arch/lz4:0=[static-libs(+)?] )
 	smartcard? ( >=app-emulation/libcacard-0.1.2 )
 	sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )
 	gstreamer? ( media-libs/gstreamer:1.0 )
@@ -41,6 +41,10 @@ DEPEND="${RDEPEND}
 	smartcard? ( app-emulation/qemu[smartcard] )
 "
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.13.3-skip_faulty_lz4_check.patch
+)
+
 python_check_deps() {
 	has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
 	has_version "dev-python/six[${PYTHON_USEDEP}]"
@@ -50,6 +54,12 @@ pkg_setup() {
 	[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
 }
 
+src_prepare() {
+	default
+
+	eautoreconf
+}
+
 # maintainer notes:
 # * opengl support is currently broken
 src_configure() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/spice/files/, app-emulation/spice/
@ 2017-05-11 14:24 Matthias Maier
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Maier @ 2017-05-11 14:24 UTC (permalink / raw
  To: gentoo-commits

commit:     b4d9925b452e107ae94210f0154df1cb1da0e4ff
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu May 11 14:18:52 2017 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu May 11 14:24:26 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4d9925b

app-emulation/spice: drop old version 0.12.7-r1

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 app-emulation/spice/Manifest                       |   1 -
 app-emulation/spice/files/0.11.0-gold.patch        |  30 -----
 .../spice/files/0.12.6-CVE-2016-0749-p1.patch      |  89 ---------------
 .../spice/files/0.12.6-CVE-2016-0749-p2.patch      |  61 -----------
 .../spice/files/0.12.6-CVE-2016-2150-p1.patch      | 121 ---------------------
 .../spice/files/0.12.6-CVE-2016-2150-p2.patch      |  33 ------
 app-emulation/spice/spice-0.12.7-r1.ebuild         |  89 ---------------
 7 files changed, 424 deletions(-)

diff --git a/app-emulation/spice/Manifest b/app-emulation/spice/Manifest
index 8e228b69b86..83bcd50e916 100644
--- a/app-emulation/spice/Manifest
+++ b/app-emulation/spice/Manifest
@@ -1,2 +1 @@
-DIST spice-0.12.7.tar.bz2 1220405 SHA256 1c8e96cb9e833e23372e2f461508135903b697fd8c6daff565e9e87f6d2f6aba SHA512 a740d500d0ccad3edd1f2f71e51c5a120d6ae98e44125f33870c12f5d1eeb30b809e588d05b2d0cadb4216e889b38e57d2278916817538311b875ff22e3b31ae WHIRLPOOL 61ffa3e280a346a2667ddd38dcfd63ffa6c1e6efd0f05da4fad43b00ca5e1a1587411a907b929b75e4d1e72ebcef29621ccdd76dfb313e8f3a5513a5a367132b
 DIST spice-0.13.3.tar.bz2 1322505 SHA256 30f710c0e7594e05b6b9cc702be748a69f910a95192ab851d748c256157fb89e SHA512 63496fbd3df0fd453052cef8e1fb00a3a28f0105610676fdc4a58043cbc6da571ae4407701af2b817e410d05ce727d60d5ee0c93c8897231e25229897c51d95a WHIRLPOOL 16bb08301d66c1f21f612f5be87ba1ffef7132f3c18ac3ab7feec21e16de61461648311d04f6990254d4c47ee7a6d39f4c33f122e941e5a3fc0c2ed289dd928b

diff --git a/app-emulation/spice/files/0.11.0-gold.patch b/app-emulation/spice/files/0.11.0-gold.patch
deleted file mode 100644
index ad08c14e9ab..00000000000
--- a/app-emulation/spice/files/0.11.0-gold.patch
+++ /dev/null
@@ -1,30 +0,0 @@
- server/tests/Makefile.am |    2 ++
- server/tests/Makefile.in |    2 +-
- 2 files changed, 3 insertions(+), 1 deletions(-)
-
-diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
-index e77865c..905de9d 100644
---- a/server/tests/Makefile.am
-+++ b/server/tests/Makefile.am
-@@ -19,6 +19,8 @@ LDADD =								\
- 	$(top_builddir)/server/libspice-server.la		\
- 	$(NULL)
- 
-+AM_LDFLAGS = -pthread
-+
- COMMON_BASE =					\
- 	basic_event_loop.c			\
- 	basic_event_loop.h			\
-diff --git a/server/tests/Makefile.in b/server/tests/Makefile.in
-index 5b177e2..3aacfd3 100644
---- a/server/tests/Makefile.in
-+++ b/server/tests/Makefile.in
-@@ -144,7 +144,7 @@ am__v_at_0 = @
- CCLD = $(CC)
- LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
--	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-+	$(AM_LDFLAGS) $(LDFLAGS) -pthread -o $@
- AM_V_CCLD = $(am__v_CCLD_@AM_V@)
- am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
- am__v_CCLD_0 = @echo "  CCLD  " $@;

diff --git a/app-emulation/spice/files/0.12.6-CVE-2016-0749-p1.patch b/app-emulation/spice/files/0.12.6-CVE-2016-0749-p1.patch
deleted file mode 100644
index 2d79fbb536a..00000000000
--- a/app-emulation/spice/files/0.12.6-CVE-2016-0749-p1.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Marc-Andre Lureau <marcandre.lureau@redhat.com>
-Date: Thu, 17 Dec 2015 18:13:47 +0100
-Subject: [PATCH] smartcard: add a ref to item before adding to pipe
-
-There is an unref when the message is sent.
-
-==17204== ERROR: AddressSanitizer: heap-use-after-free on address 0x6008000144a8 at pc 0x7fffee0ce245 bp 0x7fffffffc630 sp 0x7fffffffc620
-READ of size 4 at 0x6008000144a8 thread T0
-    #0 0x7fffee0ce244 in smartcard_unref_vsc_msg_item /home/elmarco/src/spice/spice/server/smartcard.c:608
-    #1 0x7fffee0cb451 in smartcard_unref_msg_to_client /home/elmarco/src/spice/spice/server/smartcard.c:178
-    #2 0x7fffedfcdf14 in spice_char_device_read_from_device /home/elmarco/src/spice/spice/server/char-device.c:330
-    #3 0x7fffedfd1763 in spice_char_device_wakeup /home/elmarco/src/spice/spice/server/char-device.c:901
-    #4 0x7fffee05da98 in spice_server_char_device_wakeup /home/elmarco/src/spice/spice/server/reds.c:2990
-    #5 0x55555593fa34 in spice_chr_write /home/elmarco/src/qemu/spice-qemu-char.c:189
-    #6 0x5555559375f1 in qemu_chr_fe_write /home/elmarco/src/qemu/qemu-char.c:220
-    #7 0x555555b3b682 in ccid_card_vscard_send_msg.isra.2 /home/elmarco/src/qemu/hw/usb/ccid-card-passthru.c:76
-    #8 0x555555b3c466 in ccid_card_vscard_send_error /home/elmarco/src/qemu/hw/usb/ccid-card-passthru.c:91
-    #9 0x555555b3c466 in ccid_card_vscard_handle_message /home/elmarco/src/qemu/hw/usb/ccid-card-passthru.c:242
-    #10 0x555555b3c466 in ccid_card_vscard_read /home/elmarco/src/qemu/hw/usb/ccid-card-passthru.c:289
-    #11 0x55555593f169 in vmc_write /home/elmarco/src/qemu/spice-qemu-char.c:41
-    #12 0x7fffedfcee6d in spice_char_device_write_to_device /home/elmarco/src/spice/spice/server/char-device.c:477
-    #13 0x7fffedfcfd31 in spice_char_device_write_buffer_add /home/elmarco/src/spice/spice/server/char-device.c:629
-    #14 0x7fffee0ce9df in smartcard_channel_write_to_reader /home/elmarco/src/spice/spice/server/smartcard.c:675
-    #15 0x7fffee0cc7db in smartcard_char_device_notify_reader_add /home/elmarco/src/spice/spice/server/smartcard.c:341
-    #16 0x7fffee0ce4f3 in smartcard_add_reader /home/elmarco/src/spice/spice/server/smartcard.c:648
-    #17 0x7fffee0cf2e2 in smartcard_channel_handle_message /home/elmarco/src/spice/spice/server/smartcard.c:763
-    #18 0x7fffedffe21f in red_peer_handle_incoming /home/elmarco/src/spice/spice/server/red-channel.c:307
-    #19 0x7fffedffe4f6 in red_channel_client_receive /home/elmarco/src/spice/spice/server/red-channel.c:325
-    #20 0x7fffee00726c in red_channel_client_event /home/elmarco/src/spice/spice/server/red-channel.c:1566
-    #21 0x555555c3c53d in qemu_iohandler_poll /home/elmarco/src/qemu/iohandler.c:143
-    #22 0x555555c3b800 in main_loop_wait /home/elmarco/src/qemu/main-loop.c:504
-    #23 0x5555556f160c in main_loop /home/elmarco/src/qemu/vl.c:1818
-    #24 0x5555556f160c in main /home/elmarco/src/qemu/vl.c:4394
-    #25 0x7fffed7d0b14 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/libc-start.c:274
-    #26 0x5555556f9c20 in _start (/home/elmarco/src/qemu/x86_64-softmmu/qemu-system-x86_64+0x1a5c20)
-0x6008000144a8 is located 24 bytes inside of 40-byte region [0x600800014490,0x6008000144b8)
-freed by thread T0 here:
-    #0 0x7ffff4e61009 in __interceptor_free /usr/src/debug/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/x86_64-redhat-linux/libsanitizer/asan/../../../../libsanitizer/asan/asan_malloc_linux.cc:61
-    #1 0x7fffee0ce2a1 in smartcard_unref_vsc_msg_item /home/elmarco/src/spice/spice/server/smartcard.c:610
-    #2 0x7fffee0cdd58 in smartcard_channel_release_pipe_item /home/elmarco/src/spice/spice/server/smartcard.c:548
-    #3 0x7fffee000668 in red_channel_client_release_item /home/elmarco/src/spice/spice/server/red-channel.c:602
-    #4 0x7fffee0006ef in red_channel_client_release_sent_item /home/elmarco/src/spice/spice/server/red-channel.c:609
-    #5 0x7fffee0007b5 in red_channel_peer_on_out_msg_done /home/elmarco/src/spice/spice/server/red-channel.c:620
-    #6 0x7fffedffed7e in red_peer_handle_outgoing /home/elmarco/src/spice/spice/server/red-channel.c:385
-    #7 0x7fffee0057bb in red_channel_client_send /home/elmarco/src/spice/spice/server/red-channel.c:1294
-    #8 0x7fffee0076e6 in red_channel_client_begin_send_message /home/elmarco/src/spice/spice/server/red-channel.c:1605
-    #9 0x7fffee0cdccd in smartcard_channel_send_item /home/elmarco/src/spice/spice/server/smartcard.c:541
-    #10 0x7fffee000570 in red_channel_client_send_item /home/elmarco/src/spice/spice/server/red-channel.c:588
-    #11 0x7fffee005bfb in red_channel_client_push /home/elmarco/src/spice/spice/server/red-channel.c:1347
-    #12 0x7fffee007ef7 in red_channel_client_pipe_add_push /home/elmarco/src/spice/spice/server/red-channel.c:1673
-    #13 0x7fffee0cde4d in smartcard_channel_client_pipe_add_push /home/elmarco/src/spice/spice/server/smartcard.c:571
-    #14 0x7fffee0cb567 in smartcard_send_msg_to_client /home/elmarco/src/spice/spice/server/smartcard.c:187
-    #15 0x7fffedfcdba2 in spice_char_device_send_msg_to_clients /home/elmarco/src/spice/spice/server/char-device.c:282
-    #16 0x7fffedfcdea4 in spice_char_device_read_from_device /home/elmarco/src/spice/spice/server/char-device.c:329
-    #17 0x7fffedfd1763 in spice_char_device_wakeup /home/elmarco/src/spice/spice/server/char-device.c:901
-    #18 0x7fffee05da98 in spice_server_char_device_wakeup /home/elmarco/src/spice/spice/server/reds.c:2990
-    #19 0x55555593fa34 in spice_chr_write /home/elmarco/src/qemu/spice-qemu-char.c:189
-
-Signed-off-by: Marc-Andre Lureau <marcandre.lureau@redhat.com>
----
- server/smartcard.c | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/server/smartcard.c b/server/smartcard.c
-index aad22aa..8d529fe 100644
---- a/server/smartcard.c
-+++ b/server/smartcard.c
-@@ -172,14 +172,17 @@ static void smartcard_unref_msg_to_client(SpiceCharDeviceMsgToClient *msg,
-     smartcard_unref_vsc_msg_item((MsgItem *)msg);
- }
- 
--static void smartcard_send_msg_to_client(SpiceCharDeviceMsgToClient *msg,
-+static void smartcard_send_msg_to_client(SpiceCharDeviceMsgToClient *message,
-                                          RedClient *client,
-                                          void *opaque)
- {
-     SmartCardDeviceState *dev = opaque;
--    spice_assert(dev->scc && dev->scc->base.client == client);
--    smartcard_channel_client_pipe_add_push(&dev->scc->base, &((MsgItem *)msg)->base);
-+    MsgItem *msg = (MsgItem *)message;
-+    PipeItem *item = &msg->base;
- 
-+    spice_assert(dev->scc && dev->scc->base.client == client);
-+    smartcard_ref_vsc_msg_item(msg);
-+    smartcard_channel_client_pipe_add_push(&dev->scc->base, item);
- }
- 
- static void smartcard_send_tokens_to_client(RedClient *client, uint32_t tokens, void *opaque)

diff --git a/app-emulation/spice/files/0.12.6-CVE-2016-0749-p2.patch b/app-emulation/spice/files/0.12.6-CVE-2016-0749-p2.patch
deleted file mode 100644
index 671fc4382ed..00000000000
--- a/app-emulation/spice/files/0.12.6-CVE-2016-0749-p2.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Marc-Andre Lureau <marcandre.lureau@redhat.com>
-Date: Thu, 17 Dec 2015 18:16:22 +0100
-Subject: [PATCH] smartcard: allocate msg with the expected size
-
-==529== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60040009c098 at pc 0x7fffee0eda6d bp 0x7fffffffcd00 sp 0x7fffffffccf0
-WRITE of size 4 at 0x60040009c098 thread T0
-    #0 0x7fffee0eda6c in smartcard_char_device_notify_reader_add /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:334
-    #1 0x7fffee0ef783 in smartcard_add_reader /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:642
-    #2 0x7fffee0f0568 in smartcard_channel_handle_message /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:757
-    #3 0x7fffee032f3f in red_peer_handle_incoming /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:304
-    #4 0x7fffee033216 in red_channel_client_receive /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:322
-    #5 0x7fffee03bf1f in red_channel_client_event /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:1561
-    #6 0x555555c3c53d in qemu_iohandler_poll /home/elmarco/src/qemu/iohandler.c:143
-    #7 0x555555c3b800 in main_loop_wait /home/elmarco/src/qemu/main-loop.c:504
-    #8 0x5555556f160c in main_loop /home/elmarco/src/qemu/vl.c:1818
-    #9 0x5555556f160c in main /home/elmarco/src/qemu/vl.c:4394
-    #10 0x7fffed80eb14 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/libc-start.c:274
-    #11 0x5555556f9c20 in _start (/home/elmarco/src/qemu/x86_64-softmmu/qemu-system-x86_64+0x1a5c20)
-0x60040009c098 is located 0 bytes to the right of 8-byte region [0x60040009c090,0x60040009c098)
-allocated by thread T0 here:
-    #0 0x7ffff4e612be in __interceptor_realloc /usr/src/debug/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/x86_64-redhat-linux/libsanitizer/asan/../../../../libsanitizer/asan/asan_malloc_linux.cc:92
-    #1 0x7fffee121308 in spice_realloc /home/elmarco/pkg/spice/spice-0.12.4/spice-common/common/mem.c:123
-    #2 0x7fffee004a48 in __spice_char_device_write_buffer_get /home/elmarco/pkg/spice/spice-0.12.4/server/char_device.c:516
-    #3 0x7fffee004e87 in spice_char_device_write_buffer_get /home/elmarco/pkg/spice/spice-0.12.4/server/char_device.c:557
-    #4 0x7fffee0ed8b9 in smartcard_char_device_notify_reader_add /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:325
-    #5 0x7fffee0ef783 in smartcard_add_reader /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:642
-    #6 0x7fffee0f0568 in smartcard_channel_handle_message /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:757
-    #7 0x7fffee032f3f in red_peer_handle_incoming /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:304
-    #8 0x7fffee033216 in red_channel_client_receive /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:322
-    #9 0x7fffee03bf1f in red_channel_client_event /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:1561
-    #10 0x555555c3c53d in qemu_iohandler_poll /home/elmarco/src/qemu/iohandler.c:143
-SUMMARY: AddressSanitizer: heap-buffer-overflow /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:334 smartcard_char_device_notify_reader_add
-
-Signed-off-by: Marc-Andre Lureau <marcandre.lureau@redhat.com>
----
- server/smartcard.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/server/smartcard.c b/server/smartcard.c
-index 8d529fe..3043ad1 100644
---- a/server/smartcard.c
-+++ b/server/smartcard.c
-@@ -325,7 +325,7 @@ static void smartcard_char_device_notify_reader_add(SmartCardDeviceState *st)
-     SpiceCharDeviceWriteBuffer *write_buf;
-     VSCMsgHeader *vheader;
- 
--    write_buf = spice_char_device_write_buffer_get(st->chardev_st, NULL, sizeof(vheader));
-+    write_buf = spice_char_device_write_buffer_get(st->chardev_st, NULL, sizeof(*vheader));
-     if (!write_buf) {
-         spice_error("failed to allocate write buffer");
-         return;
-@@ -372,7 +372,7 @@ static void smartcard_char_device_notify_reader_remove(SmartCardDeviceState *st)
-         spice_debug("reader add was never sent to the device");
-         return;
-     }
--    write_buf = spice_char_device_write_buffer_get(st->chardev_st, NULL, sizeof(vheader));
-+    write_buf = spice_char_device_write_buffer_get(st->chardev_st, NULL, sizeof(*vheader));
-     if (!write_buf) {
-         spice_error("failed to allocate write buffer");
-         return;

diff --git a/app-emulation/spice/files/0.12.6-CVE-2016-2150-p1.patch b/app-emulation/spice/files/0.12.6-CVE-2016-2150-p1.patch
deleted file mode 100644
index a1f0c64b971..00000000000
--- a/app-emulation/spice/files/0.12.6-CVE-2016-2150-p1.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Frediano Ziglio <fziglio@redhat.com>
-Date: Mon, 29 Feb 2016 14:24:03 +0000
-Subject: [PATCH] create a function to validate surface parameters
-
-Make possible to reuse it outside red-parse-qxl.c
-
-Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
----
- server/red_parse_qxl.c | 50 ++++++++++++++++++++++++++++++++------------------
- server/red_parse_qxl.h |  5 +++++
- 2 files changed, 37 insertions(+), 18 deletions(-)
-
-diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
-index bd0c408..7dc6a4d 100644
---- a/server/red_parse_qxl.c
-+++ b/server/red_parse_qxl.c
-@@ -19,7 +19,6 @@
- #include <config.h>
- #endif
- 
--#include <stdbool.h>
- #include <inttypes.h>
- #include <glib.h>
- #include "common/lz_common.h"
-@@ -1306,13 +1305,41 @@ static unsigned int surface_format_to_bpp(uint32_t format)
-     return 0;
- }
- 
-+bool red_validate_surface(uint32_t width, uint32_t height,
-+                          int32_t stride, uint32_t format)
-+{
-+    unsigned int bpp;
-+    uint64_t size;
-+
-+    bpp = surface_format_to_bpp(format);
-+
-+    /* check if format is valid */
-+    if (!bpp) {
-+        return false;
-+    }
-+
-+    /* check stride is larger than required bytes */
-+    size = ((uint64_t) width * bpp + 7u) / 8u;
-+    /* the uint32_t conversion is here to avoid problems with -2^31 value */
-+    if (stride == G_MININT32 || size > (uint32_t) abs(stride)) {
-+        return false;
-+    }
-+
-+    /* the multiplication can overflow, also abs(-2^31) may return a negative value */
-+    size = (uint64_t) height * abs(stride);
-+    if (size > MAX_DATA_CHUNK) {
-+        return false;
-+    }
-+
-+    return true;
-+}
-+
- int red_get_surface_cmd(RedMemSlotInfo *slots, int group_id,
-                         RedSurfaceCmd *red, QXLPHYSICAL addr)
- {
-     QXLSurfaceCmd *qxl;
-     uint64_t size;
-     int error;
--    unsigned int bpp;
- 
-     qxl = (QXLSurfaceCmd *)get_virt(slots, addr, sizeof(*qxl), group_id,
-                                     &error);
-@@ -1331,26 +1358,13 @@ int red_get_surface_cmd(RedMemSlotInfo *slots, int group_id,
-         red->u.surface_create.width  = qxl->u.surface_create.width;
-         red->u.surface_create.height = qxl->u.surface_create.height;
-         red->u.surface_create.stride = qxl->u.surface_create.stride;
--        bpp = surface_format_to_bpp(red->u.surface_create.format);
- 
--        /* check if format is valid */
--        if (!bpp) {
-+        if (!red_validate_surface(red->u.surface_create.width, red->u.surface_create.height,
-+                                  red->u.surface_create.stride, red->u.surface_create.format)) {
-             return 1;
-         }
- 
--        /* check stride is larger than required bytes */
--        size = ((uint64_t) red->u.surface_create.width * bpp + 7u) / 8u;
--        /* the uint32_t conversion is here to avoid problems with -2^31 value */
--        if (red->u.surface_create.stride == G_MININT32
--            || size > (uint32_t) abs(red->u.surface_create.stride)) {
--            return 1;
--        }
--
--        /* the multiplication can overflow, also abs(-2^31) may return a negative value */
--        size = (uint64_t) red->u.surface_create.height * abs(red->u.surface_create.stride);
--        if (size > MAX_DATA_CHUNK) {
--            return 1;
--        }
-+        size = red->u.surface_create.height * abs(red->u.surface_create.stride);
-         red->u.surface_create.data =
-             (uint8_t*)get_virt(slots, qxl->u.surface_create.data, size, group_id, &error);
-         if (error) {
-diff --git a/server/red_parse_qxl.h b/server/red_parse_qxl.h
-index 3adc9fa..e18d8d0 100644
---- a/server/red_parse_qxl.h
-+++ b/server/red_parse_qxl.h
-@@ -19,6 +19,8 @@
- #ifndef RED_ABI_TRANSLATE_H
- #define RED_ABI_TRANSLATE_H
- 
-+#include <stdbool.h>
-+
- #include <spice/qxl_dev.h>
- #include "red_common.h"
- #include "red_memslots.h"
-@@ -128,6 +130,9 @@ int red_get_message(RedMemSlotInfo *slots, int group_id,
-                     RedMessage *red, QXLPHYSICAL addr);
- void red_put_message(RedMessage *red);
- 
-+bool red_validate_surface(uint32_t width, uint32_t height,
-+                          int32_t stride, uint32_t format);
-+
- int red_get_surface_cmd(RedMemSlotInfo *slots, int group_id,
-                         RedSurfaceCmd *red, QXLPHYSICAL addr);
- void red_put_surface_cmd(RedSurfaceCmd *red);

diff --git a/app-emulation/spice/files/0.12.6-CVE-2016-2150-p2.patch b/app-emulation/spice/files/0.12.6-CVE-2016-2150-p2.patch
deleted file mode 100644
index 8005e063f0d..00000000000
--- a/app-emulation/spice/files/0.12.6-CVE-2016-2150-p2.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Frediano Ziglio <fziglio@redhat.com>
-Date: Mon, 29 Feb 2016 14:34:49 +0000
-Subject: [PATCH] improve primary surface parameter checks
-
-Primary surface, as additional surfaces, can be used to access
-host memory from the guest using invalid parameters.
-
-Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
----
- server/red_worker.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/server/red_worker.c b/server/red_worker.c
-index a7eaab9..f9179a6 100644
---- a/server/red_worker.c
-+++ b/server/red_worker.c
-@@ -11380,6 +11380,15 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id,
-     spice_warn_if(((uint64_t)abs(surface.stride) * (uint64_t)surface.height) !=
-              abs(surface.stride) * surface.height);
- 
-+     /* surface can arrive from guest unchecked so make sure
-+      * guest is not a malicious one and drop invalid requests
-+      */
-+     if (!red_validate_surface(surface.width, surface.height,
-+                               surface.stride, surface.format)) {
-+         spice_warning("wrong primary surface creation request");
-+         return;
-+     }
-+
-     line_0 = (uint8_t*)get_virt(&worker->mem_slots, surface.mem,
-                                 surface.height * abs(surface.stride),
-                                 surface.group_id, &error);

diff --git a/app-emulation/spice/spice-0.12.7-r1.ebuild b/app-emulation/spice/spice-0.12.7-r1.ebuild
deleted file mode 100644
index 9c66f4f6282..00000000000
--- a/app-emulation/spice/spice-0.12.7-r1.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_4 )
-
-inherit eutils python-any-r1
-
-DESCRIPTION="SPICE server"
-HOMEPAGE="http://spice-space.org/"
-SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="libressl sasl smartcard static-libs"
-
-# the libspice-server only uses the headers of libcacard
-RDEPEND="
-	>=dev-libs/glib-2.22:2[static-libs(+)?]
-	>=media-libs/celt-0.5.1.1:0.5.1[static-libs(+)?]
-	media-libs/opus[static-libs(+)?]
-	sys-libs/zlib[static-libs(+)?]
-	virtual/jpeg:0=[static-libs(+)?]
-	>=x11-libs/pixman-0.17.7[static-libs(+)?]
-	!libressl? ( dev-libs/openssl:0[static-libs(+)?] )
-	libressl? ( dev-libs/libressl[static-libs(+)?] )
-	sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )"
-
-DEPEND="
-	~app-emulation/spice-protocol-0.12.11
-	virtual/pkgconfig
-	$(python_gen_any_dep '
-		>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
-		dev-python/six[${PYTHON_USEDEP}]
-	')
-	smartcard? ( app-emulation/qemu[smartcard] )
-	${RDEPEND}"
-
-python_check_deps() {
-	has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
-	has_version "dev-python/six[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
-}
-
-# maintainer notes:
-# * opengl support is currently broken
-
-src_prepare() {
-	epatch \
-		"${FILESDIR}"/0.11.0-gold.patch \
-		"${FILESDIR}"/0.12.6-CVE-2016-0749-p1.patch \
-		"${FILESDIR}"/0.12.6-CVE-2016-0749-p2.patch \
-		"${FILESDIR}"/0.12.6-CVE-2016-2150-p1.patch \
-		"${FILESDIR}"/0.12.6-CVE-2016-2150-p2.patch
-
-	epatch_user
-}
-
-src_configure() {
-	# Prevent sandbox violations, bug #586560
-	# https://bugzilla.gnome.org/show_bug.cgi?id=744134
-	# https://bugzilla.gnome.org/show_bug.cgi?id=744135
-	addpredict /dev
-
-	econf \
-		$(use_enable static-libs static) \
-		$(use_with sasl) \
-		$(use_enable smartcard) \
-		--disable-gui
-}
-
-src_compile() {
-	# Prevent sandbox violations, bug #586560
-	# https://bugzilla.gnome.org/show_bug.cgi?id=744134
-	# https://bugzilla.gnome.org/show_bug.cgi?id=744135
-	addpredict /dev
-
-	default
-}
-
-src_install() {
-	default
-	use static-libs || prune_libtool_files
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/spice/files/, app-emulation/spice/
@ 2017-07-12  3:24 Matthias Maier
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Maier @ 2017-07-12  3:24 UTC (permalink / raw
  To: gentoo-commits

commit:     6358afe4bc71986be333712044569acb853e110a
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 12 03:15:39 2017 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Wed Jul 12 03:24:40 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6358afe4

app-emulation/spice: Apply patches for CVE-2017-7506

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 ...buffer-overflows-handling-monitor-configu.patch |  47 ++++++++++
 ...integer-overflows-handling-monitor-config.patch |  30 ++++++
 ...nect-when-receiving-overly-big-ClientMoni.patch |  75 +++++++++++++++
 app-emulation/spice/spice-0.13.3-r2.ebuild         | 104 +++++++++++++++++++++
 4 files changed, 256 insertions(+)

diff --git a/app-emulation/spice/files/spice-0.13.3-reds-Avoid-buffer-overflows-handling-monitor-configu.patch b/app-emulation/spice/files/spice-0.13.3-reds-Avoid-buffer-overflows-handling-monitor-configu.patch
new file mode 100644
index 00000000000..8792395977e
--- /dev/null
+++ b/app-emulation/spice/files/spice-0.13.3-reds-Avoid-buffer-overflows-handling-monitor-configu.patch
@@ -0,0 +1,47 @@
+Matthias Maier <tamiko@gentoo.org>
+
+ - Ported to 0.13.3
+
+
+From fbbcdad773e2791cfb988f4748faa41943551ca6 Mon Sep 17 00:00:00 2001
+From: Frediano Ziglio <fziglio@redhat.com>
+Date: Mon, 15 May 2017 15:57:28 +0100
+Subject: [PATCH 3/3] reds: Avoid buffer overflows handling monitor
+ configuration
+
+It was also possible for a malicious client to set
+VDAgentMonitorsConfig::num_of_monitors to a number larger
+than the actual size of VDAgentMOnitorsConfig::monitors.
+This would lead to buffer overflows, which could allow the guest to
+read part of the host memory. This might cause write overflows in the
+host as well, but controlling the content of such buffers seems
+complicated.
+
+Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
+---
+
+diff --git a/server/reds.c b/server/reds.c
+index ec89105..fd1457f 100644
+--- a/server/reds.c
++++ b/server/reds.c
+@@ -1084,6 +1084,7 @@ static void reds_on_main_agent_monitors_config(RedsState *reds,
+     VDAgentMessage *msg_header;
+     VDAgentMonitorsConfig *monitors_config;
+     RedsClientMonitorsConfig *cmc = &reds->client_monitors_config;
++    uint32_t max_monitors;
+ 
+     // limit size of message sent by the client as this can cause a DoS through
+     // memory exhaustion, or potentially some integer overflows
+@@ -1113,6 +1114,12 @@ static void reds_on_main_agent_monitors_config(RedsState *reds,
+         goto overflow;
+     }
+     monitors_config = (VDAgentMonitorsConfig *)(cmc->buffer + sizeof(*msg_header));
++    // limit the monitor number to avoid buffer overflows
++    max_monitors = (msg_header->size - sizeof(VDAgentMonitorsConfig)) /
++                   sizeof(VDAgentMonConfig);
++    if (monitors_config->num_of_monitors > max_monitors) {
++        goto overflow;
++    }
+     spice_debug("%s: %d", __func__, monitors_config->num_of_monitors);
+     reds_client_monitors_config(reds, monitors_config);
+     reds_client_monitors_config_cleanup(reds);

diff --git a/app-emulation/spice/files/spice-0.13.3-reds-Avoid-integer-overflows-handling-monitor-config.patch b/app-emulation/spice/files/spice-0.13.3-reds-Avoid-integer-overflows-handling-monitor-config.patch
new file mode 100644
index 00000000000..f05e55c7354
--- /dev/null
+++ b/app-emulation/spice/files/spice-0.13.3-reds-Avoid-integer-overflows-handling-monitor-config.patch
@@ -0,0 +1,30 @@
+From 571cec91e71c2aae0d5f439ea2d8439d0c3d75eb Mon Sep 17 00:00:00 2001
+From: Frediano Ziglio <fziglio@redhat.com>
+Date: Mon, 15 May 2017 15:57:28 +0100
+Subject: [PATCH 2/3] reds: Avoid integer overflows handling monitor
+ configuration
+
+Avoid VDAgentMessage::size integer overflows.
+
+Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
+---
+ server/reds.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/server/reds.c b/server/reds.c
+index ec2b6f47..656f518f 100644
+--- a/server/reds.c
++++ b/server/reds.c
+@@ -1131,6 +1131,9 @@ static void reds_on_main_agent_monitors_config(RedsState *reds,
+         spice_debug("not enough data yet. %zd", cmc->offset);
+         return;
+     }
++    if (msg_header->size < sizeof(VDAgentMonitorsConfig)) {
++        goto overflow;
++    }
+     monitors_config = (VDAgentMonitorsConfig *)(cmc->buffer + sizeof(*msg_header));
+     spice_debug("monitors_config->num_of_monitors: %d", monitors_config->num_of_monitors);
+     reds_client_monitors_config(reds, monitors_config);
+-- 
+2.13.0
+

diff --git a/app-emulation/spice/files/spice-0.13.3-reds-Disconnect-when-receiving-overly-big-ClientMoni.patch b/app-emulation/spice/files/spice-0.13.3-reds-Disconnect-when-receiving-overly-big-ClientMoni.patch
new file mode 100644
index 00000000000..2cd186482ad
--- /dev/null
+++ b/app-emulation/spice/files/spice-0.13.3-reds-Disconnect-when-receiving-overly-big-ClientMoni.patch
@@ -0,0 +1,75 @@
+Matthias Maier <tamiko@gentoo.org>
+
+ - Ported to 0.13.3
+
+
+From 111ab38611cef5012f1565a65fa2d8a8a05cce37 Mon Sep 17 00:00:00 2001
+From: Frediano Ziglio <fziglio@redhat.com>
+Date: Mon, 15 May 2017 15:57:28 +0100
+Subject: [PATCH 1/3] reds: Disconnect when receiving overly big
+ ClientMonitorsConfig
+
+Total message size received from the client was unlimited. There is
+a 2kiB size check on individual agent messages, but the MonitorsConfig
+message can be split in multiple chunks, and the size of the
+non-chunked MonitorsConfig message was never checked. This could easily
+lead to memory exhaustion on the host.
+
+Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
+---
+
+diff --git a/server/reds.c b/server/reds.c
+index 92feea1..286993b 100644
+--- a/server/reds.c
++++ b/server/reds.c
+@@ -1077,19 +1077,35 @@ static void reds_client_monitors_config_cleanup(RedsState *reds)
+ static void reds_on_main_agent_monitors_config(RedsState *reds,
+         MainChannelClient *mcc, void *message, size_t size)
+ {
++    const unsigned int MAX_MONITORS = 256;
++    const unsigned int MAX_MONITOR_CONFIG_SIZE =
++       sizeof(VDAgentMonitorsConfig) + MAX_MONITORS * sizeof(VDAgentMonConfig);
++
+     VDAgentMessage *msg_header;
+     VDAgentMonitorsConfig *monitors_config;
+     RedsClientMonitorsConfig *cmc = &reds->client_monitors_config;
+ 
++    // limit size of message sent by the client as this can cause a DoS through
++    // memory exhaustion, or potentially some integer overflows
++    if (sizeof(VDAgentMessage) + MAX_MONITOR_CONFIG_SIZE - cmc->buffer_size < size) {
++        goto overflow;
++    }
++
+     cmc->buffer_size += size;
+     cmc->buffer = realloc(cmc->buffer, cmc->buffer_size);
+     spice_assert(cmc->buffer);
+     cmc->mcc = mcc;
+     memcpy(cmc->buffer + cmc->buffer_pos, message, size);
+     cmc->buffer_pos += size;
++    if (sizeof(VDAgentMessage) > cmc->buffer_size) {
++        spice_debug("not enough data yet. %d", cmc->buffer_size);
++        return;
++    }
+     msg_header = (VDAgentMessage *)cmc->buffer;
+-    if (sizeof(VDAgentMessage) > cmc->buffer_size ||
+-            msg_header->size > cmc->buffer_size - sizeof(VDAgentMessage)) {
++    if (msg_header->size > MAX_MONITOR_CONFIG_SIZE) {
++        goto overflow;
++    }
++    if (msg_header->size > cmc->buffer_size - sizeof(VDAgentMessage)) {
+         spice_debug("not enough data yet. %d", cmc->buffer_size);
+         return;
+     }
+@@ -1097,6 +1113,12 @@ static void reds_on_main_agent_monitors_config(RedsState *reds,
+     spice_debug("%s: %d", __func__, monitors_config->num_of_monitors);
+     reds_client_monitors_config(reds, monitors_config);
+     reds_client_monitors_config_cleanup(reds);
++    return;
++
++overflow:
++    spice_warning("received invalid MonitorsConfig request from client, disconnecting");
++    red_channel_client_disconnect(RED_CHANNEL_CLIENT(mcc));
++    reds_client_monitors_config_cleanup(reds);
+ }
+ 
+ void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, void *message, size_t size)

diff --git a/app-emulation/spice/spice-0.13.3-r2.ebuild b/app-emulation/spice/spice-0.13.3-r2.ebuild
new file mode 100644
index 00000000000..ea5dc49692f
--- /dev/null
+++ b/app-emulation/spice/spice-0.13.3-r2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit autotools ltprune python-any-r1 readme.gentoo-r1 xdg-utils
+
+DESCRIPTION="SPICE server"
+HOMEPAGE="http://spice-space.org/"
+SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="libressl lz4 sasl smartcard static-libs gstreamer"
+
+# the libspice-server only uses the headers of libcacard
+RDEPEND="
+	>=dev-libs/glib-2.22:2[static-libs(+)?]
+	>=media-libs/celt-0.5.1.1:0.5.1[static-libs(+)?]
+	media-libs/opus[static-libs(+)?]
+	sys-libs/zlib[static-libs(+)?]
+	virtual/jpeg:0=[static-libs(+)?]
+	>=x11-libs/pixman-0.17.7[static-libs(+)?]
+	!libressl? ( dev-libs/openssl:0=[static-libs(+)?] )
+	libressl? ( dev-libs/libressl:0=[static-libs(+)?] )
+	lz4? ( app-arch/lz4:0=[static-libs(+)?] )
+	smartcard? ( >=app-emulation/libcacard-0.1.2 )
+	sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )
+	gstreamer? (
+		media-libs/gstreamer:1.0
+		media-libs/gst-plugins-base:1.0
+	)"
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	>=app-emulation/spice-protocol-0.12.12
+	virtual/pkgconfig
+	$(python_gen_any_dep '
+		>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
+		dev-python/six[${PYTHON_USEDEP}]
+	')
+	smartcard? ( app-emulation/qemu[smartcard] )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.13.3-skip_faulty_lz4_check.patch
+	"${FILESDIR}"/${PN}-0.13.3-reds-Disconnect-when-receiving-overly-big-ClientMoni.patch
+	"${FILESDIR}"/${PN}-0.13.3-reds-Avoid-integer-overflows-handling-monitor-config.patch
+	"${FILESDIR}"/${PN}-0.13.3-reds-Avoid-buffer-overflows-handling-monitor-configu.patch
+)
+
+python_check_deps() {
+	has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
+	has_version "dev-python/six[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	eautoreconf
+}
+
+src_configure() {
+	# Prevent sandbox violations, bug #586560
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744134
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744135
+	addpredict /dev
+
+	xdg_environment_reset
+
+	local myconf="
+		$(use_enable static-libs static)
+		$(use_enable lz4)
+		$(use_with sasl)
+		$(use_enable smartcard)
+		--enable-gstreamer=$(usex gstreamer "1.0" "no")
+		--enable-celt051
+		--disable-gui
+		"
+	econf ${myconf}
+}
+
+src_compile() {
+	# Prevent sandbox violations, bug #586560
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744134
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744135
+	addpredict /dev
+
+	default
+}
+
+src_install() {
+	default
+	use static-libs || prune_libtool_files
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/spice/files/, app-emulation/spice/
@ 2018-02-12  1:48 Matthias Maier
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Maier @ 2018-02-12  1:48 UTC (permalink / raw
  To: gentoo-commits

commit:     8ca3368317e4ce0fc7f559b041cc3adef96911d2
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 12 01:41:19 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon Feb 12 01:48:29 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ca33683

app-emulation/spice: version bump to 0.14.0

 - Update dependency on spice-protocol

 - Remove celt dependencu and only use opus...

 - Remove --disable-gui (spice does not have a GUI any more)

 - fix libressl support (Thanks to Michelangelo Scopelliti)

 - fix openssl1.1 support (Thanks to Mark Wright)

 - cannot reproduce static assert bug #634484 with gcc 7.3.0

Bug:    https://bugs.gentoo.org/634484
Closes: https://bugs.gentoo.org/630142
Closes: https://bugs.gentoo.org/630594
Closes: https://bugs.gentoo.org/630942
Closes: https://bugs.gentoo.org/634696
Closes: https://bugs.gentoo.org/635864
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-emulation/spice/Manifest                       |   1 +
 .../spice/files/spice-0.14.0-libressl_fix.patch    |  13 +++
 .../spice/files/spice-0.14.0-openssl1.1_fix.patch  |  26 ++++++
 app-emulation/spice/spice-0.14.0.ebuild            | 100 +++++++++++++++++++++
 4 files changed, 140 insertions(+)

diff --git a/app-emulation/spice/Manifest b/app-emulation/spice/Manifest
index 0062f85f984..5dd45f8f0fc 100644
--- a/app-emulation/spice/Manifest
+++ b/app-emulation/spice/Manifest
@@ -1,2 +1,3 @@
 DIST spice-0.13.3.tar.bz2 1322505 BLAKE2B 56f9cd34bb48fdcf750230242b27567db713ef749649d4b780a82d0d4ec5d326b19540c9bb4f36c164d40a692eb0368c39e05ee8dba319dd8461a0315e5a9a17 SHA512 63496fbd3df0fd453052cef8e1fb00a3a28f0105610676fdc4a58043cbc6da571ae4407701af2b817e410d05ce727d60d5ee0c93c8897231e25229897c51d95a
 DIST spice-0.13.90.tar.bz2 1364173 BLAKE2B 1bc0e71d8c5a21f9961ac6c0567bde19d31983bd5b0f5d4df30cc5634080d288f277689d875334d94c6a276284313bc82f15eaf0ce20916c6c912c2dcc4bdfc0 SHA512 a5a6ab328a2d3cb405ead6eef40a1b896432f35accf1f8b015fc9deadcc4e5eb5f6d8d575a94fa3b2505e206986887badecf721ab015efd88dad174d7340c01c
+DIST spice-0.14.0.tar.bz2 1330195 BLAKE2B 08f93e8ddeb79adb4feac0557a854cc41fd096a9dfefc0baaca176803c2a03ef9286c4f61a135d62ad22e3ac3f4bb31ffd1614c8ddeaec7ae8c01eca34da1750 SHA512 84532146aa628ca6ca459a82afb89d6391892e063668fd4a68023c92cee7ca868b6c82e31dd9886819b76ea745ebdae0d0030e1f608d8f58f51c00f0b09bae1f

diff --git a/app-emulation/spice/files/spice-0.14.0-libressl_fix.patch b/app-emulation/spice/files/spice-0.14.0-libressl_fix.patch
new file mode 100644
index 00000000000..2f77fa5a000
--- /dev/null
+++ b/app-emulation/spice/files/spice-0.14.0-libressl_fix.patch
@@ -0,0 +1,13 @@
+diff --git a/spice-common/common/ssl_verify.c b/spice-common/common/ssl_verify.c
+index a9ed650..27aa5d3 100644
+--- a/spice-common/common/ssl_verify.c
++++ b/spice-common/common/ssl_verify.c
+@@ -33,7 +33,7 @@
+ #include <string.h>
+ #include <gio/gio.h>
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined (LIBRESSL_VERSION_NUMBER)
+ static const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1)
+ {
+     return M_ASN1_STRING_data(asn1);

diff --git a/app-emulation/spice/files/spice-0.14.0-openssl1.1_fix.patch b/app-emulation/spice/files/spice-0.14.0-openssl1.1_fix.patch
new file mode 100644
index 00000000000..ea4e606b3db
--- /dev/null
+++ b/app-emulation/spice/files/spice-0.14.0-openssl1.1_fix.patch
@@ -0,0 +1,26 @@
+--- spice-0.13.90-orig/server/reds.c	2017-07-27 01:04:10.000000000 +1000
++++ spice-0.13.90/server/reds.c	2017-10-18 21:42:12.054934199 +1100
+@@ -34,6 +34,8 @@
+ #include <ctype.h>
+ 
+ #include <openssl/err.h>
++#include <openssl/bn.h>
++#include <openssl/rsa.h>
+ 
+ #if HAVE_SASL
+ #include <sasl/sasl.h>
+@@ -2795,9 +2797,12 @@
+ 
+ static gpointer openssl_global_init(gpointer arg)
+ {
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++    OPENSSL_init_ssl(0, NULL);
++#else
+     SSL_library_init();
+     SSL_load_error_strings();
+-
++#endif
+     openssl_thread_setup();
+ 
+     return NULL;
+

diff --git a/app-emulation/spice/spice-0.14.0.ebuild b/app-emulation/spice/spice-0.14.0.ebuild
new file mode 100644
index 00000000000..11420b4ea1b
--- /dev/null
+++ b/app-emulation/spice/spice-0.14.0.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit autotools ltprune python-any-r1 readme.gentoo-r1 xdg-utils
+
+DESCRIPTION="SPICE server"
+HOMEPAGE="https://www.spice-space.org/"
+SRC_URI="https://www.spice-space.org/download/releases/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="libressl lz4 sasl smartcard static-libs gstreamer"
+
+# the libspice-server only uses the headers of libcacard
+RDEPEND="
+	>=dev-libs/glib-2.22:2[static-libs(+)?]
+	media-libs/opus[static-libs(+)?]
+	sys-libs/zlib[static-libs(+)?]
+	virtual/jpeg:0=[static-libs(+)?]
+	>=x11-libs/pixman-0.17.7[static-libs(+)?]
+	!libressl? ( dev-libs/openssl:0=[static-libs(+)?] )
+	libressl? ( dev-libs/libressl:0=[static-libs(+)?] )
+	lz4? ( app-arch/lz4:0=[static-libs(+)?] )
+	smartcard? ( >=app-emulation/libcacard-0.1.2 )
+	sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )
+	gstreamer? (
+		media-libs/gstreamer:1.0
+		media-libs/gst-plugins-base:1.0
+	)"
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	>=app-emulation/spice-protocol-0.12.13
+	virtual/pkgconfig
+	$(python_gen_any_dep '
+		>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
+		dev-python/six[${PYTHON_USEDEP}]
+	')
+	smartcard? ( app-emulation/qemu[smartcard] )"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-libressl_fix.patch
+	"${FILESDIR}"/${P}-openssl1.1_fix.patch
+)
+
+python_check_deps() {
+	has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
+	has_version "dev-python/six[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	eautoreconf
+}
+
+src_configure() {
+	# Prevent sandbox violations, bug #586560
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744134
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744135
+	addpredict /dev
+
+	xdg_environment_reset
+
+	local myconf="
+		$(use_enable static-libs static)
+		$(use_enable lz4)
+		$(use_with sasl)
+		$(use_enable smartcard)
+		--enable-gstreamer=$(usex gstreamer "1.0" "no")
+		--disable-celt051
+		"
+	econf ${myconf}
+}
+
+src_compile() {
+	# Prevent sandbox violations, bug #586560
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744134
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744135
+	addpredict /dev
+
+	default
+}
+
+src_install() {
+	default
+	use static-libs || prune_libtool_files
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/spice/files/, app-emulation/spice/
@ 2018-08-17  0:07 Matthias Maier
  0 siblings, 0 replies; 7+ messages in thread
From: Matthias Maier @ 2018-08-17  0:07 UTC (permalink / raw
  To: gentoo-commits

commit:     dfd415b17224737493b36a801d929b382061d82d
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 16 21:59:36 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Aug 17 00:07:48 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfd415b1

app-emulation/spice: patch integer overflow, bug #663330

Bug: https://bugs.gentoo.org/663330
Package-Manager: Portage-2.3.46, Repoman-2.3.10

 ...0.14.0-fix-flexible-array-buffer-overflow.patch |  12 +++
 app-emulation/spice/spice-0.14.0-r2.ebuild         | 102 +++++++++++++++++++++
 2 files changed, 114 insertions(+)

diff --git a/app-emulation/spice/files/spice-0.14.0-fix-flexible-array-buffer-overflow.patch b/app-emulation/spice/files/spice-0.14.0-fix-flexible-array-buffer-overflow.patch
new file mode 100644
index 00000000000..a05bbb7545a
--- /dev/null
+++ b/app-emulation/spice/files/spice-0.14.0-fix-flexible-array-buffer-overflow.patch
@@ -0,0 +1,12 @@
+diff --git a/spice-common/python_modules/demarshal.py b/spice-common/python_modules/demarshal.py
+index 1ea131d..7172762 100644
+--- a/spice-common/python_modules/demarshal.py
++++ b/spice-common/python_modules/demarshal.py
+@@ -318,6 +318,7 @@ def write_validate_array_item(writer, container, item, scope, parent_scope, star
+         writer.assign(nelements, array.size)
+     elif array.is_remaining_length():
+         if element_type.is_fixed_nw_size():
++            writer.error_check("%s > message_end" % item.get_position())
+             if element_type.get_fixed_nw_size() == 1:
+                 writer.assign(nelements, "message_end - %s" % item.get_position())
+             else:

diff --git a/app-emulation/spice/spice-0.14.0-r2.ebuild b/app-emulation/spice/spice-0.14.0-r2.ebuild
new file mode 100644
index 00000000000..823669338c7
--- /dev/null
+++ b/app-emulation/spice/spice-0.14.0-r2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit autotools ltprune python-any-r1 readme.gentoo-r1 xdg-utils
+
+DESCRIPTION="SPICE server"
+HOMEPAGE="https://www.spice-space.org/"
+SRC_URI="https://www.spice-space.org/download/releases/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="libressl lz4 sasl smartcard static-libs gstreamer"
+
+# the libspice-server only uses the headers of libcacard
+RDEPEND="
+	dev-lang/orc[static-libs(+)?]
+	>=dev-libs/glib-2.22:2[static-libs(+)?]
+	media-libs/opus[static-libs(+)?]
+	sys-libs/zlib[static-libs(+)?]
+	virtual/jpeg:0=[static-libs(+)?]
+	>=x11-libs/pixman-0.17.7[static-libs(+)?]
+	!libressl? ( dev-libs/openssl:0=[static-libs(+)?] )
+	libressl? ( dev-libs/libressl:0=[static-libs(+)?] )
+	lz4? ( app-arch/lz4:0=[static-libs(+)?] )
+	smartcard? ( >=app-emulation/libcacard-0.1.2 )
+	sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )
+	gstreamer? (
+		media-libs/gstreamer:1.0
+		media-libs/gst-plugins-base:1.0
+	)"
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	>=app-emulation/spice-protocol-0.12.13
+	virtual/pkgconfig
+	$(python_gen_any_dep '
+		>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
+		dev-python/six[${PYTHON_USEDEP}]
+	')
+	smartcard? ( app-emulation/qemu[smartcard] )"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-libressl_fix.patch
+	"${FILESDIR}"/${P}-openssl1.1_fix.patch
+	"${FILESDIR}"/${P}-fix-flexible-array-buffer-overflow.patch
+)
+
+python_check_deps() {
+	has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
+	has_version "dev-python/six[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	eautoreconf
+}
+
+src_configure() {
+	# Prevent sandbox violations, bug #586560
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744134
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744135
+	addpredict /dev
+
+	xdg_environment_reset
+
+	local myconf="
+		$(use_enable static-libs static)
+		$(use_enable lz4)
+		$(use_with sasl)
+		$(use_enable smartcard)
+		--enable-gstreamer=$(usex gstreamer "1.0" "no")
+		--disable-celt051
+		"
+	econf ${myconf}
+}
+
+src_compile() {
+	# Prevent sandbox violations, bug #586560
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744134
+	# https://bugzilla.gnome.org/show_bug.cgi?id=744135
+	addpredict /dev
+
+	default
+}
+
+src_install() {
+	default
+	use static-libs || prune_libtool_files
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-17  0:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 19:26 [gentoo-commits] repo/gentoo:master commit in: app-emulation/spice/files/, app-emulation/spice/ Matthias Maier
  -- strict thread matches above, loose matches on Subject: below --
2016-08-17  6:37 Yixun Lan
2017-05-11  5:07 Matthias Maier
2017-05-11 14:24 Matthias Maier
2017-07-12  3:24 Matthias Maier
2018-02-12  1:48 Matthias Maier
2018-08-17  0:07 Matthias Maier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox