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 2215526 - fapolicyd still allows execution of a program after "untrusting" it
Summary: fapolicyd still allows execution of a program after "untrusting" it
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: fapolicyd
Version: 9.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Radovan Sroka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On: 2181472
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-16 11:21 UTC by Radovan Sroka
Modified: 2023-06-16 12:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2181472
Environment:
Last Closed: 2023-06-16 12:03:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-622 0 None None None 2023-06-16 12:03:10 UTC
Red Hat Issue Tracker RHELPLAN-160064 0 None None None 2023-06-16 11:23:20 UTC
Red Hat Issue Tracker SECENGSP-5254 0 None None None 2023-06-16 11:23:27 UTC

Description Radovan Sroka 2023-06-16 11:21:56 UTC
+++ This bug was initially created as a clone of Bug #2181472 +++

Description of problem:

Removing a program from trust database, then reloading fapolicyd, has no effect. The program can still execute, until fapolicyd is restarted, as shown in the example below:

Sample program:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[user@vm-fapolicy8 ~]$ cat > hello.c << EOF
#include <stdio.h>
int main(int argc, char *argv[])
{
  printf("Hello!\n");
  return 0;
}
EOF

[user@vm-fapolicy8 ~]$ gcc -o hello hello.c
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Program initially untrusted:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[user@vm-fapolicy8 ~]$ ./hello
-bash: ./hello: Operation not permitted
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Trusting the program:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[root@vm-fapolicy8 ~]# fapolicyd-cli -f add /home/user/hello
[root@vm-fapolicy8 ~]# fapolicyd-cli -u
Fapolicyd was notified
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Program now trusted:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[user@vm-fapolicy8 ~]$ ./hello
Hello!
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Untrusting the program:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[root@vm-fapolicy8 ~]# fapolicyd-cli -f delete /home/user/hello
[root@vm-fapolicy8 ~]# fapolicyd-cli -u
Fapolicyd was notified
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Program untrusted again: (STILL EXECUTES!)
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[user@vm-fapolicy8 ~]$ ./hello
Hello!
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Looks like a cache issue.

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

fapolicyd-1.1.3-8.el8_7.1.x86_64

How reproducible:

Always, see above.

--- Additional comment from Renaud Métrich on 2023-03-24 13:56:50 UTC ---

I checked with "integrity = sha256", this doesn't help (just in case this was related to BZ #2181544).

--- Additional comment from Radovan Sroka on 2023-03-24 14:08:38 UTC ---

(In reply to Renaud Métrich from comment #1)
> I checked with "integrity = sha256", this doesn't help (just in case this
> was related to BZ #2181544).

This is basically duplicate of BZ #2179701. Different symptoms but the same source. I want to keep both bugzillas open for now.

Comment 1 Radovan Sroka 2023-06-16 12:00:31 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

Comment 2 Radovan Sroka 2023-06-16 12:03:11 UTC
The bugzilla has been migrated to Jira and is now available in the RHEL ticket, where it will continue its lifecycle.


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