Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1382472

Summary: semodule_package segfaults on certain inputs
Product: Red Hat Enterprise Linux 7 Reporter: Milos Malik <mmalik>
Component: policycoreutilsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED WONTFIX QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: low    
Version: 7.3CC: dwalsh, lvrabec, mgrepl, mmalik, plautrba, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1382490 1382754 (view as bug list) Environment:
Last Closed: 2017-06-29 13:41:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
first input file found by AFL that crashed semodule_package none

Description Milos Malik 2016-10-06 18:56:26 UTC
Description of problem:
* found by American Fuzzy Lop

Version-Release number of selected component (if applicable):
libselinux-2.5-6.el7.x86_64
libselinux-python-2.5-6.el7.x86_64
libselinux-utils-2.5-6.el7.x86_64
libsemanage-2.5-4.el7.x86_64
libsemanage-python-2.5-4.el7.x86_64
libsepol-2.5-6.el7.x86_64
policycoreutils-2.5-8.el7.x86_64
policycoreutils-python-2.5-8.el7.x86_64

How reproducible:
* always

Steps to Reproduce:
# semodule_package -o mypolicy.pp -m crash2 
security: ebitmap: map size 0 does not match my size 64 (high bit was 1)
security: ebitmap: map size 1 does not match my size 64 (high bit was 64)
security: ebitmap: map size 1 does not match my size 64 (high bit was 0)
Segmentation fault
# echo $?
139
# dmesg | tail -n 1
[  316.625311] semodule_packag[4547]: segfault at 7f6d77da91c8 ip 00007f6576d20dd4 sp 00007fffdb1b7780 error 6 in libsepol.so.1[7f6576cf2000+95000]
# 

Actual results:
* segfault

Expected results:
* some error message but no segfault

Comment 1 Milos Malik 2016-10-06 18:59:26 UTC
Created attachment 1208020 [details]
first input file found by AFL that crashed semodule_package