diff --git a/libsemanage-3.1.tar.gz b/libsemanage-3.1.tar.gz deleted file mode 100644 index cbcf74da639c7ab6ddee4b068af4f3db71951f68..0000000000000000000000000000000000000000 Binary files a/libsemanage-3.1.tar.gz and /dev/null differ diff --git a/libsemanage-3.3.tar.gz b/libsemanage-3.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..cfad5a62dde0dfe7f99206944738057057f0995c Binary files /dev/null and b/libsemanage-3.3.tar.gz differ diff --git a/libsemanage-Fix-use-after-free-in-parse_module_store.patch b/libsemanage-Fix-use-after-free-in-parse_module_store.patch deleted file mode 100644 index 5f8096a5b21970bd3adb5acdcbcce606cfe9198b..0000000000000000000000000000000000000000 --- a/libsemanage-Fix-use-after-free-in-parse_module_store.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 58acebb85887cb25d729ac9cab51e63a8f5b7918 Mon Sep 17 00:00:00 2001 -From: luhuaxin <1539327763@qq.com> -Date: Wed, 9 Jun 2021 21:32:32 +0800 -Subject: [PATCH] libsemanage: Fix use after free in parse_module_store - -The passed arg will be freed after this function call. - -Signed-off-by: luhuaxin <1539327763@qq.com> ---- - src/conf-parse.y | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/conf-parse.y b/src/conf-parse.y -index 9bf9364..eac9134 100644 ---- a/src/conf-parse.y -+++ b/src/conf-parse.y -@@ -516,12 +516,12 @@ static int parse_module_store(char *arg) - char *s; - current_conf->store_type = SEMANAGE_CON_POLSERV_REMOTE; - if ((s = strchr(arg, ':')) == NULL) { -- current_conf->store_path = arg; -+ current_conf->store_path = strdup(arg); - current_conf->server_port = 4242; - } else { - char *endptr; - *s = '\0'; -- current_conf->store_path = arg; -+ current_conf->store_path = strdup(arg); - current_conf->server_port = strtol(s + 1, &endptr, 10); - if (*(s + 1) == '\0' || *endptr != '\0') { - return -2; --- -1.8.3.1 - diff --git a/libsemanage.spec b/libsemanage.spec index aa759291739be89726786945027b1c0730f59c9f..21d782a5d3efc07d008f74d73730dbfe1db3b67b 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -1,21 +1,20 @@ -%define libsepol_version 3.1-1 -%define libselinux_version 3.1-1 +%define libsepol_version 3.3-1 +%define libselinux_version 3.3-1 Name: libsemanage -Version: 3.1 -Release: 6 +Version: 3.3 +Release: 1 License: LGPLv2+ Summary: SELinux binary policy manipulation library URL: https://github.com/SELinuxProject/selinux/wiki -Source0: https://github.com/SELinuxProject/selinux/releases/download/20200710/libsemanage-3.1.tar.gz +Source0: https://github.com/SELinuxProject/selinux/releases/download/3.3/libsemanage-%{version}.tar.gz Source1: semanage.conf Patch9000: fix-test-failure-with-secilc.patch -Patch9001: libsemanage-Fix-use-after-free-in-parse_module_store.patch BuildRequires: gcc python3-devel bison flex bzip2-devel audit-libs-devel BuildRequires: libselinux-devel >= %{libselinux_version} swig libsepol-devel >= %{libsepol_version} -BuildRequires: CUnit-devel gdb-headless +BuildRequires: CUnit-devel gdb-headless libsemanage Requires: bzip2-libs audit-libs Requires: libselinux >= %{libselinux_version} @@ -71,6 +70,8 @@ make PYTHON=%{__python3} DESTDIR="%{buildroot}" LIBDIR="%{_libdir}" SHLIBDIR="%{ cp %{SOURCE1} %{buildroot}/etc/selinux/semanage.conf ln -sf %{_libdir}/libsemanage.so.1 %{buildroot}/%{_libdir}/libsemanage.so +cp -a %{_libdir}/libsemanage.so.1 %{buildroot}/%{_libdir} + %ldconfig_scriptlets %check @@ -80,7 +81,7 @@ make test %license COPYING %dir %{_sysconfdir}/selinux %config(noreplace) %{_sysconfdir}/selinux/semanage.conf -%{_libdir}/libsemanage.so.1 +%{_libdir}/libsemanage.so.* %dir %{_libexecdir}/selinux %dir %{_sharedstatedir}/selinux %dir %{_sharedstatedir}/selinux/tmp @@ -105,10 +106,13 @@ make test %changelog +* Tue Dec 14 2021 panxiaohe - 3.3-1 +- update to 3.3 + * Mon Jul 26 2021 yangzhuangzhuang - 3.1-6 - Remove unnecessary BuildRequires:gdb -* Thu Jul 17 2021 luhuaxin <1539327763@qq.com> - 3.1-5 +* Sat Jul 17 2021 luhuaxin <1539327763@qq.com> - 3.1-5 - fix use after free in semanage config parse * Sat May 22 2021 Hugel - 3.1-4