Compare commits
10 Commits
78a6abfe0b
...
ac87612eef
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac87612eef | ||
|
|
c00d17520d | ||
|
|
3a4cded9d6 | ||
|
|
763110c299 | ||
|
|
66868361f8 | ||
|
|
a2cffd4709 | ||
|
|
107d626cca | ||
|
|
96d5ad3eb3 | ||
|
|
9fc5492833 | ||
|
|
6c83e9e823 |
Binary file not shown.
BIN
libsemanage-3.5.tar.gz
Normal file
BIN
libsemanage-3.5.tar.gz
Normal file
Binary file not shown.
@ -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
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
%define libsepol_version 3.1-1
|
||||
%define libselinux_version 3.1-1
|
||||
%define libsepol_version 3.5-1
|
||||
%define libselinux_version 3.5-1
|
||||
|
||||
Name: libsemanage
|
||||
Version: 3.1
|
||||
Release: 6
|
||||
Version: 3.5
|
||||
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/%{version}/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}
|
||||
@ -69,7 +68,7 @@ make DESTDIR="%{buildroot}" LIBDIR="%{_libdir}" SHLIBDIR="%{_libdir}" install
|
||||
make PYTHON=%{__python3} DESTDIR="%{buildroot}" LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" install-pywrap
|
||||
|
||||
cp %{SOURCE1} %{buildroot}/etc/selinux/semanage.conf
|
||||
ln -sf %{_libdir}/libsemanage.so.1 %{buildroot}/%{_libdir}/libsemanage.so
|
||||
ln -sf %{_libdir}/libsemanage.so.2 %{buildroot}/%{_libdir}/libsemanage.so
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
@ -77,10 +76,10 @@ ln -sf %{_libdir}/libsemanage.so.1 %{buildroot}/%{_libdir}/libsemanage.so
|
||||
make test
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%license LICENSE
|
||||
%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 +104,25 @@ make test
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 17 2023 zhangguangzhi<zhangguangzhi3@huawei.com> - 3.5-1
|
||||
- update version to 3.5
|
||||
|
||||
* Mon Jan 30 2023 zhangguangzhi<zhangguangzhi3@huawei.com> - 3.4-1
|
||||
- update version to 3.4
|
||||
|
||||
* Fri Mar 18 2022 panxiaohe<panxh.life@foxmail.com> - 3.3-3
|
||||
- delete useless old version dynamic library
|
||||
|
||||
* Tue Mar 15 2022 panxiaohe<panxh.life@foxmail.com> - 3.3-2
|
||||
- use new version dynamic library
|
||||
|
||||
* Tue Dec 14 2021 panxiaohe<panxiaohe@huawei.com> - 3.3-1
|
||||
- update to 3.3
|
||||
|
||||
* Mon Jul 26 2021 yangzhuangzhuang<yangzhuangzhuang1@huawei.com> - 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<gengqihu1@huawei.com> - 3.1-4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user