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 1868415 - allow chronyc_t self:tcp_socket create; during sosreport call
Summary: allow chronyc_t self:tcp_socket create; during sosreport call
Keywords:
Status: CLOSED DUPLICATE of bug 1805931
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Pytela
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-12 15:10 UTC by Alois Mahdal
Modified: 2020-08-12 15:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-12 15:15:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alois Mahdal 2020-08-12 15:10:53 UTC
Description of problem
======================

During sosreport generation shortly after installing RHEL-7, we get these AVC's:

    SELinux status:                 enabled
    SELinuxfs mount:                /sys/fs/selinux
    SELinux root directory:         /etc/selinux
    Loaded policy name:             targeted
    Current mode:                   enforcing
    Mode from config file:          enforcing
    Policy MLS status:              enabled
    Policy deny_unknown status:     allowed
    Max kernel policy version:      31
    selinux-policy-3.13.1-268.el7.noarch
    ----
    time->Wed Aug 12 16:27:17 2020
    type=PROCTITLE msg=audit(1597238837.655:50): proctitle=6368726F6E796300747261636B696E67
    type=SYSCALL msg=audit(1597238837.655:50): arch=c000003e syscall=41 success=no exit=-13 a0=2 a1=80001 a2=0 a3=2e322e32332e3833 items=0 ppid=15645 pid=15647 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="chronyc" exe="/usr/bin/chronyc" subj=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 key=(null)
    type=AVC msg=audit(1597238837.655:50): avc:  denied  { create } for  pid=15647 comm="chronyc" scontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tclass=tcp_socket permissive=0
    ----
    time->Wed Aug 12 16:27:17 2020
    type=PROCTITLE msg=audit(1597238837.771:51): proctitle=6368726F6E796300736F757263657374617473
    type=SYSCALL msg=audit(1597238837.771:51): arch=c000003e syscall=41 success=no exit=-13 a0=2 a1=80001 a2=0 a3=2e322e32332e3833 items=0 ppid=15659 pid=15661 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="chronyc" exe="/usr/bin/chronyc" subj=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 key=(null)
    type=AVC msg=audit(1597238837.771:51): avc:  denied  { create } for  pid=15661 comm="chronyc" scontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tclass=tcp_socket permissive=0
    ----
    time->Wed Aug 12 16:27:17 2020
    type=PROCTITLE msg=audit(1597238837.787:52): proctitle=6368726F6E796300736F757263657374617473
    type=SYSCALL msg=audit(1597238837.787:52): arch=c000003e syscall=41 success=no exit=-13 a0=2 a1=80001 a2=0 a3=2e322e32332e3733 items=0 ppid=15659 pid=15661 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="chronyc" exe="/usr/bin/chronyc" subj=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 key=(null)
    type=AVC msg=audit(1597238837.787:52): avc:  denied  { create } for  pid=15661 comm="chronyc" scontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tclass=tcp_socket permissive=0

audit2allow says:

    allow chronyc_t self:tcp_socket create;


Version-Release number of selected component
============================================

selinux-policy-3.13.1-268.el7.noarch
sos-3.9-2.el7.noarch
chrony-3.4-1.el7.x86_64


How reproducible
================

Seen once in many runs.


Steps to Reproduce
==================

My guess is that it should be reproducible like this:

 1. Install RHEL-7.9-20200810.2 Server x86_64
 1. reboot
 2. run sosreport


Actual results
==============

AVC


Expected results
================

no AVC


Additional info
===============

This happened in early stage of our integration test job, before any
testing has actually started.

What we do as preparation is that we manipulate .repo files (in this
case, to no effect), run yum update (also no effect this time), reboot
and then start some OS diag including sosreport.

This is same across many integration and system tests, and
we've seen this only once.  I've conared this to a system test
https://beaker.engineering.redhat.com/jobs/4489864 where the preparation
is the same, but no AVC was seen during the a system test.

Comment 2 Alois Mahdal 2020-08-12 15:13:49 UTC
probably dupe of Bug 1805931

Comment 3 Lukas Vrabec 2020-08-12 15:15:42 UTC

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

Comment 4 Alois Mahdal 2020-08-12 15:32:48 UTC
(In reply to Alois Mahdal from comment #2)
> probably dupe of Bug 1805931

...except this time it's with 7.9; newest compose.  (The other one was found with 7.6.)

Still not 100% reproucible, though.  There's lot of tests like this we're about to run in following weeks/months so we can get back to it if it's more common.


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