Bug 1058470
| Summary: | Policy modules created by audit2allow can't be loaded | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Alan Stern <stern> | ||||
| Component: | policycoreutils | Assignee: | Daniel Walsh <dwalsh> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 20 | CC: | dwalsh, mgrepl | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-02-21 21:26:36 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: |
|
||||||
As root execute semodule -r nsplugin This should have been removed on an update. Also could you execute rpm -qf /etc/selinux/targeted/modules/active/modules/*.pp| grep "not owned" To see if you have any other old policy modules. In an attempt to straighten things out, I uninstalled and reinstalled the selinux-policy and selinux-policy-targeted packages. The machine has not been rebooted since the reinstallation, so it is currently running with selinux disabled. I won't be able to reboot it or remove the nsplugin module until next week. In the meanwhile, that rpm command gives: file /etc/selinux/targeted/modules/active/modules/nsplugin.pp is not owned by any package file /etc/selinux/targeted/modules/active/modules/qemu.pp is not owned by any package Did you do an upgrade to F20? There is no need to add my name to the CC list. Since I am the bug reporter, all the transactions are copied to me anyway. Yes, I did an upgrade from F18 directly to F20. Alan remove those two files. And then policy should work fine. commit 0474cb579e07b7baf30dfe5b03019e11a6ea64c2 in git to the selinux-policy.spec file will make sure these two modules are removed on upgrades. I ran "semodule -r nsplugin qemu", and that has fixed the problem. Thanks for the help. PS: Daniel, I may want to ask you a few more questions about selinux, things that aren't really bugzilla material. Will it be okay to email you questions directly? Everyone else does. :^) |
Created attachment 856258 [details] AVC violations extracted from journalctl for sshd Description of problem: An selinux module package created by audit2allow can't be loaded. semodule -i fails, claiming that the module contains a duplicate declaration of nsplugin_rw_t. Version-Release number of selected component (if applicable): policycoreutils-2.2.5-1.fc20.i686 policycoreutils-python-2.2.5-1.fc20.i686 How reproducible: Always Steps to Reproduce: (sshd-avc is attached to the bug report) 1. audit2allow -i sshd-avc -M sshdAS 2. semodule -i sshdAS.pp Actual results: # semodule -i sshdAS.pp libsepol.scope_copy_callback: nsplugin: Duplicate declaration in module: type/attribute nsplugin_rw_t libsemanage.semanage_link_sandbox: Link packages failed semodule: Failed! Expected results: The module should have been loaded into the kernel. Additional info: Note that I am not running sshd from the sshd.service script in the usual way. The sshdAS.te file generated by audit2allow says: module sshdAS 1.0; require { type sshd_t; type initrc_t; class tcp_socket { getopt getattr setopt }; } #============= sshd_t ============== allow sshd_t initrc_t:tcp_socket { getopt getattr setopt };