This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2175516 - [RHEL 9] avc: denied { search } for pid=21104 comm="rpc.statd" name="net" dev="proc"
Summary: [RHEL 9] avc: denied { search } for pid=21104 comm="rpc.statd" name="net" ...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.2
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Nikola Knazekova
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-05 14:03 UTC by Zhi Li
Modified: 2023-08-21 18:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-21 18:49:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1663 0 None open Allow rpc.statd to search network sysctl dirs 2023-04-26 18:42:34 UTC
Red Hat Issue Tracker   RHEL-1558 0 None Migrated None 2023-08-23 14:44:57 UTC
Red Hat Issue Tracker RHELPLAN-150680 0 None None None 2023-03-05 14:04:43 UTC

Description Zhi Li 2023-03-05 14:03:29 UTC
Description of problem:

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
Memory protection checking:     actual (secure)
Max kernel policy version:      33
selinux-policy-38.1.8-1.el9.noarch
----
time->Wed Mar  1 08:23:45 2023
type=PROCTITLE msg=audit(1677677025.236:151): proctitle="/usr/sbin/rpc.statd"
type=SYSCALL msg=audit(1677677025.236:151): arch=c000003e syscall=257 success=no exit=-13 a0=ffffff9c a1=7ffc8ff7d990 a2=80100 a3=0 items=0 ppid=1 pid=21104 auid=4294967295 uid=29 gid=29 euid=29 suid=29 fsuid=29 egid=29 sgid=29 fsgid=29 tty=(none) ses=4294967295 comm="rpc.statd" exe="/usr/sbin/rpc.statd" subj=system_u:system_r:rpcd_t:s0 key=(null)
type=AVC msg=audit(1677677025.236:151): avc:  denied  { search } for  pid=21104 comm="rpc.statd" name="net" dev="proc" ino=34064 scontext=system_u:system_r:rpcd_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=0

Version-Release number of selected component (if applicable):
nfs-utils-2.5.4-18.el9.x86_64
selinux-policy-38.1.8-1.el9.noarch


How reproducible:
once


Actual results:
AVC denied

Expected results:
No AVC denied for defined operations

Additional info:
beaker job:
https://beaker.engineering.redhat.com/recipes/13475947#task156886730

Comment 1 Milos Malik 2023-03-06 15:22:54 UTC
Found 4 occurrences of the SELinux denial in the beaker job.

Comment 6 Nikola Knazekova 2023-06-14 14:28:40 UTC
PR: https://github.com/fedora-selinux/selinux-policy/pull/1740

Comment 12 Nikola Knazekova 2023-08-01 15:51:38 UTC
Hi,

Can you reproduce the issue in permissive mode with full auditing enabled?

Permissive mode:
# setenforce 0

Full audit:
1) Open the /etc/audit/rules.d/audit.rules file in an editor.
2) Remove the following line if it exists:
-a task,never
3) Add the following line to the end of the file:
-w /etc/shadow -p w
4) Restart the audit daemon:
  # service auditd restart
5) Re-run your scenario.
6) Collect AVC denials:
  # ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts today

Thank you

Comment 14 Zhi Li 2023-08-07 09:51:53 UTC
(In reply to Nikola Knazekova from comment #12)
> Hi,
> 
> Can you reproduce the issue in permissive mode with full auditing enabled?
> 
> Permissive mode:
> # setenforce 0
> 
> Full audit:
> 1) Open the /etc/audit/rules.d/audit.rules file in an editor.
> 2) Remove the following line if it exists:
> -a task,never
> 3) Add the following line to the end of the file:
> -w /etc/shadow -p w
> 4) Restart the audit daemon:
>   # service auditd restart
> 5) Re-run your scenario.
> 6) Collect AVC denials:
>   # ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts today
> 
> Thank you

The SELinux denial was not reproduced in loose mode with full auditing enabled, but this problem
did not find a valid trigger step, and it was not 100% reproducible in my test scenario.

[root@ibm-x3650m4-01-vm-11 ]# ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts today
<no matches>

Comment 18 RHEL Program Management 2023-08-21 18:47:15 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 19 RHEL Program Management 2023-08-21 18:49:54 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues.


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