SELinux userspace 3.11 release
Resolves: RHEL-192085
This commit is contained in:
parent
97954d5e8d
commit
ce029f194c
2
.gitignore
vendored
2
.gitignore
vendored
@ -208,3 +208,5 @@ libsepol-2.0.41.tgz
|
||||
/libsepol-3.9.tar.gz.asc
|
||||
/libsepol-3.10.tar.gz
|
||||
/libsepol-3.10.tar.gz.asc
|
||||
/libsepol-3.11.tar.gz
|
||||
/libsepol-3.11.tar.gz.asc
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
From bee83f31fddd26a87c63b1f9bd8fd87450437d6b Mon Sep 17 00:00:00 2001
|
||||
From: Vit Mojzis <vmojzis@redhat.com>
|
||||
Date: Tue, 28 Apr 2026 23:34:09 +0200
|
||||
Subject: [PATCH] libsepol: Fix memory leak in role_dominates_copy_callback
|
||||
|
||||
Free memory allocated by map_ebitmap in case ebitmap_union fails.
|
||||
|
||||
Fixes:
|
||||
Defect type: RESOURCE_LEAK
|
||||
libsepol-3.10/src/expand.c:828:2: alloc_arg: "map_ebitmap" allocates memory that is stored into "mapped.node".
|
||||
libsepol-3.10/src/expand.c:68:3: alloc_arg: "ebitmap_set_bit" allocates memory that is stored into "dst->node".
|
||||
libsepol-3.10/src/ebitmap.c:420:2: alloc_fn: Storage is returned from allocation function "malloc".
|
||||
libsepol-3.10/src/ebitmap.c:420:2: assign: Assigning: "new" = "(ebitmap_node_t *)malloc(24UL)".
|
||||
libsepol-3.10/src/ebitmap.c:437:3: assign: Assigning: "e->node" = "new".
|
||||
libsepol-3.10/src/expand.c:831:3: leaked_storage: Variable "mapped" going out of scope leaks the storage "mapped.node" points to.
|
||||
\# 829| return -1;
|
||||
\# 830| if (ebitmap_union(&new_role->dominates, &mapped))
|
||||
\# 831|-> return -1;
|
||||
\# 832| ebitmap_destroy(&mapped);
|
||||
\# 833|
|
||||
|
||||
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
|
||||
Acked-by: Petr Lautrbach <lautrbach@redhat.com>
|
||||
---
|
||||
libsepol/src/expand.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libsepol/src/expand.c b/libsepol/src/expand.c
|
||||
index ed912b57..72804f60 100644
|
||||
--- a/libsepol/src/expand.c
|
||||
+++ b/libsepol/src/expand.c
|
||||
@@ -827,8 +827,10 @@ static int role_dominates_copy_callback(hashtab_key_t key __attribute__ ((unused
|
||||
|
||||
if (map_ebitmap(&role->dominates, &mapped, state->rolemap))
|
||||
return -1;
|
||||
- if (ebitmap_union(&new_role->dominates, &mapped))
|
||||
+ if (ebitmap_union(&new_role->dominates, &mapped)) {
|
||||
+ ebitmap_destroy(&mapped);
|
||||
return -1;
|
||||
+ }
|
||||
ebitmap_destroy(&mapped);
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
* Wed Jul 01 2026 Petr Lautrbach <lautrbach@redhat.com> - 3.11-1
|
||||
- SELinux userspace 3.11 release
|
||||
|
||||
* Thu May 21 2026 Vit Mojzis <vmojzis@redhat.com> - 3.10-2
|
||||
- Fix memory leak in role_dominates_copy_callback (RHEL-147882)
|
||||
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
Summary: SELinux binary policy manipulation library
|
||||
Name: libsepol
|
||||
Version: 3.10
|
||||
Release: 2%{?dist}
|
||||
Version: 3.11
|
||||
Release: 1%{?dist}
|
||||
License: LGPL-2.1-or-later
|
||||
Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/libsepol-%{version}.tar.gz
|
||||
Source1: https://github.com/SELinuxProject/selinux/releases/download/%{version}/libsepol-%{version}.tar.gz.asc
|
||||
Source2: https://github.com/perfinion.gpg
|
||||
Source2: https://github.com/bachradsusi.gpg
|
||||
URL: https://github.com/SELinuxProject/selinux/wiki
|
||||
# $ git clone https://github.com/fedora-selinux/selinux.git
|
||||
# $ cd selinux
|
||||
# $ git format-patch -N libsepol-3.10 -- libsepol
|
||||
# $ git format-patch -N libsepol-3.11 -- libsepol
|
||||
# $ i=1; for j in 0*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
|
||||
# Patch list start
|
||||
Patch0001: 0001-libsepol-Fix-memory-leak-in-role_dominates_copy_call.patch
|
||||
# Patch list end
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
|
||||
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (libsepol-3.10.tar.gz) = 95a12779a41577d02a13922d1a484954a6b041b3be9a76836e179ab3a4e4b83b90df63e3a3f32b0862466ed8748280fa9b820f8dc96a3887bcdde081947e7450
|
||||
SHA512 (libsepol-3.10.tar.gz.asc) = fdfd33a072852ac46baad21dfbdee3e25310417e01e8ad5954e1ddcdb44034d91a4e546de339c802c2a86b87284479c4a8e54de055d5aa3f46b4ef533d9c40c1
|
||||
SHA512 (libsepol-3.11.tar.gz) = 38335292be8b8ce8b22bb2a0e481f92e2bbf532d9a2ee5319ada0b3fd294df487e5eba8041bac2a09ef7b048fee13ca0520c34cb3283fea1f95fcc5752f66b81
|
||||
SHA512 (libsepol-3.11.tar.gz.asc) = 80f37aa5447be9ac3e8b08a2e83a1c805128df279c16b31340ab18790185802362323ed39f1ee4a2b489f94919c222605d1bb29c09ee801349e850877c01322a
|
||||
|
||||
Loading…
Reference in New Issue
Block a user