Compare commits
10 Commits
09e18b4661
...
988384818e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
988384818e | ||
|
|
481efc844e | ||
|
|
a3295383e4 | ||
|
|
3ba7154dbe | ||
|
|
3d3e3d9ad5 | ||
|
|
e0c2f868bc | ||
|
|
a24f1fb2a7 | ||
|
|
4961b29b31 | ||
|
|
3be345a4c7 | ||
|
|
8e0e3cba58 |
27
backport-0001-CVE-2021-42523.patch
Normal file
27
backport-0001-CVE-2021-42523.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From adf41f36cf7214d7d6fa8d528b74eba47c377405 Mon Sep 17 00:00:00 2001
|
||||
From: Zero0one1 <arya_lee@qq.com>
|
||||
Date: Fri, 2 Apr 2021 16:45:56 +0800
|
||||
Subject: [PATCH] Fix a small memory leak in sqlite3_exec()
|
||||
|
||||
Fixes https://github.com/hughsie/colord/issues/110
|
||||
|
||||
Conflict:NA
|
||||
Reference:https://github.com/hughsie/colord/commit/adf41f36cf7214d7d6fa8d528b74eba47c377405
|
||||
|
||||
---
|
||||
src/cd-device-db.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cd-device-db.c b/src/cd-device-db.c
|
||||
index a212c83d..3ae44ef2 100644
|
||||
--- a/src/cd-device-db.c
|
||||
+++ b/src/cd-device-db.c
|
||||
@@ -91,7 +91,7 @@ cd_device_db_load (CdDeviceDb *ddb,
|
||||
|
||||
/* check properties version 2 */
|
||||
rc = sqlite3_exec (priv->db, "SELECT * FROM properties_v2 LIMIT 1",
|
||||
- NULL, NULL, &error_msg);
|
||||
+ NULL, NULL, NULL);
|
||||
if (rc != SQLITE_OK) {
|
||||
statement = "CREATE TABLE properties_v2 ("
|
||||
"device_id TEXT,"
|
||||
25
backport-0002-CVE-2021-42523.patch
Normal file
25
backport-0002-CVE-2021-42523.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 1452a975ecae14299fb27d41522dfd32305481ce Mon Sep 17 00:00:00 2001
|
||||
From: Richard Hughes <richard@hughsie.com>
|
||||
Date: Wed, 13 Apr 2022 14:21:32 +0100
|
||||
Subject: [PATCH] trivial: Fix a small memory leak on db open failure
|
||||
|
||||
Conflict:Using g_autofree will make the testcase fail, so here we use sqlite3_free to free the memory
|
||||
Reference:https://github.com/hughsie/colord/commit/1452a975ecae14299fb27d41522dfd32305481ce
|
||||
---
|
||||
src/cd-profile-db.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/cd-profile-db.c b/src/cd-profile-db.c
|
||||
index 5661d09..d6361ac 100644
|
||||
--- a/src/cd-profile-db.c
|
||||
+++ b/src/cd-profile-db.c
|
||||
@@ -87,6 +87,7 @@ cd_profile_db_load (CdProfileDb *pdb,
|
||||
"uid INTEGER,"
|
||||
"value TEXT,"
|
||||
"PRIMARY KEY (profile_id, property, uid));";
|
||||
+ sqlite3_free (error_msg);
|
||||
sqlite3_exec (priv->db, statement, NULL, NULL, NULL);
|
||||
}
|
||||
return TRUE;
|
||||
--
|
||||
2.33.0
|
||||
Binary file not shown.
BIN
colord-1.4.4.tar.xz
Normal file
BIN
colord-1.4.4.tar.xz
Normal file
Binary file not shown.
59
colord.spec
59
colord.spec
@ -1,12 +1,15 @@
|
||||
Name: colord
|
||||
Version: 1.4.3
|
||||
Release: 5
|
||||
Version: 1.4.4
|
||||
Release: 4
|
||||
Summary: A system activated daemon
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://www.freedesktop.org/software/colord/
|
||||
Source0: https://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz
|
||||
|
||||
BuildRequires: color-filesystem dbus-devel docbook-utils gettext glib2-devel
|
||||
Patch6000: backport-0001-CVE-2021-42523.patch
|
||||
Patch6001: backport-0002-CVE-2021-42523.patch
|
||||
|
||||
BuildRequires: color-filesystem dbus-devel docbook5-style-xsl gettext glib2-devel
|
||||
BuildRequires: gobject-introspection-devel gtk-doc libgudev1-devel
|
||||
BuildRequires: libxslt meson sqlite-devel systemd systemd-devel vala-tools
|
||||
BuildRequires: lcms2-devel >= 2.6 libgusb-devel >= 0.2.2 polkit-devel >= 0.103
|
||||
@ -26,15 +29,18 @@ generate color profiles to accurately color manage input and output devices.
|
||||
Summary: Libraries for %{name}
|
||||
|
||||
%description libs
|
||||
Libraries for %{name}.
|
||||
colord is a low level system activated daem that maps color devices
|
||||
to color profiles in the system context.
|
||||
|
||||
%package devel
|
||||
Summary: This devel package contains development files
|
||||
Summary: Development package for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Obsoletes: colorhug-client-devel <= 0.1.13 shared-color-profiles-extra <= 0.1.6-2
|
||||
Obsoletes: colord-extra-profiles
|
||||
Provides: colord-extra-profiles shared-color-profiles-extra
|
||||
Obsoletes: colord-extra-profiles < %{version}-%{release}
|
||||
Provides: colord-extra-profiles = %{version}-%{release} shared-color-profiles-extra
|
||||
Obsoletes: colord-tests < %{version}-%{release}
|
||||
Provides: colord-tests = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Development package for colord.
|
||||
@ -42,8 +48,8 @@ Development package for colord.
|
||||
%package help
|
||||
Summary: Help documentation package for color
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Provides: colord-devel-docs
|
||||
Obsoletes: colord-devel-docs
|
||||
Provides: colord-devel-docs = %{version}-%{release}
|
||||
Obsoletes: colord-devel-docs < %{version}-%{release}
|
||||
|
||||
%description help
|
||||
This help package contains help documents for color.
|
||||
@ -54,8 +60,11 @@ This help package contains help documents for color.
|
||||
%build
|
||||
ulimit -Sv 2000000
|
||||
|
||||
# colord-test-private test cases always fail, so we don't run this case
|
||||
# https://github.com/hughsie/colord/issues/139 use this link to track bugs
|
||||
sed -i 's/test('"'"'colord-test-private'"'"'/# test('"'"'colord-test-private'"'"'/g' %{_builddir}/%{name}-%{version}/lib/colord/meson.build
|
||||
%meson -Dargyllcms_sensor=false -Dbash_completion=false -Ddaemon_user=colord \
|
||||
-Dprint_profiles=false -Dvapi=true
|
||||
-Dprint_profiles=false -Dvapi=true -Dinstalled_tests=true -Dtests=true
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
@ -71,6 +80,8 @@ cat /etc/group | grep colord > /dev/null || groupadd -r colord
|
||||
cat /etc/passwd | grep colord >/dev/null || useradd -r -g colord \
|
||||
-s /sbin/nologin -d /var/lib/colord -c "User for colord" colord
|
||||
exit 0
|
||||
%check
|
||||
%meson_test
|
||||
|
||||
%preun
|
||||
%systemd_preun colord.service
|
||||
@ -111,14 +122,19 @@ exit 0
|
||||
%ghost %attr(-,colord,colord) %{_localstatedir}/lib/colord/*.db
|
||||
/usr/lib/udev/rules.d/*.rules
|
||||
/usr/lib/tmpfiles.d/colord.conf
|
||||
%{_datadir}/dbus-1/interfaces/org.freedesktop.ColorHelper.xml
|
||||
%{_datadir}/dbus-1/services/org.freedesktop.ColorHelper.service
|
||||
%{_datadir}/glib-2.0/schemas/org.freedesktop.ColorHelper.gschema.xml
|
||||
|
||||
%files libs
|
||||
%doc COPYING
|
||||
%{_libdir}/libcolord.so.2*
|
||||
%{_libdir}/libcolordprivate.so.2*
|
||||
%{_libdir}/libcolorhug.so.2*
|
||||
%{_libdir}/girepository-1.0/*.typelib
|
||||
|
||||
%files devel
|
||||
%dir %{_libexecdir}/installed-tests/colord
|
||||
%{_includedir}/colord-1
|
||||
%{_libdir}/libcolord.so
|
||||
%{_libdir}/libcolorhug.so
|
||||
@ -127,6 +143,8 @@ exit 0
|
||||
%{_datadir}/vala/vapi/colord.vapi
|
||||
%{_datadir}/gir-1.0/*.gir
|
||||
%{_datadir}/vala/vapi/colord.deps
|
||||
%{_datadir}/installed-tests/colord/*
|
||||
%{_libexecdir}/installed-tests/colord/*
|
||||
%{_icccolordir}/colord/AppleRGB.icc
|
||||
%{_icccolordir}/colord/BestRGB.icc
|
||||
%{_icccolordir}/colord/BetaRGB.icc
|
||||
@ -148,12 +166,27 @@ exit 0
|
||||
%doc README.md NEWS
|
||||
%dir %{_datadir}/gtk-doc/html/colord
|
||||
%{_datadir}/gtk-doc/html/colord/*
|
||||
%{_datadir}/dbus-1/interfaces/org.freedesktop.ColorHelper.xml
|
||||
%{_datadir}/dbus-1/services/org.freedesktop.ColorHelper.service
|
||||
%{_datadir}/glib-2.0/schemas/org.freedesktop.ColorHelper.gschema.xml
|
||||
%{_datadir}/man/man1/*.1.gz
|
||||
|
||||
%changelog
|
||||
* Sat Mar 11 2023 zhangpan <zhangpan103@h-partners.com> - 1.4.4-4
|
||||
- enable test
|
||||
|
||||
* Wed Aug 31 2022 wangkeorng <wangkerong@h-partners.com> - 1.4.4-3
|
||||
- fix CVE-2021-42523
|
||||
|
||||
* Mon Aug 29 2022 wangkeorng <wangkerong@h-partners.com> - 1.4.4-2
|
||||
- fix CVE-2021-42523
|
||||
|
||||
* Tue Aug 18 2020 wangye <wangye70@huawei.com> - 1.4.4-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:upgrade to version 1.4.4
|
||||
|
||||
* Fri Mar 13 2020 songnannan <songnannan2@huawei.com> - 1.4.3-6
|
||||
- move the files to main package
|
||||
|
||||
* Mon Feb 17 2020 hexiujun <hexiujun1@huawei.com> - 1.4.3-5
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user