From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qKRzJgXj5mEi2wAAgWs5BA (envelope-from ) for ; Tue, 18 Jan 2022 16:55:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OOAPIwXj5mEprgAAauVa8A (envelope-from ) for ; Tue, 18 Jan 2022 16:55:49 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 023894302A for ; Tue, 18 Jan 2022 16:55:49 +0100 (CET) Received: from localhost ([::1]:37966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9qpn-0001Hp-Ka for larch@yhetil.org; Tue, 18 Jan 2022 10:55:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9pba-0007FC-UA for guix-patches@gnu.org; Tue, 18 Jan 2022 09:37:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9pba-0000bc-KZ for guix-patches@gnu.org; Tue, 18 Jan 2022 09:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n9pba-0002aE-E2 for guix-patches@gnu.org; Tue, 18 Jan 2022 09:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53345] [PATCH core-updates] gnu: libssh2: Update to 1.10.0. Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Jan 2022 14:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53345 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53345@debbugs.gnu.org Cc: Attila Lendvai X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16425165639850 (code B ref -1); Tue, 18 Jan 2022 14:37:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jan 2022 14:36:03 +0000 Received: from localhost ([127.0.0.1]:49307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9pac-0002Yo-OL for submit@debbugs.gnu.org; Tue, 18 Jan 2022 09:36:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:47500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9pab-0002YO-44 for submit@debbugs.gnu.org; Tue, 18 Jan 2022 09:36:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9paZ-0005sp-Lq for guix-patches@gnu.org; Tue, 18 Jan 2022 09:36:00 -0500 Received: from [2a00:1450:4864:20::52e] (port=37641 helo=mail-ed1-x52e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9paU-0000TV-1U for guix-patches@gnu.org; Tue, 18 Jan 2022 09:35:59 -0500 Received: by mail-ed1-x52e.google.com with SMTP id j7so31959554edr.4 for ; Tue, 18 Jan 2022 06:35:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eaEelCC/rtGLUBKZAYqXkg9yMqMOFtk8dqWLkQ/ekow=; b=bybt8/EkM/cWtfPlnIH6JDdwwAE3IhSt/a03p7PQlF22kwju81x3qTEkXri80sli+p IWEq3/9iEF8RR5nLSvVYofoWoBilSRrWoECdkEvLeIzgcfUgymYzsnQetKeXAzPqEfaJ L80V0ebnlqL2DTQj+tYzXk6bCLA0EulLWsQzVKYcYtFMjoAePV5HB7xIKuWWPdZkgLjI Mef6Ym4+PLBrXfr6vDlkHxa3UTG2YQrok1OIIW/4kGHo5hFqhy1kQ6RyaQfEfx2jpfgF I845kRDa8iBNohV480TE76SmcRamCimRbHe+sIbP2JVKNJoO6+ZsmYsqSEP2ICBG40zA +IxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=eaEelCC/rtGLUBKZAYqXkg9yMqMOFtk8dqWLkQ/ekow=; b=BVAPQi3E2Oe/Mr+cdjip2ZMCmku2/pBR1+nElMM7GWbiMVsHLV9fhN7GRt/+GxNX8E I7SUFjKXRIq/50jU5Y1BmEJvZogvJKaL/wXMmA8VZsDK78ktNdUmy4RrxFEDbtc6KeKk MoGm6pyLrn0WrIlhbau5YY5TxIgxuUD0FylYGDm92hYce6YRmOaJh4noeNbn51FJ0q5I wpm44BlCPgBpVzSX79XSvDA671kVtAQ8Ljfo1ErM5OwceTHbJ6ppG394BhGd/uduAZS+ 0MWMgSt/P1D+SVbgEf8v0LLU0hm80y20ooGZc+pl1kCH9imqPgRRn+cPZZIBsZDOtHbU 1H4Q== X-Gm-Message-State: AOAM530niWetL1P9UFy/jQxfVIVLJuQA/sUFBMPyGRYT3FWdbuMOtSqU yRQ8Y2hPciucicGzPxTkBcGGHRxEstI= X-Google-Smtp-Source: ABdhPJzho9V83iiO17xLSzoQCcW8d4Ckv/8hq59vlinKHl7k1PzG1NmTzVH58Cmrw8hF0Rasis8YSA== X-Received: by 2002:a17:906:4782:: with SMTP id cw2mr21174283ejc.337.1642516541421; Tue, 18 Jan 2022 06:35:41 -0800 (PST) Received: from lelap.local (catv-89-132-245-188.catv.broadband.hu. [89.132.245.188]) by smtp.gmail.com with ESMTPSA id a18sm4174475ejt.49.2022.01.18.06.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jan 2022 06:35:40 -0800 (PST) From: Attila Lendvai Date: Tue, 18 Jan 2022 15:34:48 +0100 Message-Id: <20220118143447.14183-1-attila@lendvai.name> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=attila.lendvai@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642521349; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=eaEelCC/rtGLUBKZAYqXkg9yMqMOFtk8dqWLkQ/ekow=; b=Ytx2sVgFzlLfzKs75W1JeXM9ASa/+dH1LcPx9FluXwgOo4hm5/CISBeG3j+YTeVChdrrpI h9HQdTmcWVstWD3UQBTAqyKH88KzhVzoWkBrSnMmm1J1jSuXnuY84QyUPUyFNYut2Y7KJZ YP++HM04Ji/A3FswzDTeEazb8RhpDo9j3BW6+VEjwHKCv7nFxx5LlvQGNDLhEbv8magxG4 K4yKs7Fcj2yM64VUYGnxW/XuVBrs2PHM/F8EqtXtBQroZ2TJMx4/4OCiz7AYlBZKaiSEcd WOD/kzyhGYmp4RLV86wMGik6m0pn1zHJ3F0g7iQ/wZ2JAwfuCUo4IMcSVsVHIQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642521349; a=rsa-sha256; cv=none; b=hpIPb2wtrX6ZQI7/IxSEyyaSuOQW4V5N91C741zYxEe90a3xGWX61bv2lGc1fc6b7jEOQc Vs19AWKTpCYvcBweaeTOuLAvn5oRRMc22lFbGZB4OasOXWYo9Tn5ts0qlGCHYfjDjy6OZh 3j4pXNJUV9oXd/yT3BwJP/sHWahvJSagrdxsDl3b5+CxtJ9kgHfXqjUA1IbJB66oANBfJj dekKoMUf8HXYtNqMPuIK0Wc69pu6P7w/M6Yup4FlZBkjOP25oJrLVTtQdSAPaQLhIP5v+T shuhs9re9hbBONr1w5vRk1ZCRIu7+aS8blqpChKCxxSS7CjPKBxAiGXHb7PBaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="bybt8/Ek"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.82 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="bybt8/Ek"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 023894302A X-Spam-Score: -0.82 X-Migadu-Scanner: scn0.migadu.com X-TUID: SKfaheYDBmSR Also change origin to git-fetch the project's git repository using git tags. --- note: i have tested this to build cleanly, but nothing beyond that. gnu/local.mk | 1 - .../patches/libssh2-CVE-2019-17498.patch | 126 ------------------ gnu/packages/ssh.scm | 16 ++- 3 files changed, 9 insertions(+), 134 deletions(-) delete mode 100644 gnu/packages/patches/libssh2-CVE-2019-17498.patch diff --git a/gnu/local.mk b/gnu/local.mk index 0bae6ffa63..cf9a602042 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1393,7 +1393,6 @@ dist_patch_DATA = \ %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \ %D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch \ %D%/packages/patches/libquicktime-ffmpeg.patch \ - %D%/packages/patches/libssh2-CVE-2019-17498.patch \ %D%/packages/patches/libtar-CVE-2013-4420.patch \ %D%/packages/patches/libtgvoip-disable-sse2.patch \ %D%/packages/patches/libtgvoip-disable-webrtc.patch \ diff --git a/gnu/packages/patches/libssh2-CVE-2019-17498.patch b/gnu/packages/patches/libssh2-CVE-2019-17498.patch deleted file mode 100644 index 6f69e562e2..0000000000 --- a/gnu/packages/patches/libssh2-CVE-2019-17498.patch +++ /dev/null @@ -1,126 +0,0 @@ -https://github.com/libssh2/libssh2/commit/dedcbd106f8e52d5586b0205bc7677e4c9868f9c.patch - -From dedcbd106f8e52d5586b0205bc7677e4c9868f9c Mon Sep 17 00:00:00 2001 -From: Will Cosgrove -Date: Fri, 30 Aug 2019 09:57:38 -0700 -Subject: [PATCH] packet.c: improve message parsing (#402) - -* packet.c: improve parsing of packets - -file: packet.c - -notes: -Use _libssh2_get_string API in SSH_MSG_DEBUG/SSH_MSG_DISCONNECT. Additional uint32 bounds check in SSH_MSG_GLOBAL_REQUEST. ---- - src/packet.c | 68 ++++++++++++++++++++++------------------------------ - 1 file changed, 29 insertions(+), 39 deletions(-) - -diff --git a/src/packet.c b/src/packet.c -index 38ab62944..2e01bfc5d 100644 ---- a/src/packet.c -+++ b/src/packet.c -@@ -419,8 +419,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, - size_t datalen, int macstate) - { - int rc = 0; -- char *message = NULL; -- char *language = NULL; -+ unsigned char *message = NULL; -+ unsigned char *language = NULL; - size_t message_len = 0; - size_t language_len = 0; - LIBSSH2_CHANNEL *channelp = NULL; -@@ -472,33 +472,23 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, - - case SSH_MSG_DISCONNECT: - if(datalen >= 5) { -- size_t reason = _libssh2_ntohu32(data + 1); -+ uint32_t reason = 0; -+ struct string_buf buf; -+ buf.data = (unsigned char *)data; -+ buf.dataptr = buf.data; -+ buf.len = datalen; -+ buf.dataptr++; /* advance past type */ - -- if(datalen >= 9) { -- message_len = _libssh2_ntohu32(data + 5); -+ _libssh2_get_u32(&buf, &reason); -+ _libssh2_get_string(&buf, &message, &message_len); -+ _libssh2_get_string(&buf, &language, &language_len); - -- if(message_len < datalen-13) { -- /* 9 = packet_type(1) + reason(4) + message_len(4) */ -- message = (char *) data + 9; -- -- language_len = -- _libssh2_ntohu32(data + 9 + message_len); -- language = (char *) data + 9 + message_len + 4; -- -- if(language_len > (datalen-13-message_len)) { -- /* bad input, clear info */ -- language = message = NULL; -- language_len = message_len = 0; -- } -- } -- else -- /* bad size, clear it */ -- message_len = 0; -- } - if(session->ssh_msg_disconnect) { -- LIBSSH2_DISCONNECT(session, reason, message, -- message_len, language, language_len); -+ LIBSSH2_DISCONNECT(session, reason, (const char *)message, -+ message_len, (const char *)language, -+ language_len); - } -+ - _libssh2_debug(session, LIBSSH2_TRACE_TRANS, - "Disconnect(%d): %s(%s)", reason, - message, language); -@@ -539,24 +529,24 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, - int always_display = data[1]; - - if(datalen >= 6) { -- message_len = _libssh2_ntohu32(data + 2); -- -- if(message_len <= (datalen - 10)) { -- /* 6 = packet_type(1) + display(1) + message_len(4) */ -- message = (char *) data + 6; -- language_len = _libssh2_ntohu32(data + 6 + -- message_len); -- -- if(language_len <= (datalen - 10 - message_len)) -- language = (char *) data + 10 + message_len; -- } -+ struct string_buf buf; -+ buf.data = (unsigned char *)data; -+ buf.dataptr = buf.data; -+ buf.len = datalen; -+ buf.dataptr += 2; /* advance past type & always display */ -+ -+ _libssh2_get_string(&buf, &message, &message_len); -+ _libssh2_get_string(&buf, &language, &language_len); - } - - if(session->ssh_msg_debug) { -- LIBSSH2_DEBUG(session, always_display, message, -- message_len, language, language_len); -+ LIBSSH2_DEBUG(session, always_display, -+ (const char *)message, -+ message_len, (const char *)language, -+ language_len); - } - } -+ - /* - * _libssh2_debug will actually truncate this for us so - * that it's not an inordinate about of data -@@ -579,7 +569,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, - uint32_t len = 0; - unsigned char want_reply = 0; - len = _libssh2_ntohu32(data + 1); -- if(datalen >= (6 + len)) { -+ if((len <= (UINT_MAX - 6)) && (datalen >= (6 + len))) { - want_reply = data[5 + len]; - _libssh2_debug(session, - LIBSSH2_TRACE_CONN, diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index ae64e99948..a3411c687f 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -157,17 +157,19 @@ (define-public libssh (define-public libssh2 (package (name "libssh2") - (version "1.9.0") + (version "1.10.0") (source (origin - (method url-fetch) - (uri (string-append - "https://www.libssh2.org/download/libssh2-" - version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/libssh2/libssh2") + (commit (string-append "libssh2-" version)))) (sha256 (base32 - "1zfsz9nldakfz61d2j70pk29zlmj7w2vv46s9l3x2prhcgaqpyym")) - (patches (search-patches "libssh2-CVE-2019-17498.patch")))) + "0iiwdnvzq7mw1h1frbsszzhhf259jvjmzbp15mkgdfypnhgh3ri5")))) (build-system gnu-build-system) + (native-inputs (list autoconf + automake + libtool)) ;; The installed libssh2.pc file does not include paths to libgcrypt and ;; zlib libraries, so we need to propagate the inputs. (propagated-inputs (list libgcrypt zlib)) -- 2.34.0