From a434b2bfc51a3ab52a3963d103de134701da5cc8 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 29 Jun 2021 10:50:23 +0200 Subject: [PATCH] Add missing patches Resolves: rhbz#1976719 --- ...ld-Clarify-LGPLv2.1-or-later-license.patch | 59 +++++++++++++++++++ ...-validation-not-being-done-for-any-n.patch | 33 +++++++++++ 2 files changed, 92 insertions(+) create mode 100644 0001-build-Clarify-LGPLv2.1-or-later-license.patch create mode 100644 0002-net-Fix-TLS-cert-validation-not-being-done-for-any-n.patch diff --git a/0001-build-Clarify-LGPLv2.1-or-later-license.patch b/0001-build-Clarify-LGPLv2.1-or-later-license.patch new file mode 100644 index 0000000..c702dd0 --- /dev/null +++ b/0001-build-Clarify-LGPLv2.1-or-later-license.patch @@ -0,0 +1,59 @@ +From 89537b8c4bae8857078de5d084f79ffe532a7ba8 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Mon, 21 Jun 2021 14:16:37 +0200 +Subject: [PATCH 1/2] build: Clarify LGPLv2.1 or later license + +The COPYING file by itself isn't enough to know under which license the +project is released, as a combined work. + +Clarify this in the build system and the README. +--- + README.md | 5 +++++ + doc/grilo/overview.xml | 3 ++- + meson.build | 2 +- + 3 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/README.md b/README.md +index c6fe38e..16f9453 100644 +--- a/README.md ++++ b/README.md +@@ -89,4 +89,9 @@ ninja -C build + ./build/tools/grilo-test-ui/grilo-test-ui-0.3 + ``` + ++## License ++ ++grilo is available under the [GNU Lesser General Public License v2.1 or later](https://spdx.org/licenses/LGPL-2.1-or-later.html). ++Check the sources themselves for individual copyrights and licenses. ++ + Enjoy! +diff --git a/doc/grilo/overview.xml b/doc/grilo/overview.xml +index aa169ae..52b8e41 100644 +--- a/doc/grilo/overview.xml ++++ b/doc/grilo/overview.xml +@@ -99,7 +99,8 @@ developers. + + + +-Grilo is licensed under the GNU Lesser General Public License (LGPL). ++Grilo is licensed under the GNU Lesser General Public License (LGPL) ++version 2.1 or later. + + + +diff --git a/meson.build b/meson.build +index cf12454..f76d790 100644 +--- a/meson.build ++++ b/meson.build +@@ -12,7 +12,7 @@ project('grilo', 'c', + 'c_std=gnu99', + 'warning_level=1' + ], +- license: 'LGPL 2.1', ++ license: 'LGPL-2.1-or-later', + meson_version: '>= 0.46.0') + + grilo_version = meson.project_version() +-- +2.31.1 + diff --git a/0002-net-Fix-TLS-cert-validation-not-being-done-for-any-n.patch b/0002-net-Fix-TLS-cert-validation-not-being-done-for-any-n.patch new file mode 100644 index 0000000..743d4bc --- /dev/null +++ b/0002-net-Fix-TLS-cert-validation-not-being-done-for-any-n.patch @@ -0,0 +1,33 @@ +From cd2472e506dafb1bb8ae510e34ad4797f63e263e Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Mon, 21 Jun 2021 15:00:14 +0200 +Subject: [PATCH 2/2] net: Fix TLS cert validation not being done for any + network call + +The default SoupSessionAsync behaviour does not perform any TLS certificate +validation, unless the ssl-use-system-ca-file property is set to true. + +See https://blogs.gnome.org/mcatanzaro/2021/05/25/reminder-soupsessionsync-and-soupsessionasync-default-to-no-tls-certificate-verification/ + +This mitigates CVE-2016-20011. + +Closes: #146 +--- + libs/net/grl-net-wc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c +index 5a8e89f..5ff1d17 100644 +--- a/libs/net/grl-net-wc.c ++++ b/libs/net/grl-net-wc.c +@@ -314,6 +314,7 @@ grl_net_wc_init (GrlNetWc *wc) + wc->priv = grl_net_wc_get_instance_private (wc); + + wc->priv->session = soup_session_async_new (); ++ g_object_set (G_OBJECT (wc->priv->session), "ssl-use-system-ca-file", TRUE, NULL); + wc->priv->pending = g_queue_new (); + + set_thread_context (wc); +-- +2.31.1 +