Created attachment 1317701 [details] Reproducer Description of problem: In function cil_strpool_destroy, the cil_strpool_tab variable is freed (using cil_strpool_destroy), but it is not set back to NULL. So when the cil_strpool_init function is called again it assumes that cil_strpool_tab was initialized. Other cil_strpool functions then work with invalid data and this causes segfaults. Version-Release number of selected component (if applicable): libsepol-2.7-1.fc27.x86_64 How reproducible: always Steps to Reproduce: 1. Download reproducer (see attachment) 2. $ gcc cil_strpool_bug.c -o cil_strpool_bug -lsemanage 3. # ./cil_strpool_bug Segmentation fault (core dumped) Additional info: Works with libsepol-2.6-2.fc26.x86_64 Commit that caused the bug: https://github.com/SELinuxProject/selinux/commit/d7cb38ff8714e1817e4ff35c1ded4d84a0b62f2a
upstream fix: https://github.com/SELinuxProject/selinux/commit/1346746d82373bbc4516a830e7f17352b929fa35
secilc-2.7-2.fc27 checkpolicy-2.7-2.fc27 policycoreutils-2.7-3.fc27 libsemanage-2.7-2.fc27 libselinux-2.7-3.fc27 libsepol-2.7-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-290cd03a8c
checkpolicy-2.7-2.fc27, libselinux-2.7-3.fc27, libsemanage-2.7-2.fc27, libsepol-2.7-2.fc27, policycoreutils-2.7-3.fc27, secilc-2.7-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-290cd03a8c
checkpolicy-2.7-2.fc27, libselinux-2.7-3.fc27, libsemanage-2.7-2.fc27, libsepol-2.7-2.fc27, policycoreutils-2.7-3.fc27, secilc-2.7-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.