From: nicolas.iooss@m4x.org (Nicolas Iooss)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] Some already-fixed bugs (was: Re: [PATCH] Fix minor typo in init.if)
Date: Wed, 10 Sep 2014 21:53:45 +0200 [thread overview]
Message-ID: <5410AC49.8010102@m4x.org> (raw)
In-Reply-To: <540EF681.208@tresys.com>
2014-09-09 14:45 GMT+02:00 Christopher J. PeBenito:
> On 9/8/2014 6:46 PM, Nicolas Iooss wrote:
>> Tonight I had the idea of using travis-ci.org to automate some kind of
>> testing. This free service can basically watch public Github
>> repositories and run tests after every commit. I ran tests in some
>> configurations [1] and every test case failed.
>>
>> The monolithic build fails with [2]:
>>
>> /usr/bin/checkpolicy -U deny policy.conf -o policy.26
>> /usr/bin/checkpolicy: loading policy configuration from policy.conf
>> checkpolicy: expand.c:721: role_fix_callback: Assertion `regular_role
>> != ((void *)0) && regular_role->flavor == 0' failed.
>> make: *** [policy.26] Aborted
>>
>> [SNIP]
>
> I'd have to look at the code to better understand what the assertion means.
>
> Are you using HEAD version of refpolicy and HEAD refpolicy-contrib? I'm
> not able to reproduce any build errors.
>
I am not able to reproduce this assertion failure on a Debian Jessie
system using the 2.3 toolchain. travis-ci.org uses Ubuntu 12.04 LTS
Server Edition [1] and therefore the 2.1 toolchain [2][3]. As far as I
understand, this means that the "assertion failure bug" has already been
fixed. I was using HEAD version of both refpolicy and refpolicy-contrib
when the bug happened.
While speaking about a bug which has already been fixed, this command
fails with the 2.3 toolchain on Debian Jessie when building the
reference policy from HEAD (without the Debian patches):
$ semodule_link -o tmp/test.lnk base.pp storage.pp sysadm.pp \
application.pp authlogin.pp init.pp libraries.pp locallogin.pp \
logging.pp lvm.pp miscfiles.pp modutils.pp mount.pp selinuxutil.pp \
sysnetwork.pp userdomain.pp && semodule_expand tmp/test.lnk \
tmp/policy.bin
semodule_link: loading package from file base.pp
semodule_link: loading package from file storage.pp
semodule_link: loading package from file sysadm.pp
semodule_link: loading package from file application.pp
semodule_link: loading package from file authlogin.pp
semodule_link: loading package from file init.pp
semodule_link: loading package from file libraries.pp
semodule_link: loading package from file locallogin.pp
semodule_link: loading package from file logging.pp
semodule_link: loading package from file lvm.pp
semodule_link: loading package from file miscfiles.pp
semodule_link: loading package from file modutils.pp
semodule_link: loading package from file mount.pp
semodule_link: loading package from file selinuxutil.pp
semodule_link: loading package from file sysnetwork.pp
semodule_link: loading package from file userdomain.pp
libsepol.sepol_module_package_read: invalid module in module package
(at section 0)
semodule_expand: Error in reading package from tmp/test.lnk
The error message is quite tricky to understand...
What's interesting is that the command succeeds when:
* removing lvm.pp from the list,
* removing "virt_manage_images(lvm_t)" from system/lvm.te [4],
* adding virt.pp and its required dependencies (mta.pp qemu.pp clock.pp),
* removing the two tunable_policy blocks from virt_manage_images
interface [5].
In short it seems an impossible-to-understand error message happens to
be printed when linking a policy module which defines an optional_policy
block that requires a tunable which is not defined (or defined in a
not-included module).
This is an already-fixed bug as using programs from SELinux Userspace
Release 2014-08-26-rc2 (with policycoreutils 2.4-rc2) works fine here.
Cheers,
Nicolas
[1] http://docs.travis-ci.com/user/ci-environment/
[2] http://packages.ubuntu.com/en/precise/checkpolicy
[3] http://packages.ubuntu.com/en/precise/libsepol1
[4]
https://github.com/TresysTechnology/refpolicy/blob/1743984bafd19d093d29923ce7717a15f2b2a965/policy/modules/system/lvm.te#L350
[5]
https://github.com/TresysTechnology/refpolicy-contrib/blob/21f961a147a9a08583825bdbe7cce43cf8fdc43d/virt.if#L1107
prev parent reply other threads:[~2014-09-10 19:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-07 21:29 [refpolicy] [PATCH] Fix minor typo in init.if Nicolas Iooss
2014-09-08 18:27 ` Dominick Grift
2014-09-08 22:46 ` Nicolas Iooss
2014-09-09 12:45 ` Christopher J. PeBenito
2014-09-09 13:28 ` Dominick Grift
2014-09-09 18:40 ` Christopher J. PeBenito
2014-09-09 18:51 ` Dominick Grift
2014-09-10 19:53 ` Nicolas Iooss [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5410AC49.8010102@m4x.org \
--to=nicolas.iooss@m4x.org \
--cc=refpolicy@oss.tresys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.