Skip to content

Commit ac45317

Browse files
[AUTO-CHERRYPICK] graphviz: address CVE-2023-46045 & CVE-2020-18032 - branch main (#9129)
Co-authored-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
1 parent e86c9c1 commit ac45317

3 files changed

Lines changed: 63 additions & 6 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 197f3149a5753d6bc994a21b98a70c7f76f548b5 Mon Sep 17 00:00:00 2001
2+
From: Muhammad Falak R Wani <falakreyaz@gmail.com>
3+
Date: Tue, 14 May 2024 10:47:34 +0530
4+
Subject: [PATCH] gvc: detect plugin installation failure and display an error
5+
6+
Gitlab: fixes #2441
7+
Reported-by: GJDuck
8+
9+
Backported to v2.42.4 by @mfrw
10+
11+
Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com>
12+
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
13+
---
14+
lib/gvc/gvconfig.c | 4 ++++
15+
1 file changed, 4 insertions(+)
16+
17+
diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c
18+
index 59c4614..35c1b60 100644
19+
--- a/lib/gvc/gvconfig.c
20+
+++ b/lib/gvc/gvconfig.c
21+
@@ -186,6 +186,10 @@ static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s)
22+
do {
23+
api = token(&nest, &s);
24+
gv_api = gvplugin_api(api);
25+
+ if (gv_api == (api_t)-1) {
26+
+ agerr(AGERR, "config error: %s %s not found\n", path, api);
27+
+ return 0;
28+
+ }
29+
do {
30+
if (nest == 2) {
31+
type = token(&nest, &s);
32+
--
33+
2.40.1
34+

SPECS/graphviz/graphviz.spec

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
Summary: Graph Visualization Tools
4646
Name: graphviz
4747
Version: 2.42.4
48-
Release: 9%{?dist}
48+
Release: 10%{?dist}
4949
License: EPL-1.0
5050
Vendor: Microsoft Corporation
5151
Distribution: Mariner
@@ -55,6 +55,7 @@ Source0: https://gitlab.com/%{name}/%{name}/-/archive/%{version}/%{name}-
5555
Patch0: graphviz-2.42.2-dotty-menu-fix.patch
5656
Patch1: graphviz-2.42.2-coverity-scan-fixes.patch
5757
Patch2: CVE-2020-18032.patch
58+
Patch3: CVE-2023-46045.patch
5859
BuildRequires: autoconf
5960
BuildRequires: automake
6061
BuildRequires: bison
@@ -250,9 +251,7 @@ Requires: tcl >= 8.3
250251
Various tcl packages (extensions) for the graphviz tools.
251252

252253
%prep
253-
%setup -q
254-
%patch0 -p1 -b .dotty-menu-fix
255-
%patch1 -p1 -b .coverity-scan-fixes
254+
%autosetup -p1
256255

257256
# Attempt to fix rpmlint warnings about executable sources
258257
find -type f -regex '.*\.\(c\|h\)$' -exec chmod a-x {} ';'
@@ -518,6 +517,10 @@ php --no-php-ini \
518517
%{_mandir}/man3/*.3tcl*
519518

520519
%changelog
520+
* Tue May 14 2024 Muhammad Falak <mwani@microsoft.com> - 2.42.4-10
521+
- Switch to autosetup to actually address CVE-2020-18032
522+
- Address CVE-2023-46045
523+
521524
* Wed Sep 20 2023 Jon Slobodzian <joslobo@microsoft.com> - 2.42.4-9
522525
- Recompile with stack-protection fixed gcc version (CVE-2023-4039)
523526

SPECS/python-sphinx/python-sphinx.spec

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Summary: Python documentation generator
1212
Name: python-sphinx
1313
Version: 4.4.0
14-
Release: 2%{?dist}
14+
Release: 3%{?dist}
1515
# Unless otherwise noted, the license for code is BSD
1616
# sphinx/util/inspect.py has bits licensed with PSF license v2 (Python)
1717
# sphinx/themes/haiku/static/haiku.css_t has bits licensed with MIT
@@ -37,10 +37,27 @@ BuildRequires: gettext
3737
BuildRequires: graphviz
3838
BuildRequires: python3-atomicwrites
3939
BuildRequires: python3-attrs
40+
BuildRequires: python3-babel
4041
BuildRequires: python3-docutils
42+
BuildRequires: python3-html5lib
43+
BuildRequires: python3-imagesize
44+
BuildRequires: python3-importlib-metadata
45+
BuildRequires: python3-jinja2
46+
BuildRequires: python3-more-itertools
47+
BuildRequires: python3-packaging
4148
BuildRequires: python3-pluggy
49+
BuildRequires: python3-pygments
4250
BuildRequires: python3-pytest
51+
BuildRequires: python3-requests
4352
BuildRequires: python3-six
53+
BuildRequires: python3-snowballstemmer
54+
BuildRequires: python3-sphinx-theme-alabaster
55+
BuildRequires: python3-sphinxcontrib-applehelp
56+
BuildRequires: python3-sphinxcontrib-devhelp
57+
BuildRequires: python3-sphinxcontrib-htmlhelp
58+
BuildRequires: python3-sphinxcontrib-jsmath
59+
BuildRequires: python3-sphinxcontrib-qthelp
60+
BuildRequires: python3-sphinxcontrib-serializinghtml
4461
BuildRequires: python3-test
4562
BuildRequires: texinfo
4663

@@ -237,7 +254,7 @@ mkdir %{buildroot}%{python3_sitelib}/sphinxcontrib
237254
>> sphinx.lang
238255

239256
%check
240-
pip3 install more-itertools
257+
pip3 install webencodings
241258
%pytest
242259

243260
%files -n python%{python3_pkgversion}-sphinx -f sphinx.lang
@@ -252,6 +269,9 @@ pip3 install more-itertools
252269
%dir %{_datadir}/sphinx/locale/*
253270

254271
%changelog
272+
* Tue May 14 2024 Pawel Winogrodzki <pawelwi@microsoft.com> - 4.4.0-3
273+
- Added test-time dependencies to unblock tests.
274+
255275
* Fri Mar 25 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 4.4.0-2
256276
- Initial CBL-Mariner import from Fedora 36 (license: MIT).
257277
- Removing epoch.

0 commit comments

Comments
 (0)