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 1901984 - new tcsd selinux denial with trousers-0.3.15-1.el8
Summary: new tcsd selinux denial with trousers-0.3.15-1.el8
Keywords:
Status: CLOSED DUPLICATE of bug 1898694
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks: 1882414
TreeView+ depends on / blocked
 
Reported: 2020-11-26 14:37 UTC by Karel Srot
Modified: 2020-12-08 06:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-30 20:14:03 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Karel Srot 2020-11-26 14:37:01 UTC
Description of problem:

With new trousers-0.3.15-1.el8, during the tcsd start the following denial appears:

selinux-policy-3.14.3-56.el8.noarch
----
time->Thu Nov 26 13:00:04 2020
type=PROCTITLE msg=audit(1606395604.084:1317): proctitle="/sbin/tcsd"
type=SYSCALL msg=audit(1606395604.084:1317): arch=c000003e syscall=106 success=no exit=-1 a0=3b a1=0 a2=7ffd4f01fb60 a3=f0000000 items=0 ppid=1 pid=25550 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="tcsd" exe="/usr/sbin/tcsd" subj=system_u:system_r:tcsd_t:s0 key=(null)
type=AVC msg=audit(1606395604.084:1317): avc:  denied  { setgid } for  pid=25550 comm="tcsd" capability=6  scontext=system_u:system_r:tcsd_t:s0 tcontext=system_u:system_r:tcsd_t:s0 tclass=capability permissive=0

This is due to a new setgid call as can be seen in sources
https://sourceforge.net/p/trousers/trousers/ci/master/tree/src/tcsd/svrside.c#l475

There are no other denial even in permissive mode, at least in my test case.

Please address this bug in 8.4.

Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-56.el8.noarch

How reproducible:
always.
Run 
'systemctl start tcsd' on a system with TPM device

Actual results:
AVC present

Expected results:
No AVC present

Comment 1 Zdenek Pytela 2020-11-26 16:40:37 UTC
This bug will be evaluated for inclusion into one of the next minor product updates. If you want to expedite delivering the fix, please include business justification.

Comment 3 Karel Srot 2020-11-26 16:48:04 UTC
Since I am not really tcsd user, I am forwarding the needinfo to the developer. Jerry, are you able to provide additional justification or do you think we can postpone a fix to a future release?

Comment 5 Jerry Snitselaar 2020-11-26 22:30:12 UTC
I have another bug open bz 1898694 to selinux-policy to add a setgid capability for tcsd. I noticed the issue when looking at a fix for a coverity scan issue.

Comment 6 Jerry Snitselaar 2020-11-26 22:31:04 UTC
My plan was for the trousers update to go into 8.4

Comment 7 Milos Malik 2020-11-27 07:53:31 UTC
To have a complete picture, here is the only SELinux denial which appears in permissive mode is:
----
type=PROCTITLE msg=audit(11/27/2020 02:50:32.321:358) : proctitle=/sbin/tcsd 
type=SYSCALL msg=audit(11/27/2020 02:50:32.321:358) : arch=x86_64 syscall=setgid success=yes exit=0 a0=tss a1=0x0 a2=0x7fffe9ec08c0 a3=0xf0000000 items=0 ppid=1 pid=12358 auid=unset uid=root gid=tss euid=root suid=root fsuid=root egid=tss sgid=tss fsgid=tss tty=(none) ses=unset comm=tcsd exe=/usr/sbin/tcsd subj=system_u:system_r:tcsd_t:s0 key=(null) 
type=AVC msg=audit(11/27/2020 02:50:32.321:358) : avc:  denied  { setgid } for  pid=12358 comm=tcsd capability=setgid  scontext=system_u:system_r:tcsd_t:s0 tcontext=system_u:system_r:tcsd_t:s0 tclass=capability permissive=1 
----

Comment 8 Milos Malik 2020-11-27 09:04:04 UTC
I believe this bug is a duplicate of BZ#1898694.

Comment 10 Zdenek Pytela 2020-11-30 20:14:03 UTC

*** This bug has been marked as a duplicate of bug 1898694 ***


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