Bug 1586029 - SELinux is preventing /usr/sbin/named-pkcs11 from map access on the file /usr/share/GeoIP/GeoIPv6-initial.dat
Summary: SELinux is preventing /usr/sbin/named-pkcs11 from map access on the file /usr...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.6
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
Depends On:
TreeView+ depends on / blocked
Reported: 2018-06-05 10:57 UTC by Lukas Slebodnik
Modified: 2018-10-30 10:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-10-30 10:05:00 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 None None None 2018-10-30 10:05:28 UTC

Description Lukas Slebodnik 2018-06-05 10:57:16 UTC
SELinux is preventing /usr/sbin/named-pkcs11 from map access on the file /usr/share/GeoIP/GeoIPv6-initial.dat.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow named-pkcs11 to have map access on the GeoIPv6-initial.dat file
Then you need to change the label on /usr/share/GeoIP/GeoIPv6-initial.dat
# semanage fcontext -a -t FILE_TYPE '/usr/share/GeoIP/GeoIPv6-initial.dat'
where FILE_TYPE is one of the following: file_context_t, fonts_cache_t, fonts_t, ld_so_cache_t, ld_so_t, lib_t, locale_t, named_checkconf_exec_t, named_exec_t, prelink_exec_t, sssd_public_t, textrel_shlib_t.
Then execute:
restorecon -v '/usr/share/GeoIP/GeoIPv6-initial.dat'

*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that named-pkcs11 should be allowed map access on the GeoIPv6-initial.dat file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# ausearch -c 'named-pkcs11' --raw | audit2allow -M my-namedpkcs11
# semodule -i my-namedpkcs11.pp

Additional Information:
Source Context                system_u:system_r:named_t:s0
Target Context                system_u:object_r:usr_t:s0
Target Objects                /usr/share/GeoIP/GeoIPv6-initial.dat [ file ]
Source                        named-pkcs11
Source Path                   /usr/sbin/named-pkcs11
Port                          <Unknown>
Host                          c106.testrelm.test
Source RPM Packages           bind-pkcs11-9.9.4-61.el7.x86_64
Target RPM Packages           GeoIP-1.5.0-11.el7.x86_64
Policy RPM                    selinux-policy-3.13.1-201.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     c106.testrelm.test
Platform                      Linux c106.testrelm.test 3.10.0-894.el7.x86_64 #1
                              SMP Mon May 28 17:01:44 EDT 2018 x86_64 x86_64
Alert Count                   2
First Seen                    2018-06-05 06:19:51 EDT
Last Seen                     2018-06-05 06:21:07 EDT
Local ID                      b46c6074-9bfd-4c8d-84fe-19bd93c05eac

Raw Audit Messages
type=AVC msg=audit(1528194067.922:446): avc:  denied  { map } for  pid=24977 comm="named-pkcs11" path="/usr/share/GeoIP/GeoIPv6-initial.dat" dev="dm-0" ino=67191171 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file permissive=0

type=SYSCALL msg=audit(1528194067.922:446): arch=x86_64 syscall=mmap success=no exit=EACCES a0=0 a1=1971bb a2=1 a3=2 items=0 ppid=24974 pid=24977 auid=4294967295 uid=25 gid=25 euid=25 suid=25 fsuid=25 egid=25 sgid=25 fsgid=25 tty=(none) ses=4294967295 comm=named-pkcs11 exe=/usr/sbin/named-pkcs11 subj=system_u:system_r:named_t:s0 key=(null)

Hash: named-pkcs11,named_t,usr_t,file,map

Comment 6 errata-xmlrpc 2018-10-30 10:05:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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