Bug 1337968 - PCP SELinux issues
Summary: PCP SELinux issues
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-20 15:03 UTC by Marko Myllynen
Modified: 2017-04-11 04:51 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-11 04:51:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
f23-audit.log (9.23 KB, text/plain)
2016-06-21 09:16 UTC, Marko Myllynen
no flags Details
f24-audit.log (7.72 KB, text/plain)
2016-06-21 09:17 UTC, Marko Myllynen
no flags Details

Description Marko Myllynen 2016-05-20 15:03:32 UTC
Description of problem:
Latest Fedora 23 / SELinux / PCP is generating few AVCs:

# systemctl stop pmcd pmlogger pmie pmwebd
# restorecon -R / > /dev/null 2>&1
# systemctl start pmcd

type=AVC msg=audit(1463754714.313:316): avc:  denied  { net_admin } for  pid=2335 comm="pmcd" capability=12  scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:pcp_pmcd_t:s0 tclass=capability permissive=1
type=AVC msg=audit(1463754714.313:317): avc:  denied  { module_request } for  pid=2335 comm="pmcd" kmod="netdev-enp0s20u1" scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=system permissive=1

# systemctl start pmlogger

type=AVC msg=audit(1463754792.335:321): avc:  denied  { net_admin } for  pid=2353 comm="pmdalinux" capability=12  scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:pcp_pmcd_t:s0 tclass=capability permissive=1

# systemctl start pmie
# systemctl start pmwebd
# pminfo -f

type=AVC msg=audit(1463754891.663:349): avc:  denied  { search } for  pid=2345 comm="pmdaroot" name="docker" dev="sda9" ino=273270 scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:object_r:docker_var_lib_t:s0 tclass=dir permissive=1

(Omitted the getattr AVCs reported earlier at bug 1336211).

Comment 1 Lukas Vrabec 2016-06-20 09:04:01 UTC
Nathan, 
Are this AVC expected? 
type=AVC msg=audit(1463754714.313:316): avc:  denied  { net_admin } for  pid=2335 comm="pmcd" capability=12  scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:pcp_pmcd_t:s0 tclass=capability permissive=1

Comment 2 Nathan Scott 2016-06-20 23:59:07 UTC
(In reply to Lukas Vrabec from comment #1)
> Nathan, 
> Are this AVC expected? 

I suspect so, but I'm not 100% certain...

> type=AVC msg=audit(1463754714.313:316): avc:  denied  { net_admin } for 
> pid=2335 comm="pmcd" capability=12  scontext=system_u:system_r:pcp_pmcd_t:s0
> tcontext=system_u:system_r:pcp_pmcd_t:s0 tclass=capability permissive=1

Any idea which syscall this was triggered by?  (is it there in the log, but I'm blindly missing it?)

Thanks!

Comment 3 Lukas Vrabec 2016-06-21 08:22:15 UTC
Marko, 
We need SYSCALL part of AVCs.

Comment 4 Marko Myllynen 2016-06-21 09:15:49 UTC
Here are the steps I used to reproduce as root:

systemctl stop pmcd pmlogger pmie pmwebd
setenforce 0
echo > /var/log/audit/audit.log 
restorecon -R / > /dev/null 2>&1
systemctl start pmcd
systemctl start pmlogger
systemctl start pmie
systemctl start pmwebd
pminfo -f > /dev/null 2>&1

I'll attach the resulting audit.log from a F24 default installation and a longer lived F23 installation. Note that on F24 we see sys_ptrace but not net_admin, F24 is a KVM VM, F23 is a real laptop.

If something is still missing, please let me know.

Thanks.

Comment 5 Marko Myllynen 2016-06-21 09:16:28 UTC
Created attachment 1170166 [details]
f23-audit.log

Comment 6 Marko Myllynen 2016-06-21 09:17:01 UTC
Created attachment 1170167 [details]
f24-audit.log

Comment 7 Marko Myllynen 2016-10-03 07:34:04 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1381127 contains even more PCP AVCs.

Comment 8 Fedora End Of Life 2016-11-25 09:06:17 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. 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 '23'.

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 23 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 9 Fedora End Of Life 2016-12-20 20:38:25 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 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.

Comment 10 Fedora Update System 2017-02-18 15:37:13 UTC
pcp-3.11.8-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-201a3e0969

Comment 11 Fedora Update System 2017-02-18 15:38:34 UTC
pcp-3.11.8-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6b8f1de90c

Comment 12 Fedora Update System 2017-02-20 00:49:19 UTC
pcp-3.11.8-1.fc25 has been pushed to the Fedora 25 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-2017-201a3e0969

Comment 13 Fedora Update System 2017-02-20 05:21:49 UTC
pcp-3.11.8-1.fc24 has been pushed to the Fedora 24 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-2017-6b8f1de90c

Comment 14 Fedora Update System 2017-02-26 01:36:55 UTC
pcp-3.11.8-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2017-02-27 18:25:43 UTC
pcp-3.11.8-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3b25af744f

Comment 16 Fedora Update System 2017-03-01 02:51:07 UTC
pcp-3.11.8-2.fc24 has been pushed to the Fedora 24 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-2017-3b25af744f

Comment 17 Fedora Update System 2017-04-02 05:18:16 UTC
pcp-3.11.9-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c6c3616693

Comment 18 Fedora Update System 2017-04-03 02:23:34 UTC
pcp-3.11.9-1.fc24 has been pushed to the Fedora 24 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-2017-c6c3616693

Comment 19 Fedora Update System 2017-04-11 04:51:43 UTC
pcp-3.11.9-1.fc24 has been pushed to the Fedora 24 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.