Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Zamir SUN
6f1bd7e45f Update in epel7
Signed-off-by: Zamir SUN <sztsian@gmail.com>
2019-09-20 13:10:47 +08:00
Than Ngo
557fcbe5ec bz#1451069 - CVE-2017-8933 menu-cache: Insecure temporary file creation in get_socket_name function 2017-05-16 10:28:08 +02:00
4 changed files with 60 additions and 11 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@ menu-cache-0.3.2.tar.gz
/menu-cache-1.0.0-D20151126git7e63ae3f66c30a4516bf04139fd98a3856e6a065.tar.gz
/menu-cache-1.0.0-D20151128git0b1e85c263f571f61384c7eb81c7edc2a69335dc.tar.gz
/menu-cache-1.0.1.tar.xz
/menu-cache-1.1.0.tar.xz

View file

@ -0,0 +1,30 @@
diff -up menu-cache-1.0.1/libmenu-cache/menu-cache.c.than menu-cache-1.0.1/libmenu-cache/menu-cache.c
--- menu-cache-1.0.1/libmenu-cache/menu-cache.c.than 2017-05-16 10:13:56.948205062 +0200
+++ menu-cache-1.0.1/libmenu-cache/menu-cache.c 2017-05-16 10:20:10.018120833 +0200
@@ -1522,8 +1522,13 @@ static void get_socket_name( char* buf,
if(*p)
*p = '\0';
}
+#if GLIB_CHECK_VERSION(2, 28, 0)
+ g_snprintf( buf, len, "%s/menu-cached-%s", g_get_user_runtime_dir(),
+ dpy ? dpy : ":0" );
+#else
g_snprintf( buf, len, "%s/.menu-cached-%s-%s", g_get_tmp_dir(),
dpy ? dpy : ":0", g_get_user_name() );
+#endif
g_free(dpy);
}
diff -up menu-cache-1.0.1/menu-cache-daemon/menu-cached.c.than menu-cache-1.0.1/menu-cache-daemon/menu-cached.c
--- menu-cache-1.0.1/menu-cache-daemon/menu-cached.c.than 2017-05-16 10:20:20.881710708 +0200
+++ menu-cache-1.0.1/menu-cache-daemon/menu-cached.c 2017-05-16 10:24:27.959382969 +0200
@@ -446,6 +446,9 @@ static void get_socket_name( char* buf,
if(*p)
*p = '\0';
}
+ /* NOTE: this socket name is incompatible with versions > 1.0.2,
+ although this function is never used since 0.7.0 but
+ libmenu-cache always requests exact socket name instead */
g_snprintf( buf, len, "%s/.menu-cached-%s-%s", g_get_tmp_dir(),
dpy ? dpy : ":0", g_get_user_name() );
g_free(dpy);

View file

@ -1,10 +1,10 @@
%global usegit 0
%global mainrel 1
%global githash 0b1e85c263f571f61384c7eb81c7edc2a69335dc
%global githash 8c8534159d4898935b47f9103cf32cd9b21b3df5
%global shorthash %(TMP=%githash ; echo ${TMP:0:10})
%global gitdate 0b1e85c263f571f61384c7eb81c7edc2a69335dc
%global gitdate_num 20151128
%global gitdate Thu, 14 Sep 2017 00:32:14 +0300
%global gitdate_num 20170914
%if 0%{?usegit} >= 1
%global fedorarel %{mainrel}.D%{gitdate_num}git%{shorthash}
@ -13,8 +13,8 @@
%endif
Name: menu-cache
Version: 1.0.1
Release: %{fedorarel}%{?dist}.1
Version: 1.1.0
Release: %{fedorarel}%{?dist}.5
Summary: Caching mechanism for freedesktop.org compliant menus
Group: System Environment/Libraries
@ -26,7 +26,12 @@ Source0: https://github.com/lxde/menu-cache/archive/%{githash}/%{name}-%{
%else
Source0: http://downloads.sourceforge.net/lxde/%{name}-%{version}.tar.xz
%endif
%if 0%{?el7}
# bz#1451069 - CVE-2017-8933 menu-cache: Insecure temporary file creation in get_socket_name function
Patch0: menu-cache-CVE-2017-8933.patch
%endif
BuildRequires: gcc
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libfm-extra)
%if 0%{?usegit} >= 1
@ -74,17 +79,20 @@ make %{?_smp_mflags}
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%ldconfig_scriptlets
%files
#FIXME: add ChangeLog and NEWS if there is content
%doc AUTHORS COPYING README
%doc AUTHORS
%license COPYING
%if 0%{?usegit} < 1
%doc NEWS
%endif
%doc README
%{_libexecdir}/%{name}/menu-cache-gen
%{_libexecdir}/%{name}/menu-cached
%{_libdir}/libmenu-cache.so.*
%{_libdir}/libmenu-cache.so.3*
#%{_mandir}/man*/*.gz
@ -96,6 +104,16 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
%changelog
* Fri Sep 20 2019 Zamir SUN <sztsian@gmail.com> - 1.1.0-1.5
- Improve compatibility for epel7
- Remove changelog that is out-of-order
* Mon Nov 6 2017 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.1.0-1
- 1.1.0
* Tue May 16 2017 Than Ngo <than@redhat.com> - 1.0.1-2
- bz#1451069 - CVE-2017-8933 menu-cache: Insecure temporary file creation in get_socket_name function
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View file

@ -1 +1 @@
a856ba860b16fdc8c69ee784bc4ade36 menu-cache-1.0.1.tar.xz
SHA512 (menu-cache-1.1.0.tar.xz) = e4c6619ade7b9a1b97c1366bb94dffb9975be5664b193cf0c69cf9470ef7ae19bda3390d04d98ee9a5b1658ec48aa5c83508c26c347af689161ee67c076b3c9e