Bug 1371512 - SELinux is preventing makepkg from 'send' accesses on the message Unknown.
Summary: SELinux is preventing makepkg from 'send' accesses on the message Unknown.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:de6f5e3697f756402f52dc160aa...
Depends On:
Blocks: 1372677
TreeView+ depends on / blocked
 
Reported: 2016-08-30 11:46 UTC by Laurent Rineau
Modified: 2016-09-29 22:52 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-158.24.fc23
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1372677 (view as bug list)
Environment:
Last Closed: 2016-09-29 22:52:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Laurent Rineau 2016-08-30 11:46:07 UTC
Description of problem:
I tried to build a Docker image with a Dockerfile that uses makepkg, from ArchLinux.
SELinux is preventing makepkg from 'send' accesses on the message Unknown.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that makepkg should be allowed send access on the Unknown msg by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'makepkg' --raw | audit2allow -M my-makepkg
# semodule -X 300 -i my-makepkg.pp

Additional Information:
Source Context                system_u:system_r:svirt_lxc_net_t:s0:c31,c241
Target Context                system_u:object_r:svirt_lxc_net_t:s0:c31,c241
Target Objects                Unknown [ msg ]
Source                        makepkg
Source Path                   makepkg
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-158.21.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.6.6-200.fc23.x86_64 #1 SMP Wed
                              Aug 10 23:13:35 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-08-30 13:09:45 CEST
Last Seen                     2016-08-30 13:09:45 CEST
Local ID                      35eb2690-7ca9-4a0d-9743-491a709f2a82

Raw Audit Messages
type=AVC msg=audit(1472555385.413:2113): avc:  denied  { send } for  pid=40553 comm="makepkg" key=1722255375  scontext=system_u:system_r:svirt_lxc_net_t:s0:c31,c241 tcontext=system_u:object_r:svirt_lxc_net_t:s0:c31,c241 tclass=msg permissive=0


Hash: makepkg,svirt_lxc_net_t,svirt_lxc_net_t,msg,send

Version-Release number of selected component:
selinux-policy-3.13.1-158.21.fc23.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.6.6-200.fc23.x86_64
type:           libreport

Comment 1 Laurent Rineau 2016-08-30 11:48:04 UTC
The end of logs of the build attempt was:

==> Entering fakeroot environment...
libfakeroot, when sending message: Permission denied

Comment 2 Daniel Walsh 2016-08-30 19:46:03 UTC
https://github.com/fedora-selinux/selinux-policy/pull/151

We need to get this fix into all Fedora and RHEL7 packages.

Comment 3 Daniel Walsh 2016-08-30 19:47:55 UTC
Laurent add this permissions by hand for now using audit2allow.

grep msg /var/log/audit/audit.log | audit2allow -M mymsg
semodule -i mymsg.pp

Comment 4 Fedora Update System 2016-09-16 08:37:00 UTC
selinux-policy-3.13.1-158.24.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f739cc7524

Comment 5 Fedora Update System 2016-09-17 00:52:44 UTC
selinux-policy-3.13.1-158.24.fc23 has been pushed to the Fedora 23 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-2016-f739cc7524

Comment 6 Fedora Update System 2016-09-29 22:52:03 UTC
selinux-policy-3.13.1-158.24.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


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