From patchwork Wed Mar 31 05:23:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 28220 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2E8EC27BC66; Wed, 31 Mar 2021 06:26:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 81A0127BC65 for ; Wed, 31 Mar 2021 06:26:28 +0100 (BST) Received: from localhost ([::1]:45682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRTN5-0001OO-NI for patchwork@mira.cbaines.net; Wed, 31 Mar 2021 01:26:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRTLk-0000Rj-GP for guix-patches@gnu.org; Wed, 31 Mar 2021 01:25:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRTLk-0006Od-8k for guix-patches@gnu.org; Wed, 31 Mar 2021 01:25:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRTLk-00037F-5a for guix-patches@gnu.org; Wed, 31 Mar 2021 01:25:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47513] [PATCH 07/12] gnu: pjproject-jami: Fix CVE-2020-15260 and CVE-2021-21375. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 31 Mar 2021 05:25:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47513 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47513@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 47513-submit@debbugs.gnu.org id=B47513.161716825111840 (code B ref 47513); Wed, 31 Mar 2021 05:25:04 +0000 Received: (at 47513) by debbugs.gnu.org; 31 Mar 2021 05:24:11 +0000 Received: from localhost ([127.0.0.1]:53252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRTKs-00034n-Va for submit@debbugs.gnu.org; Wed, 31 Mar 2021 01:24:11 -0400 Received: from mail-qk1-f173.google.com ([209.85.222.173]:33723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRTKl-00032T-4x for 47513@debbugs.gnu.org; Wed, 31 Mar 2021 01:24:04 -0400 Received: by mail-qk1-f173.google.com with SMTP id o5so18305663qkb.0 for <47513@debbugs.gnu.org>; Tue, 30 Mar 2021 22:24:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BK4q44gi8stqYjxO5ii2WjRMFUa2AoDtGI3nDVIDaWw=; b=DNZNS3pEJs9gg3saO0XAlMxYtBYS6bg+0apphlocB0dfJOTt+SGBVyOQGmeCAgH4c+ jBk/++x0zpdhFs9e9p93Zd2dfZTGNoRrp19Cz0pSZ82YIc8mnXlCLgThyBWUO8ru56sa Htwl2Ivw/nqZOz/qzr8IlZggw+1ATuoDj2ZRvoUNp4eiIhklUEEzWUGhiPxUSwwg3jMI VfBgBYnKMcUioPbfh8rvlFNlekMnIkYdNKC4ldMJW0cUerrWrhjz5z+cgiIlxiGWHgcf OhnuZXnqJvv0Rj4AkMAkSqsVpX8ZXg3Frzk47g4KDQ6pARZvUKpMjalmXmzxiJgfY6kr I9cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BK4q44gi8stqYjxO5ii2WjRMFUa2AoDtGI3nDVIDaWw=; b=NqKSQfRB++39hPPRmq29GD1/CM4Q/yxh9AgTJZ8rgdXNdUR0v2UPPKIIDhx9VnfguH ZwWxJjUiS9Gh32xbMWLm8B23z7AUIj2EvO45F+XHWuvz0ztSsEe6rfqNBXQUHxJOaVM6 bKtkbhy3bf25PY8GtExkBSj9iRdK1p0e/BR5vA2pleELzN6fAcT0pVxivrOCyUiyp2Bo poCjUUI+PxmbcKu57WHd4SDM47gTQNAm1tkqakSO+FK3zwCGe5M7oFHFs0Wxqe2JpEBg kcGzZSLpzdwqmN8hOY3Q9BFIctWFYZEdX26pW5+m84MJYEduyAnRKI5iFEDNopGuzgTE MTog== X-Gm-Message-State: AOAM530+dDtTDNYQ7/VR/qrBJ8dYibfQJ68YeGVXZIJ9NKGx6HNNJUJ/ EK5KqgPOSk1SnbdSlfVwyIP+rEL1HgE= X-Google-Smtp-Source: ABdhPJxYDQRgdXuGRL7N9Ygfdm9aoppRB6e0PuIt5wUH/+t4jd40Kck25Z+J+PCki8k4ID6P+523sg== X-Received: by 2002:a37:842:: with SMTP id 63mr1670764qki.112.1617168237409; Tue, 30 Mar 2021 22:23:57 -0700 (PDT) Received: from localhost.localdomain ([207.35.95.145]) by smtp.gmail.com with ESMTPSA id q64sm828662qtd.32.2021.03.30.22.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 22:23:57 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 31 Mar 2021 01:23:43 -0400 Message-Id: <20210331052348.5164-7-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210331052348.5164-1-maxim.cournoyer@gmail.com> References: <20210331052348.5164-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches The custom pjproject package used by Jami is updated with the latest patches found in the 20210326.1.cfba013 release of Jami. * gnu/packages/jami.scm (%jami-version): Update to 20210326.1.cfba013. (jami-source) [snippet]: Update comment. Add client-electron and client-ios to the list of deleted directories. Remove client-windows from the list, as it no longer exists. (jami-apply-dependency-patches): Update comment. Ignore whitespace when applying patches, otherwise the pjproject patches would not apply. (pjproject-jami): Add comment. [source]: Define the source; the parent pjproject package was updated was updated to 2.11, but the patches only apply against 2.10. [phases] : Update the list of patches used with those found in the release tarball. --- gnu/packages/jami.scm | 52 ++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm index 3773c1ab0a..35d84bb37b 100644 --- a/gnu/packages/jami.scm +++ b/gnu/packages/jami.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2019 Pierre Neidhardt ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2019, 2020 Jan Wielkiewicz -;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2020, 2021 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,7 +63,7 @@ #:use-module (guix utils) #:use-module (srfi srfi-1)) -(define %jami-version "20200710.1.6bd18d2") +(define %jami-version "20210326.1.cfba013") (define* (jami-source #:key keep-contrib-patches?) "Return an origin object of the tarball release sources archive of Jami. @@ -78,7 +78,7 @@ of Jami." (modules '((guix build utils))) (snippet `(begin - ;; Delete over 200 MiB of bundled tarballs. The contrib directory + ;; Delete multiple MiBs of bundled tarballs. The contrib directory ;; contains the custom patches for pjproject and other libraries used ;; by Savoir-faire Linux. (if ,keep-contrib-patches? @@ -86,21 +86,21 @@ of Jami." (delete-file-recursively "daemon/contrib")) ;; Remove code from unused Jami clients. (for-each delete-file-recursively '("client-android" + "client-electron" + "client-ios" "client-macosx" - "client-uwp" - "client-windows")) - #t)) + "client-uwp")))) (sha256 (base32 - "0lg61jv39x7kc9lq30by246xb6gcgp1rzj49ak7ff8nqpfzyfvva")))) + "1h0avma8bdzyznkz39crjyv2888bii4f49md15jg7970dyp5pdyz")))) (define %sfl-patches (jami-source #:keep-contrib-patches? #t)) (define %jami-sources (jami-source)) -;; Savoir-faire Linux modifies many libraries to add features -;; to Jami. This procedure makes applying patches to a given -;; package easy. +;; Savoir-faire Linux maintains a set of patches for some key dependencies +;; (currently pjproject and ffmpeg) of Jami that haven't yet been integrated +;; upstream. This procedure simplifies the process of applying these patches.x (define jami-apply-dependency-patches '(lambda* (#:key inputs dep-name patches) (let ((patches-directory "sfl-patches")) @@ -112,15 +112,30 @@ of Jami." dep-name)) (for-each (lambda (file) - (invoke "patch" "--force" "-p1" "-i" + (invoke "patch" "--force" "--ignore-whitespace" "-p1" "-i" (string-append patches-directory "/" file ".patch"))) patches)))) +;;; Jami maintains pjproject patches that add the ability to do ICE over TCP, +;;; among other things. The patches are currently based on pjproject 2.10. (define-public pjproject-jami (package (inherit pjproject) (name "pjproject-jami") + (version "2.10") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pjsip/pjproject") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1aklicpgwc88578k03i5d5cm5h8mfm7hmx8vfprchbmaa2p8f4z0")) + (patches (search-patches + "pjproject-correct-the-cflags-field.patch" + "pjproject-fix-pkg-config-ldflags.patch")))) (native-inputs `(("sfl-patches" ,%sfl-patches) ,@(package-native-inputs pjproject))) @@ -140,14 +155,19 @@ of Jami." "0004-multiple_listeners" "0005-fix_ebusy_turn" "0006-ignore_ipv6_on_transport_check" - "0007-pj_ice_sess" + "0007-upnp-srflx-nat-assisted-cand" "0008-fix_ioqueue_ipv6_sendto" "0009-add-config-site" - ;; Note: The base pjproject is already patched with - ;; "0010-fix-pkgconfig". + ;; Already taken care of via the origin patches. + ;;"0010-fix-pkgconfig" "0011-fix-tcp-death-detection" - "0012-fix-turn-shutdown-crash")) - #t)))))))) + "0012-fix-turn-shutdown-crash" + "0013-Assign-unique-local-preferences-for-candidates-with-" + "0014-Add-new-compile-time-setting-PJ_ICE_ST_USE_TURN_PERM" + "0015-update-local-preference-for-peer-reflexive-candidate" + "0016-use-addrinfo-instead-CFHOST" + "0017-CVE-2020-15260" + "0018-CVE-2021-21375")))))))))) ;; The following variables are configure flags used by ffmpeg-jami. They're ;; from the ring-project/daemon/contrib/src/ffmpeg/rules.mak file. We try to