Bug 1483670 - avc denial when changing smp_affinity_list
Summary: avc denial when changing smp_affinity_list
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 26
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-21 16:52 UTC by Milos Malik
Modified: 2018-05-29 12:24 UTC (History)
12 users (show)

Fixed In Version:
Clone Of: 1483550
Environment:
Last Closed: 2018-05-29 12:24:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Milos Malik 2017-08-21 16:52:51 UTC
+++ This bug was initially created as a clone of Bug #1483550 +++

Description of problem:

I'm getting a SELinux denial when my test script runs:

echo 0 > /proc/irq/em1/smp_affinity_list

or using tuna:

tuna --irqs=31 --cpus=0 --move


The audit.log shows:

time->Fri Aug 18 17:42:37 2017
type=PROCTITLE msg=audit(1503092557.985:76): proctitle=2F62696E2F7368002D63006563686F20223022203E2F70726F632F6972712F35382F736D705F616666696E6974795F6C697374
type=SYSCALL msg=audit(1503092557.985:76): arch=c000003e syscall=2 success=yes exit=3 a0=ec9d40 a1=241 a2=1b6 a3=0 items=0 ppid=14390 pid=22048 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="sh" exe="/usr/bin/bash" subj=system_u:system_r:unconfined_service_t:s0 key=(null)
type=AVC msg=audit(1503092557.985:76): avc:  denied  { associate } for  pid=22048 comm="sh" name="smp_affinity_list" scontext=system_u:object_r:sysctl_irq_t:s0 tcontext=system_u:object_r:proc_t:s0 tclass=filesystem permissive=0


Version-Release number of selected component (if applicable):

[root@localhost ~]# rpm -qa selinux-policy
selinux-policy-3.13.1-166.el7.noarch
[root@localhost ~]# rpm -qa selinux-policy-targeted
selinux-policy-targeted-3.13.1-166.el7.noarch


How reproducible:
Everytime I write to smp_affinity_list

Steps to Reproduce:
1. write to smp_affinity_list
2.
3.

Actual results:
AVC denial

Expected results:
no denial


--- Additional comment from Milos Malik on 2017-08-21 07:57:50 EDT ---

Following SELinux denial appeared in enforcing mode:
----
type=PROCTITLE msg=audit(08/21/2017 07:55:50.160:286) : proctitle=/usr/bin/python /usr/bin/tuna --irqs=28 --cpus=0 --move 
type=SYSCALL msg=audit(08/21/2017 07:55:50.160:286) : arch=x86_64 syscall=open success=yes exit=3 a0=0x1441770 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=9447 pid=9491 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=2 comm=tuna exe=/usr/bin/python2.7 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(08/21/2017 07:55:50.160:286) : avc:  denied  { associate } for  pid=9491 comm=tuna name=smp_affinity scontext=unconfined_u:object_r:sysctl_irq_t:s0 tcontext=system_u:object_r:proc_t:s0 tclass=filesystem permissive=0 
----

The same command executed in permissive mode triggered following SELinux denial:
----
type=PROCTITLE msg=audit(08/21/2017 07:56:54.840:288) : proctitle=/usr/bin/python /usr/bin/tuna --irqs=28 --cpus=0 --move 
type=SYSCALL msg=audit(08/21/2017 07:56:54.840:288) : arch=x86_64 syscall=open success=yes exit=3 a0=0x2346770 a1=O_WRONLY|O_CREAT|O_TRUNC a2=0666 a3=0x24 items=0 ppid=9447 pid=9495 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=2 comm=tuna exe=/usr/bin/python2.7 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(08/21/2017 07:56:54.840:288) : avc:  denied  { associate } for  pid=9495 comm=tuna name=smp_affinity scontext=unconfined_u:object_r:sysctl_irq_t:s0 tcontext=system_u:object_r:proc_t:s0 tclass=filesystem permissive=1 
----

Comment 1 Milos Malik 2017-08-21 16:54:28 UTC
selinux-policy-3.13.1-272.fc27.noarch
selinux-policy-devel-3.13.1-272.fc27.noarch
selinux-policy-doc-3.13.1-272.fc27.noarch
selinux-policy-minimum-3.13.1-272.fc27.noarch
selinux-policy-mls-3.13.1-272.fc27.noarch
selinux-policy-sandbox-3.13.1-272.fc27.noarch
selinux-policy-targeted-3.13.1-272.fc27.noarch
 python-linux-procfs-0.4.10-2.fc26.noarch	Linux /proc abstraction classes
 python-schedutils-0.5-2.fc26.x86_64	Linux scheduler python bindings
 python2-ethtool-0.13-1.fc26.x86_64	Python module to interface with ethtool
 tuna-0.13.1-2.fc26.noarch	Application tuning GUI & command line utility

Comment 2 Fedora End Of Life 2018-05-03 08:05:10 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2018-05-29 12:24:40 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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