Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2103352

Summary: Starting manually fapolicyd while the service is already running breaks the system
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: fapolicydAssignee: Radovan Sroka <rsroka>
Status: CLOSED ERRATA QA Contact: Dalibor Pospíšil <dapospis>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.6CC: dapospis, dareynol, gdelross, sgrubb
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: fapolicyd-1.1.3-12.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2160517 (view as bug list) Environment:
Last Closed: 2023-05-16 08:40:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2160517    

Description Renaud Métrich 2022-07-02 14:07:13 UTC
Description of problem:

When admins want to debug fapolicyd denies, they are tempted to just execute "fapolicyd --debug-deny" without stopping the service first.
Doing so leads to breaking the system as shown below:

1. Newer "fapolicyd --debug-deny" instance executes properly and starts listening to events

[...]
added / mount point
added /boot mount point
added /run/user/0 mount point
Starting to listen for events

2. Attempting a "ssh" to the system hangs forever

$ ssh vm-rhel8
--> hang

3. Trying to stop the "fapolicyd --debug-deny" instance using ^C, ^Z, etc. is not possible

It hangs after printing "Database pages in use":

^Cshutting down...
Inter-thread max queue depth 1
Allowed accesses: 2
Denied accesses: 0
Database max pages: 10240
Database pages in use: 7322 (71%)

4. Attempting a "ssh" to the system continues hanging forever

$ ssh vm-rhel8
--> hang

5. The system needs a hard reset to recover


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

fapolicyd-1.1-6.el8.x86_64

How reproducible:

Always, see above

Additional info:

I understand that running 2 "fapolicyd" is not possible, probably because it can have only 1 consumer from kernel's point of view.
If that's the case, we need to have some check to make sure it's not possible to start the second instance, similar to what is done for "auditd".

Comment 1 Steve Grubb 2022-08-03 15:58:30 UTC
This is fixed by upstream commit e10e539.

Comment 14 errata-xmlrpc 2023-05-16 08:40:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (fapolicyd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2871