!13 [sync] PR-10: fix CVE-2021-39358

From: @openeuler-sync-bot
Reviewed-by: @orange-snn,@orange-snn
Signed-off-by: @orange-snn
This commit is contained in:
openeuler-ci-bot 2021-11-16 07:10:04 +00:00 committed by Gitee
commit 2131ce4301
2 changed files with 39 additions and 2 deletions

33
CVE-2021-39358.patch Normal file
View File

@ -0,0 +1,33 @@
From a7d3d5cbf64647c1ed8978b2a33a3be35f888129 Mon Sep 17 00:00:00 2001
From: "Douglas R. Reno" <renodr@linuxfromscratch.org>
Date: Wed, 15 Sep 2021 17:40:00 +0000
Subject: [PATCH] Fix CVE-2021-39358 by forcing TLS certificate
validation
This is similar to the fix performed in other packages. See
https://gitlab.gnome.org/Teams/Releng/security/-/issues/57 for more
details.
Tested on Linux From Scratch 11.0 and on Debian 11.
Fixes #17
---
gfbgraph/gfbgraph-photo.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gfbgraph/gfbgraph-photo.c b/gfbgraph/gfbgraph-photo.c
index 1e8955c..f6281a6 100644
--- a/gfbgraph/gfbgraph-photo.c
+++ b/gfbgraph/gfbgraph-photo.c
@@ -424,6 +424,7 @@ gfbgraph_photo_download_default_size (GFBGraphPhoto *photo, GFBGraphAuthorizer *
session = soup_session_sync_new ();
requester = soup_requester_new ();
+ g_object_set (G_OBJECT (session), "ssl-use-system-ca-file", TRUE, NULL);
soup_session_add_feature (session, SOUP_SESSION_FEATURE (requester));
request = soup_requester_request (requester, priv->source, error);
--
2.27.0

View File

@ -1,10 +1,11 @@
Name: gfbgraph
Version: 0.2.3
Release: 1
Release: 2
Summary: GLib/GObject wrapper for the Facebook Graph API
License: LGPLv2+
URL: https://wiki.gnome.org/Projects/GFBGraph
Source0: https://download.gnome.org/sources/gfbgraph/0.2/gfbgraph-%{version}.tar.xz
Patch0: CVE-2021-39358.patch
BuildRequires: pkgconfig(gio-2.0) pkgconfig(glib-2.0) pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(goa-1.0) gobject-introspection-devel gtk-doc pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(libsoup-2.4) pkgconfig(rest-0.7)
@ -21,7 +22,7 @@ The gfbgraph-devel package contains libraries and header files for
developing applications that use gfbgraph.
%prep
%setup -q
%autosetup -n %{name}-%{version} -p1
%build
%configure \
@ -59,5 +60,8 @@ rm -rf $RPM_BUILD_ROOT%{_prefix}/doc
%{_includedir}/gfbgraph-0.2/gfbgraph
%changelog
* Tue Nov 16 2021 liwu <liwu13@huawei.com> - 0.2.3-2
- Fix CVE-2021-39358
* Mon Jul 20 2020 yaokai <yaokai13@huawei.com> - 0.2.3-1
- package init