Bug 1589555 - SELinux is preventing nmap from 'map' accesses on the packet_socket packet_socket.
Summary: SELinux is preventing nmap from 'map' accesses on the packet_socket packet_so...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: container-selinux
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:3a252861421b8e29e1fe557ac17...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-10 18:10 UTC by alex
Modified: 2018-06-28 14:07 UTC (History)
9 users (show)

Fixed In Version: container-selinux-2.65-1.gitbf5b26b.fc27 container-selinux-2.65-1.gitbf5b26b.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-28 13:33:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description alex 2018-06-10 18:10:50 UTC
Description of problem:
Trying to run nmap in docker
SELinux is preventing nmap from 'map' accesses on the packet_socket packet_socket.

This is running nmap in a CentOS 7 Docker container.

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

If you believe that nmap should be allowed map access on the packet_socket packet_socket 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 'nmap' --raw | audit2allow -M my-nmap
# semodule -X 300 -i my-nmap.pp

Additional Information:
Source Context                system_u:system_r:container_t:s0:c475,c564
Target Context                system_u:system_r:container_t:s0:c475,c564
Target Objects                packet_socket [ packet_socket ]
Source                        nmap
Source Path                   nmap
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-30.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.14-300.fc28.x86_64 #1 SMP Tue
                              Jun 5 16:23:44 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-06-10 13:42:26 CEST
Last Seen                     2018-06-10 13:42:26 CEST
Local ID                      f4028edb-d929-4dbd-a1d1-2a7d3c3b095e

Raw Audit Messages
type=AVC msg=audit(1528630946.90:776): avc:  denied  { map } for  pid=14186 comm="nmap" path="socket:[174572]" dev="sockfs" ino=174572 scontext=system_u:system_r:container_t:s0:c475,c564 tcontext=system_u:system_r:container_t:s0:c475,c564 tclass=packet_socket permissive=0


Hash: nmap,container_t,container_t,packet_socket,map

Version-Release number of selected component:
selinux-policy-3.14.1-30.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.16.14-300.fc28.x86_64
type:           libreport

Comment 1 Daniel Walsh 2018-06-11 12:58:02 UTC
Fixed in container-selinux-2.65-1.gitbf5b26b

Comment 2 Fedora Update System 2018-06-18 14:17:50 UTC
container-selinux-2.65-1.gitbf5b26b.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-33f2eda222

Comment 3 Fedora Update System 2018-06-18 14:18:05 UTC
container-selinux-2.65-1.gitbf5b26b.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-352f18aa25

Comment 4 Fedora Update System 2018-06-19 16:35:47 UTC
container-selinux-2.65-1.gitbf5b26b.fc27 has been pushed to the Fedora 27 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-2018-352f18aa25

Comment 5 Fedora Update System 2018-06-19 16:56:30 UTC
container-selinux-2.65-1.gitbf5b26b.fc28 has been pushed to the Fedora 28 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-2018-33f2eda222

Comment 6 Fedora Update System 2018-06-28 13:33:40 UTC
container-selinux-2.65-1.gitbf5b26b.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2018-06-28 14:07:05 UTC
container-selinux-2.65-1.gitbf5b26b.fc28 has been pushed to the Fedora 28 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.