forked from pool/libselinux
Accepting request 1186962 from home:cahu:security:SELinux:userspace37
- Fix segfault caused by upstream changes in selabel_open(): libselinux-set-free-d-data-to-NULL.patch Can be removed once it is upstream. OBS-URL: https://build.opensuse.org/request/show/1186962 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libselinux?expand=0&rev=172
This commit is contained in:
parent
f1e382eed0
commit
984e3188e2
48
libselinux-set-free-d-data-to-NULL.patch
Normal file
48
libselinux-set-free-d-data-to-NULL.patch
Normal file
@ -0,0 +1,48 @@
|
||||
Index: libselinux-3.7/src/label_backends_android.c
|
||||
===================================================================
|
||||
--- libselinux-3.7.orig/src/label_backends_android.c
|
||||
+++ libselinux-3.7/src/label_backends_android.c
|
||||
@@ -260,6 +260,7 @@ static void closef(struct selabel_handle
|
||||
free(data->spec_arr);
|
||||
|
||||
free(data);
|
||||
+ rec->data = NULL;
|
||||
}
|
||||
|
||||
static struct selabel_lookup_rec *property_lookup(struct selabel_handle *rec,
|
||||
Index: libselinux-3.7/src/label_file.c
|
||||
===================================================================
|
||||
--- libselinux-3.7.orig/src/label_file.c
|
||||
+++ libselinux-3.7/src/label_file.c
|
||||
@@ -942,6 +942,7 @@ static void closef(struct selabel_handle
|
||||
free(last_area);
|
||||
}
|
||||
free(data);
|
||||
+ rec->data = NULL;
|
||||
}
|
||||
|
||||
// Finds all the matches of |key| in the given context. Returns the result in
|
||||
Index: libselinux-3.7/src/label_media.c
|
||||
===================================================================
|
||||
--- libselinux-3.7.orig/src/label_media.c
|
||||
+++ libselinux-3.7/src/label_media.c
|
||||
@@ -183,6 +183,7 @@ static void close(struct selabel_handle
|
||||
free(spec_arr);
|
||||
|
||||
free(data);
|
||||
+ rec->data = NULL;
|
||||
}
|
||||
|
||||
static struct selabel_lookup_rec *lookup(struct selabel_handle *rec,
|
||||
Index: libselinux-3.7/src/label_x.c
|
||||
===================================================================
|
||||
--- libselinux-3.7.orig/src/label_x.c
|
||||
+++ libselinux-3.7/src/label_x.c
|
||||
@@ -210,6 +210,7 @@ static void close(struct selabel_handle
|
||||
free(spec_arr);
|
||||
|
||||
free(data);
|
||||
+ rec->data = NULL;
|
||||
}
|
||||
|
||||
static struct selabel_lookup_rec *lookup(struct selabel_handle *rec,
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 11 19:47:41 UTC 2024 - Cathy Hu <cathy.hu@suse.com>
|
||||
|
||||
- Fix segfault caused by upstream changes in selabel_open():
|
||||
libselinux-set-free-d-data-to-NULL.patch
|
||||
Can be removed once it is upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 1 07:53:14 UTC 2024 - Cathy Hu <cathy.hu@suse.com>
|
||||
|
||||
|
@ -36,6 +36,9 @@ Patch5: skip_cycles.patch
|
||||
# Make linking working even when default pkg-config doesn’t provide -lpython<ver>
|
||||
Patch6: python3.8-compat.patch
|
||||
Patch7: swig4_moduleimport.patch
|
||||
# Fixes segfault in 3.7, please remove once this is upstream:
|
||||
# https://lore.kernel.org/selinux/CAP+JOzQCu0srfss921Ew42oHxsaqRYGiTs56_h9j2Yfw0cYGjg@mail.gmail.com/T/#t
|
||||
Patch8: libselinux-set-free-d-data-to-NULL.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libsepol-devel >= %{libsepol_ver}
|
||||
BuildRequires: libsepol-devel-static >= %{libsepol_ver}
|
||||
|
Loading…
Reference in New Issue
Block a user