Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1687616 - SELinux is preventing /usr/sbin/xtables-legacy-multi from 'execute' accesses on the file /sbin/modprobe.
Summary: SELinux is preventing /usr/sbin/xtables-legacy-multi from 'execute' accesses ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:26641e6c29829ebf932a157b26d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-11 22:41 UTC by Lukas Slebodnik
Modified: 2019-04-05 17:58 UTC (History)
15 users (show)

Fixed In Version: selinux-policy-3.14.4-8.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-05 17:58:50 UTC


Attachments (Terms of Use)

Description Lukas Slebodnik 2019-03-11 22:41:34 UTC
Description of problem:
I restarted few services with a script.
SELinux is preventing /usr/sbin/xtables-legacy-multi from 'execute' accesses on the file /sbin/modprobe.

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

If you believe that xtables-legacy-multi should be allowed execute access on the modprobe file 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 'ip6tables' --raw | audit2allow -M my-ip6tables
# semodule -X 300 -i my-ip6tables.pp

Additional Information:
Source Context                system_u:system_r:iptables_t:s0
Target Context                system_u:object_r:kmod_exec_t:s0
Target Objects                /sbin/modprobe [ file ]
Source                        ip6tables
Source Path                   /usr/sbin/xtables-legacy-multi
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           iptables-1.8.0-5.fc30.x86_64
Target RPM Packages           kmod-26-3.fc31.x86_64
Policy RPM                    selinux-policy-3.14.4-3.fc31.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.20.14-200.fc29.x86_64 #1 SMP Tue
                              Mar 5 19:55:32 UTC 2019 x86_64 x86_64
Alert Count                   12
First Seen                    2019-03-11 23:38:41 CET
Last Seen                     2019-03-11 23:38:41 CET
Local ID                      e457d045-88b0-431d-afd8-4eb1e1f95aec

Raw Audit Messages
type=AVC msg=audit(1552343921.401:2325): avc:  denied  { execute } for  pid=24742 comm="ip6tables" name="kmod" dev="dm-1" ino=14333268 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:kmod_exec_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1552343921.401:2325): arch=x86_64 syscall=execve success=no exit=EACCES a0=55ece356d260 a1=7ffcebd0b040 a2=7ffcebd0b448 a3=63 items=1 ppid=24741 pid=24742 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=ip6tables exe=/usr/sbin/xtables-legacy-multi subj=system_u:system_r:iptables_t:s0 key=(null)

type=CWD msg=audit(1552343921.401:2325): cwd=/

type=PATH msg=audit(1552343921.401:2325): item=0 name=/sbin/modprobe inode=14333268 dev=00:29 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:kmod_exec_t:s0 nametype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0

Hash: ip6tables,iptables_t,kmod_exec_t,file,execute

Version-Release number of selected component:
selinux-policy-3.14.4-3.fc31.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         4.20.14-200.fc29.x86_64
type:           libreport

Comment 1 Lukas Slebodnik 2019-03-11 23:03:27 UTC
It happened as part of starting NetworkManager

Mar 11 23:55:54 host.example.com systemd[1]: Starting Network Manager...
Mar 11 23:55:54 host.example.com audit[1403]: AVC avc:  denied  { execute } for  pid=1403 comm="ip6tables" name="kmod" dev="dm-1" ino=14333268 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:kmod_exec_t:s0 tclass=file permissive=0
Mar 11 23:55:54 host.example.com audit[1403]: SYSCALL arch=c000003e syscall=59 success=no exit=-13 a0=5608befc8260 a1=7ffe42072d00 a2=7ffe42073100 a3=63 items=1 ppid=1402 pid=1403 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ip6tables" exe="/usr/sbin/xtables-legacy-multi" subj=system_u:system_r:iptables_t:s0 key=(null)
Mar 11 23:55:54 host.example.com audit: CWD cwd="/"
Mar 11 23:55:54 host.example.com audit: PATH item=0 name="/sbin/modprobe" inode=14333268 dev=00:29 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:kmod_exec_t:s0 nametype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0
Mar 11 23:55:54 host.example.com audit: PROCTITLE proctitle=2F7573722F7362696E2F6970367461626C6573002D77002D4C002D6E
Mar 11 23:55:54 host.example.com NetworkManager[1399]: <info>  [1552344954.7540] NetworkManager (version 1.16.0-0.1.fc31) is starting... (for the first time)
Mar 11 23:55:54 host.example.com NetworkManager[1399]: <info>  [1552344954.7544] Read config: /etc/NetworkManager/NetworkManager.conf

Comment 2 Lukas Vrabec 2019-03-12 08:08:18 UTC
commit f36721500c5e2596fc4157cfab3b88e3b1bda7a8
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Mon Mar 11 09:52:56 2019 +0100

    Fix interface modutils_run_kmod() where was used old interface modutils_domtrans_insmod instead of new one modutils_domtrans_kmod()


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