Projects
openEuler:Mainline
libselinux
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
_service:tar_scm:libselinux.spec
Changed
@@ -3,16 +3,17 @@ Name: libselinux Version: 3.5 -Release: 1 +Release: 2 License: Public Domain Summary: SELinux library and simple utilities Url: https://github.com/SELinuxProject/selinux/wiki Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/libselinux-%{version}.tar.gz +Patch0001: backport-libselinux-add-check-for-calloc-in-check_booleans.patch Patch9000: do-malloc-trim-after-load-policy.patch BuildRequires: gcc python3-devel systemd swig pcre2-devel xz-devel -BuildRequires: ruby-devel libsepol-static python3-pip +BuildRequires: ruby-devel libsepol-static python3-pip python3-setuptools python3-wheel Requires: libsepol >= %{libsepol_version} pcre2 Conflicts: filesystem < 3, selinux-policy-base < 3.13.1-138 @@ -128,6 +129,10 @@ %{_mandir}/ru/man8/* %changelog +* Tue Jul 25 2023 luhuaxin <luhuaxin1@huawei.com> - 3.5-2 +- add check for calloc in check_booleans +- fix python build issue + * Mon Jul 17 2023 zhangguangzhi <zhangguangzhi3@huawei.com> - 3.5-1 - update version to 3.5
View file
_service:tar_scm:backport-libselinux-add-check-for-calloc-in-check_booleans.patch
Added
@@ -0,0 +1,33 @@ +From d8edd363be3184c5738438fde937fd5ebc2d4923 Mon Sep 17 00:00:00 2001 +From: Huaxin Lu <luhuaxin1@huawei.com> +Date: Mon, 19 Jun 2023 07:17:02 +0800 +Subject: PATCH libselinux: add check for calloc in check_booleans + +Check the return value of calloc() to avoid null pointer reference. + +Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com> +Acked-by: Petr Lautrbach <lautrbach@redhat.com> +--- + src/audit2why.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/audit2why.c b/src/audit2why.c +index ba1a66eb..8c4c07d5 100644 +--- a/src/audit2why.c ++++ b/src/audit2why.c +@@ -149,6 +149,12 @@ static int check_booleans(struct boolean_t **bools) + + if (fcnt > 0) { + *bools = calloc(sizeof(struct boolean_t), fcnt + 1); ++ if (!*bools) { ++ PyErr_SetString( PyExc_MemoryError, "Out of memory\n"); ++ free(foundlist); ++ return 0; ++ } ++ + struct boolean_t *b = *bools; + for (i = 0; i < fcnt; i++) { + int ctr = foundlisti; +-- +2.27.0 +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2