mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-18 04:04:34 +00:00
914691cc2a
When a function called by sepol_module_policydb_to_cil() fails before role_list_create() has been called, role_list is still NULL but is dereferenced in role_list_destroy(). Here is a gdb session on hll/pp: Unknown value for handle-unknown: 6 Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7a68a37 in role_list_destroy () at module_to_cil.c:215 215 struct list_node *curr = role_list->head; (gdb) bt #0 0x00007ffff7a68a37 in role_list_destroy () at module_to_cil.c:215 #1 sepol_module_policydb_to_cil (fp=fp@entry=0x7ffff79925e0 <_IO_2_1_stdout_>, pdb=<optimized out>, linked=linked@entry=0) at module_to_cil.c:4060 #2 0x00007ffff7a6ac75 in sepol_module_package_to_cil (fp=fp@entry=0x7ffff79925e0 <_IO_2_1_stdout_>, mod_pkg=0x604280) at module_to_cil.c:4080 #3 0x0000000000401a58 in main (argc=<optimized out>, argv=<optimized out>) at pp.c:150 This issue has been found while fuzzing hll/pp with the American Fuzzy Lop. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org> |
||
---|---|---|
checkpolicy | ||
dbus | ||
gui | ||
libselinux | ||
libsemanage | ||
libsepol | ||
mcstrans | ||
policycoreutils | ||
python | ||
restorecond | ||
sandbox | ||
scripts | ||
secilc | ||
semodule-utils | ||
.gitignore | ||
.travis.yml | ||
CleanSpec.mk | ||
Makefile | ||
README |
Please submit all bug reports and patches to selinux@tycho.nsa.gov. Subscribe via selinux-join@tycho.nsa.gov. Build dependencies on Fedora: yum install audit-libs-devel bison bzip2-devel dbus-devel dbus-glib-devel flex flex-devel flex-static glib2-devel libcap-devel libcap-ng-devel pam-devel pcre-devel python-devel setools-devel swig xmlto redhat-rpm-config To build and install everything under a private directory, run: make DESTDIR=~/obj install install-pywrap To install as the default system libraries and binaries (overwriting any previously installed ones - dangerous!), on x86_64, run: make LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install install-pywrap relabel or on x86 (32-bit), run: make install install-pywrap relabel This may render your system unusable if the upstream SELinux userspace lacks library functions or other dependencies relied upon by your distribution. If it breaks, you get to keep both pieces. To install libsepol on macOS (mainly for policy analysis): cd libsepol; make DESTDIR=/usr/local PREFIX=/usr/local install This requires GNU coreutils (brew install coreutils).