Merge ~ahasenack/ubuntu/+source/zeromq3:eoan-zeromq3-merge into ubuntu/+source/zeromq3:ubuntu/devel

Proposed by Andreas Hasenack
Status: Superseded
Proposed branch: ~ahasenack/ubuntu/+source/zeromq3:eoan-zeromq3-merge
Merge into: ubuntu/+source/zeromq3:ubuntu/devel
Diff against target: 218 lines (+177/-0) (has conflicts)
5 files modified
debian/changelog (+27/-0)
debian/patches/CVE-2019-13132.patch (+110/-0)
debian/patches/gssapi_pkgconfig.patch (+30/-0)
debian/patches/series (+5/-0)
debian/patches/validate-group-before-using.patch (+5/-0)
Conflict in debian/changelog
Conflict in debian/patches/series
Conflict in debian/patches/validate-group-before-using.patch
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Canonical Server Pending
Review via email: mp+369945@code.launchpad.net

This proposal has been superseded by a proposal from 2019-07-11.

Description of the change

PPA: https://launchpad.net/~ahasenack/+archive/ubuntu/zeromq3-merge
sudo add-apt-repository ppa:ahasenack/zeromq3-merge -y

There are no DEP8 tests for this package.

Merge from debian. Some notes:
- I collapsed our delta, since 4.3.1-3ubuntu2 reverted the symbols change from 4.3.1-3ubuntu1. Only the patch validate-group-before-using.patch remains
- that patch was merged upstream, so I updated its DEP3 header to reflect that. Debian should pick it up the next time upstream releases, and then this package can become a sync
- we are also affected by this debian bug, so this merge is beneficial to us:
  * Fix GSSAPI support build (closes: #925914).
- and this fixes a security issue that our security team has already SRUed:
  * Fix CVE-2019-13132: application metadata not parsed correctly when using
    CURVE.

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Taking this review as part of my inbox cleanup ....

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

- found all the tags
- ack to only "validate-group-before-using.patch" is remaining
- ack on Debians GSSAPI+CVE fixes
- ack to header update
- the build in the PPA LGTM
- all self tests passed or skipped
- no rebuild of dependencies needed for this upload
- tested with some examples from http://zguide.zeromq.org/php:all

All working fine +1 on this MP

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The merge target should be d/sid but that wasn't important for the review since I check things out anyway (but it breaks the LP view).

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Oopsie on the merge target... Thanks for the +1, I'll resubmit to the right target before tagging and uploading.

Unmerged commits

b02bd8a... by Andreas Hasenack

update-maintainer

25eaccc... by Andreas Hasenack

reconstruct-changelog

9ec7be4... by Andreas Hasenack

merge-changelogs

da84d81... by Andreas Hasenack

    - d/p/validate-group-before-using.patch: validate the supplementary
      group used in the filter_ipc test before using it. (LP: #1820282)
      [Updated DEP3 header with Applied-Upstream information]

ec76dfd... by Laszlo Boszormenyi

Import patches-unapplied version 4.3.1-5 to debian/sid

Imported using git-ubuntu import.

Changelog parent: 1d23ad62598c2153d371703cf940bdd769501083

New changelog entries:
  [ Luca Boccassi <email address hidden> ]
  * Fix CVE-2019-13132: application metadata not parsed correctly when using
    CURVE.

1d23ad6... by Laszlo Boszormenyi

Import patches-unapplied version 4.3.1-4 to debian/sid

Imported using git-ubuntu import.

Changelog parent: f9b7f4ed1996049b09f22a4a083b6dd7643d3aeb

New changelog entries:
  [ Luca Boccassi <email address hidden> ]
  * Fix GSSAPI support build (closes: #925914).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index d743c03..b3104e0 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,30 @@
6+<<<<<<< debian/changelog
7+=======
8+zeromq3 (4.3.1-5ubuntu1) eoan; urgency=medium
9+
10+ * Merge with Debian unstable. Remaining changes:
11+ - d/p/validate-group-before-using.patch: validate the supplementary
12+ group used in the filter_ipc test before using it. (LP #1820282)
13+ [Updated DEP3 header with Applied-Upstream information]
14+
15+ -- Andreas Hasenack <andreas@canonical.com> Wed, 10 Jul 2019 10:13:50 -0300
16+
17+zeromq3 (4.3.1-5) unstable; urgency=high
18+
19+ [ Luca Boccassi <bluca@debian.org> ]
20+ * Fix CVE-2019-13132: application metadata not parsed correctly when using
21+ CURVE.
22+
23+ -- Laszlo Boszormenyi (GCS) <gcs@debian.org> Sat, 06 Jul 2019 13:52:23 +0000
24+
25+zeromq3 (4.3.1-4) unstable; urgency=medium
26+
27+ [ Luca Boccassi <bluca@debian.org> ]
28+ * Fix GSSAPI support build (closes: #925914).
29+
30+ -- Laszlo Boszormenyi (GCS) <gcs@debian.org> Thu, 28 Mar 2019 16:37:09 +0000
31+
32+>>>>>>> debian/changelog
33 zeromq3 (4.3.1-3ubuntu2) disco; urgency=medium
34
35 * d/libzmq5.symbols: revert previous symbols update, as that came from a
36diff --git a/debian/patches/CVE-2019-13132.patch b/debian/patches/CVE-2019-13132.patch
37new file mode 100644
38index 0000000..46c0e20
39--- /dev/null
40+++ b/debian/patches/CVE-2019-13132.patch
41@@ -0,0 +1,110 @@
42+From 29f1ea22396d1b41b218343d50d4c22857d1fb28 Mon Sep 17 00:00:00 2001
43+From: Luca Boccassi <luca.boccassi@gmail.com>
44+Date: Tue, 2 Jul 2019 01:24:19 +0100
45+Subject: [PATCH] Problem: application metadata not parsed correctly when using
46+ CURVE
47+
48+Solution: create buffers large enough to contain arbitrary metadata
49+---
50+ src/curve_server.cpp | 35 ++++++++++++++++++++++++-----------
51+ 1 file changed, 24 insertions(+), 11 deletions(-)
52+
53+diff --git a/src/curve_server.cpp b/src/curve_server.cpp
54+index 69a1aa9f..ac1e3ae3 100644
55+--- a/src/curve_server.cpp
56++++ b/src/curve_server.cpp
57+@@ -327,8 +327,12 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
58+ const size_t clen = (size - 113) + crypto_box_BOXZEROBYTES;
59+
60+ uint8_t initiate_nonce[crypto_box_NONCEBYTES];
61+- uint8_t initiate_plaintext[crypto_box_ZEROBYTES + 128 + 256];
62+- uint8_t initiate_box[crypto_box_BOXZEROBYTES + 144 + 256];
63++ uint8_t *initiate_plaintext =
64++ static_cast<uint8_t *> (malloc (crypto_box_ZEROBYTES + clen));
65++ alloc_assert (initiate_plaintext);
66++ uint8_t *initiate_box =
67++ static_cast<uint8_t *> (malloc (crypto_box_BOXZEROBYTES + clen));
68++ alloc_assert (initiate_box);
69+
70+ // Open Box [C + vouch + metadata](C'->S')
71+ memset (initiate_box, 0, crypto_box_BOXZEROBYTES);
72+@@ -339,6 +343,8 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
73+ memcpy (initiate_nonce + 16, initiate + 105, 8);
74+ cn_peer_nonce = get_uint64 (initiate + 105);
75+
76++ const uint8_t *client_key = initiate_plaintext + crypto_box_ZEROBYTES;
77++
78+ rc = crypto_box_open (initiate_plaintext, initiate_box, clen,
79+ initiate_nonce, _cn_client, _cn_secret);
80+ if (rc != 0) {
81+@@ -346,11 +352,10 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
82+ session->get_socket ()->event_handshake_failed_protocol (
83+ session->get_endpoint (), ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC);
84+ errno = EPROTO;
85+- return -1;
86++ rc = -1;
87++ goto exit;
88+ }
89+
90+- const uint8_t *client_key = initiate_plaintext + crypto_box_ZEROBYTES;
91+-
92+ uint8_t vouch_nonce[crypto_box_NONCEBYTES];
93+ uint8_t vouch_plaintext[crypto_box_ZEROBYTES + 64];
94+ uint8_t vouch_box[crypto_box_BOXZEROBYTES + 80];
95+@@ -371,7 +376,8 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
96+ session->get_socket ()->event_handshake_failed_protocol (
97+ session->get_endpoint (), ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC);
98+ errno = EPROTO;
99+- return -1;
100++ rc = -1;
101++ goto exit;
102+ }
103+
104+ // What we decrypted must be the client's short-term public key
105+@@ -383,7 +389,8 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
106+ session->get_socket ()->event_handshake_failed_protocol (
107+ session->get_endpoint (), ZMQ_PROTOCOL_ERROR_ZMTP_KEY_EXCHANGE);
108+ errno = EPROTO;
109+- return -1;
110++ rc = -1;
111++ goto exit;
112+ }
113+
114+ // Precompute connection secret from client key
115+@@ -405,7 +412,7 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
116+ // is attempted)
117+ rc = receive_and_process_zap_reply ();
118+ if (rc == -1)
119+- return -1;
120++ goto exit;
121+ } else if (!options.zap_enforce_domain) {
122+ // This supports the Stonehouse pattern (encryption without
123+ // authentication) in legacy mode (domain set but no handler).
124+@@ -413,15 +420,21 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
125+ } else {
126+ session->get_socket ()->event_handshake_failed_no_detail (
127+ session->get_endpoint (), EFAULT);
128+- return -1;
129++ rc = -1;
130++ goto exit;
131+ }
132+ } else {
133+ // This supports the Stonehouse pattern (encryption without authentication).
134+ state = sending_ready;
135+ }
136+
137+- return parse_metadata (initiate_plaintext + crypto_box_ZEROBYTES + 128,
138+- clen - crypto_box_ZEROBYTES - 128);
139++ rc = parse_metadata (initiate_plaintext + crypto_box_ZEROBYTES + 128,
140++ clen - crypto_box_ZEROBYTES - 128);
141++
142++exit:
143++ free (initiate_plaintext);
144++ free (initiate_box);
145++ return rc;
146+ }
147+
148+ int zmq::curve_server_t::produce_ready (msg_t *msg_)
149+--
150+2.20.1
151+
152diff --git a/debian/patches/gssapi_pkgconfig.patch b/debian/patches/gssapi_pkgconfig.patch
153new file mode 100644
154index 0000000..5072f82
155--- /dev/null
156+++ b/debian/patches/gssapi_pkgconfig.patch
157@@ -0,0 +1,30 @@
158+Author: Luca Boccassi <bluca@debian.org>
159+Description: gssapi pkg-config check in configure.ac does not work
160+ correctly enable the definition in platform.hpp so that the
161+ gssapi support is actually built in if requested and available.
162+Origin: https://github.com/zeromq/libzmq/pull/3361
163+--- a/configure.ac
164++++ b/configure.ac
165+@@ -472,16 +472,20 @@
166+ # conditionally require libgssapi_krb5
167+ if test "x$require_libgssapi_krb5_ext" != "xno"; then
168+ PKG_CHECK_MODULES([gssapi_krb5], [krb5-gssapi], [
169++ have_gssapi_library="yes"
170+ PKGCFG_NAMES_PRIVATE="$PKGCFG_NAMES_PRIVATE krb5-gssapi"
171+ ], [
172+ AC_CHECK_HEADERS(gssapi/gssapi_generic.h)
173+ AC_SEARCH_LIBS([gss_init_sec_context], [gssapi_krb5 gssapi],
174+- AC_DEFINE(HAVE_LIBGSSAPI_KRB5, [1], [Enabled GSSAPI security]),
175++ have_gssapi_library="yes",
176+ AC_MSG_ERROR(libgssapi_krb5 is needed for GSSAPI security))
177+ PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lgssapi_krb5"
178+ ])
179+ fi
180+-AM_CONDITIONAL(BUILD_GSSAPI, test "x$require_libgssapi_krb5_ext" != "xno")
181++if test "x$have_gssapi_library" = "xyes"; then
182++ AC_DEFINE(HAVE_LIBGSSAPI_KRB5, [1], [Enabled GSSAPI security])
183++fi
184++AM_CONDITIONAL(BUILD_GSSAPI, test "x$have_gssapi_library" = "xyes")
185+
186+ # Select curve encryption library, defaults to tweetnacl
187+ # To use libsodium instead, use --with-libsodium (must be installed)
188diff --git a/debian/patches/series b/debian/patches/series
189index 89cfc2c..feab9ab 100644
190--- a/debian/patches/series
191+++ b/debian/patches/series
192@@ -3,4 +3,9 @@ test_sigbus_sparc64.patch
193 test_hardcoded_ipc_path.patch
194 ppc64_atomic_intrinsics.patch
195 test_pair_ipc_hurd.patch
196+<<<<<<< debian/patches/series
197+=======
198+gssapi_pkgconfig.patch
199+CVE-2019-13132.patch
200+>>>>>>> debian/patches/series
201 validate-group-before-using.patch
202diff --git a/debian/patches/validate-group-before-using.patch b/debian/patches/validate-group-before-using.patch
203index fc8b6b9..eb2af70 100644
204--- a/debian/patches/validate-group-before-using.patch
205+++ b/debian/patches/validate-group-before-using.patch
206@@ -8,7 +8,12 @@ Author: Andreas Hasenack <andreas@canonical.com>
207 Bug: https://github.com/zeromq/libzmq/issues/1462
208 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/zeromq3/+bug/1820282
209 Forwarded: https://github.com/zeromq/libzmq/pull/3453
210+<<<<<<< debian/patches/validate-group-before-using.patch
211 Last-Update: 2019-03-16
212+=======
213+Applied-Upstream: https://github.com/zeromq/libzmq/commit/168aa83d089425d4be5a34911c37c6f58eed2b9b
214+Last-Update: 2019-07-10
215+>>>>>>> debian/patches/validate-group-before-using.patch
216 ---
217 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
218 --- a/tests/test_filter_ipc.cpp

Subscribers

People subscribed via source and target branches