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 .
Bug 2181514 - RFE: protect the system from hanging through protecting fapolicyd
Summary: RFE: protect the system from hanging through protecting fapolicyd
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: fapolicyd
Version: 8.7
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Radovan Sroka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On: 2181968
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-24 10:55 UTC by Renaud Métrich
Modified: 2023-08-16 14:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-16 14:58:18 UTC
Type: Story
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-1368 0 None None None 2023-08-16 14:58:18 UTC
Red Hat Issue Tracker RHELPLAN-153015 0 None None None 2023-03-24 10:57:16 UTC
Red Hat Issue Tracker SECENGSP-5125 0 None None None 2023-03-24 10:57:26 UTC

Description Renaud Métrich 2023-03-24 10:55:37 UTC
Description of problem:

When stracing fapolicyd or sending a SIGSTOP signal to fapolicyd, the system hangs and needs to be forcibly rebooted.

Assuming SELinux is enabled and in Enforcing (which is the default), it should be very easy to avoid such system hang by protecting the process with some new rule such as below:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
(neverallow domain fapolicyd_t (process (sigstop ptrace)))
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Version-Release number of selected component (if applicable):

fapolicyd-selinux-1.1.3-8.el8_7.1.noarch

How reproducible:

Always

Steps to Reproduce:
1. Send SIGSTOP as root/unconfined

Actual results:

System unusable until rebooted forcibly

Expected results:

Cannot send SIGSTOP

Additional info:

Unfortunately there seems to be something in SELinux that doesn't take "neverallow" rules into account.
If I add such rule, "sesearch --neverallow" still doesn't list anything, weird:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# bunzip2 -c /var/lib/selinux/targeted/active/modules/400/protect_fapolicyd/cil 
(neverallow domain fapolicyd_t (process (sigstop ptrace)))

--> rule is present and loaded in policy

# sesearch --neverallow
--> nothing
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Comment 2 Radovan Sroka 2023-08-16 14:45:15 UTC
This bug is going to be migrated.

Contact point for migration questions or issues: rsroka
Guidance for Bugzilla users to test their Jira account or create one if needed:

https://redhat.service-now.com/help?id=kb_article_view&sysparm_article=KB0016394
https://redhat.service-now.com/help?id=kb_article_view&sysparm_article=KB0016694
https://redhat.service-now.com/help?id=kb_article_view&sysparm_article=KB0016774


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