git.iko.soy/typeable/nixpkgs
on master help sign in
spice: 0.12.8 -> 0.13.3

(we can use upstream security patches again)

commit632e81083caf8821c1c37e8476dac94910237d69 authorJörg Thalheim <joerg@thalheim.io> dateThu 23 Mar 2017, 10:22 (10 years ago) parenta49df2a
2 files changed+8−61
pkgs/development/libraries/spice/0001-Adapting-the-following-patch-from-http-pkgs.fedorapr.patch−56 pkgs/development/libraries/spice/default.nix+8−5
pkgs/development/libraries/spice/0001-Adapting-the-following-patch-from-http-pkgs.fedorapr.patchdeleted−56
@@ -1,56 +0,0 @@
1−From 75e8685740199537bfefcbd9996ec3ff9f6342e6 Mon Sep 17 00:00:00 2001
2−From: Graham Christensen <graham@grahamc.com>
3−Date: Wed, 8 Feb 2017 21:58:43 -0500
4−Subject: [PATCH] Adapting the following patch, from
5− http://pkgs.fedoraproject.org/cgit/rpms/spice.git/plain/0003-main-channel-Prevent-overflow-reading-messages-from-.patch?id=d919d639ae5f83a9735a04d843eed675f9357c0d
6−
7−> From: Frediano Ziglio <fziglio@redhat.com>
8−> Date: Tue, 29 Nov 2016 16:46:56 +0000
9−> Subject: [spice-server 3/3] main-channel: Prevent overflow reading messages
10−> from client
11−>
12−> Caller is supposed the function return a buffer able to store
13−> size bytes.
14−>
15−> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
16−> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
17−> ---
18−> server/main-channel.c | 3 +++
19−> 1 file changed, 3 insertions(+)
20−>
21−> diff --git a/server/main-channel.c b/server/main-channel.c
22−> index 24dd448..1124506 100644
23−> --- a/server/main-channel.c
24−> +++ b/server/main-channel.c
25−> @@ -258,6 +258,9 @@ static uint8_t *main_channel_alloc_msg_rcv_buf(RedChannelClient *rcc,
26−>
27−> if (type == SPICE_MSGC_MAIN_AGENT_DATA) {
28−> return reds_get_agent_data_buffer(red_channel_get_server(channel), mcc, size);
29−> + } else if (size > sizeof(main_chan->recv_buf)) {
30−> + /* message too large, caller will log a message and close the connection */
31−> + return NULL;
32−> } else {
33−> return main_chan->recv_buf;
34−> }
35−> --
36−> 2.9.3
37−> ---
38− server/main_channel.c | 3 +++
39− 1 file changed, 3 insertions(+)
40−
41−diff --git a/server/main_channel.c b/server/main_channel.c
42−index 0ecc9df..1fc3915 100644
43−--- a/server/main_channel.c
44−+++ b/server/main_channel.c
45−@@ -1026,6 +1026,9 @@ static uint8_t *main_channel_alloc_msg_rcv_buf(RedChannelClient *rcc,
46−
47− if (type == SPICE_MSGC_MAIN_AGENT_DATA) {
48− return reds_get_agent_data_buffer(mcc, size);
49−+ } else if (size > sizeof(main_chan->recv_buf)) {
50−+ /* message too large, caller will log a message and close the connection */
51−+ return NULL;
52− } else {
53− return main_chan->recv_buf;
54− }
55−--
56−2.10.0
pkgs/development/libraries/spice/default.nix+8−5
@@ -6,14 +6,15 @@
66with stdenv.lib;
77
88stdenv.mkDerivation rec {
9− name = "spice-0.12.8";
9+ name = "spice-0.13.3";
1010
1111 src = fetchurl {
1212 url = "http://www.spice-space.org/download/releases/${name}.tar.bz2";
13− sha256 = "0za03i77j8i3g5l2np2j7vy8cqsdbkm9wbv4hjnaqq9xhz2sa0gr";
13+ sha256 = "17mqgwamdhj8sx8vhahrjl5937x693kjnw6cp6v0akjrwz011xrh";
1414 };
1515
1616 patches = [
17+ # the following three patches fix CVE-2016-9577 and CVE-2016-9578
1718 (fetchpatch {
1819 name = "0001-Prevent-possible-DoS-attempts-during-protocol-handsh.patch";
1920 url = "http://pkgs.fedoraproject.org/cgit/rpms/spice.git/plain/0001-Prevent-possible-DoS-attempts-during-protocol-handsh.patch?id=d919d639ae5f83a9735a04d843eed675f9357c0d";
@@ -24,9 +25,11 @@ stdenv.mkDerivation rec {
2425 url = "http://pkgs.fedoraproject.org/cgit/rpms/spice.git/plain/0002-Prevent-integer-overflows-in-capability-checks.patch?id=d919d639ae5f83a9735a04d843eed675f9357c0d";
2526 sha256 = "1r1bhq98w93cvvrlrz6jwdfsy261xl3xqs0ppchaa2igyxvxv5z5";
2627 })
27− # Originally from http://pkgs.fedoraproject.org/cgit/rpms/spice.git/plain/0003-main-channel-Prevent-overflow-reading-messages-from-.patch?id=d919d639ae5f83a9735a04d843eed675f9357c0d
28− # but main-channel.c was renamed to main_channel.c
29− ./0001-Adapting-the-following-patch-from-http-pkgs.fedorapr.patch
28+ (fetchpatch {
29+ name = "0003-main-channel-Prevent-overflow-reading-messages-from.patch";
30+ url = "https://cgit.freedesktop.org/spice/spice/patch/?id=1d3e26c0ee75712fa4bbbcfa09d8d5866b66c8af";
31+ sha256 = "030mm551aipck99rqiz39vsvk071pn8715zynr5j6chwzgpflwm3";
32+ })
3033 ];
3134
3235 buildInputs = [ pixman celt alsaLib openssl libjpeg zlib