Bug 471147 - segfault in checkmodule while compiling a policy module
segfault in checkmodule while compiling a policy module
Product: Fedora
Classification: Fedora
Component: checkpolicy (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-11-11 19:37 EST by Carl Roth
Modified: 2009-12-11 09:48 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-11 09:48:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
sample policy, including gdb backtrace (190.38 KB, application/x-bzip-compressed-tar)
2008-11-11 19:39 EST, Carl Roth
no flags Details
diff between f9 and f10 compiled policy ('tmp') files (3.03 KB, patch)
2008-11-12 14:25 EST, Carl Roth
no flags Details | Diff

  None (edit)
Description Carl Roth 2008-11-11 19:37:38 EST
Description of problem:

I have a small policy module that I use with F9 and was hoping to migrate it to F10...  When I compile the policy it segfaults in 'checkmodule'.

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Carl Roth 2008-11-11 19:39:28 EST
Created attachment 323280 [details]
sample policy, including gdb backtrace
Comment 2 Carl Roth 2008-11-12 14:22:45 EST
I don't know if this is interesting, but I compiled the same policy with F9:


and it compiles fine.  I'm attaching a diff of the two 'tmp' intermediate files.
Comment 3 Carl Roth 2008-11-12 14:25:06 EST
Created attachment 323375 [details]
diff between f9 and f10 compiled policy ('tmp') files
Comment 4 Carl Roth 2008-11-12 14:47:32 EST
I also did some experiments by mixing and matching the '.tmp' intermediate file with the offending command line:

  /usr/bin/checkmodule -M -m -o tmp/ursus-config-pyzor.mod tmp/ursus-config-pyzor.tmp

* the ursus-config-pyzor.tmp file from F9 works fine with checkmodule for f9 and for f10.
* the ursus-config-pyzor.tmp file from F10 crashes with checkmodule for f9 and for f10.

I don't understand too much more about checkmodule itelf, other than that the backtrace indicates it's choking on the 'user_pyzor_home_t' symbol.  I didn't attach the actual core file since that somewhat large.
Comment 5 Daniel Walsh 2008-11-14 15:49:21 EST
If you just remove 

#  type user_pyzor_home_t;

It works.
Comment 6 Daniel Walsh 2008-11-14 15:56:01 EST
This policy will cause the compiler to crash

policy_module(test, 1.0)

  type a_t;
type b_t alias a_t;

If you require a type that has been aliased by another type.
Comment 7 Bug Zapper 2008-11-26 00:13:38 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
Comment 8 Robert Story 2009-07-03 18:26:47 EDT
Any progress on this? I'm seeing this on F9..
Comment 9 Daniel Walsh 2009-07-05 22:02:05 EDT
This has been reported to Upstream, but I am not sure where they are on it.  Moving to rawhide.
Comment 10 Stephen Smalley 2009-07-06 07:41:37 EDT
Your test case in comment 6 compiles fine with the checkmodule in F11.
IIRC, this was fixed in checkpolicy 2.0.19 and libsepol 2.0.35 upstream.
Comment 11 Daniel Walsh 2009-07-06 14:39:30 EDT
Ok Carl do you want this to be back ported to F10 or is fixed in F11 good enough?
Comment 12 Bug Zapper 2009-11-18 02:58:28 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 13 Miroslav Grepl 2009-12-11 09:48:37 EST
I am closing it as WONTFIX as per the comment #11.

Note You need to log in before you can comment on or make changes to this bug.