RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1483550 - avc denial when changing smp_affinity_list
Summary: avc denial when changing smp_affinity_list
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.4-Alt
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 7.4-Alt
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks: 1440030 1485909
TreeView+ depends on / blocked
 
Reported: 2017-08-21 11:42 UTC by Jan Tluka
Modified: 2017-11-09 11:35 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1483670 1485909 (view as bug list)
Environment:
Last Closed: 2017-11-09 11:35:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 158897 0 None None None 2017-09-19 14:57:59 UTC
Red Hat Product Errata RHEA-2017:3179 0 normal SHIPPED_LIVE selinux-policy enhancement update 2017-11-09 16:14:20 UTC

Description Jan Tluka 2017-08-21 11:42:45 UTC
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 info:

This ran fine on RHEL-7.4

Comment 2 Milos Malik 2017-08-21 11:57:50 UTC
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 6 errata-xmlrpc 2017-11-09 11:35:18 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.

https://access.redhat.com/errata/RHEA-2017:3179


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