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 2138082 - fapolicyd not creating audit events with deny_audit rules
Summary: fapolicyd not creating audit events with deny_audit rules
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: fapolicyd
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Radovan Sroka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-27 06:51 UTC by Daniel Reynolds
Modified: 2022-11-14 12:47 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-14 12:47:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-137711 0 None None None 2022-10-27 07:28:54 UTC
Red Hat Issue Tracker SECENGSP-4855 0 None None None 2022-10-27 07:28:57 UTC

Description Daniel Reynolds 2022-10-27 06:51:30 UTC
Description of problem:
fapolicyd not creating audit events with deny_audit rules

Version-Release number of selected component (if applicable):
- audit-3.0.7-101.el9_0.2.x86_64
- fapolicyd-1.1-103.el9_0.1.x86_64
- Red Hat Enterprise Linux release 9.0 (Plow)

How reproducible: always


Steps to Reproduce:
1. Install and enable fapolicyd

    # sudo dnf install fapolicyd
    # sudo systemctl start fapolicyd
    # sudo systemctl enable fapolicyd

2. Confirm deny rules are 'deny_audit'.

    $ sudo fapolicyd-cli --list
    -> %languages=application/x-bytecode.ocaml,application/x-bytecode.python,application/java-archive,text/x-java,application/x-java-applet,application/javascript,text/javascript,text/x-awk,text/x-gawk,text/x-lisp,application/x-elc,text/x-lua,text/x-m4,text/x-nftables,text/x-perl,text/x-php,text/x-python,text/x-R,text/x-ruby,text/x-script.guile,text/x-tcl,text/x-luatex,text/x-systemtap
    1. allow perm=any uid=0 : dir=/var/tmp/
    2. allow perm=any uid=0 trust=1 : all
    3. allow perm=open exe=/usr/bin/rpm : all
    4. allow perm=open exe=/usr/bin/python3.9 comm=dnf : all
    5. deny_audit perm=any pattern=ld_so : all
    6. deny_audit perm=any all : ftype=application/x-bad-elf
    7. allow perm=open all : ftype=application/x-sharedlib trust=1
    8. deny_audit perm=open all : ftype=application/x-sharedlib
    9. allow perm=execute all : trust=1
    10. allow perm=open all : ftype=%languages trust=1
    11. deny_audit perm=any all : ftype=%languages
    12. allow perm=any all : ftype=text/x-shellscript
    13. deny_audit perm=execute all : all
    14. allow perm=open all : all

3. Create an unauthorised executable.

    cp /usr/bin/ls /tmp/ls

4. Run the following as non root user.

    $ while :; do sleep 1; /tmp/ls; done
    bash: /tmp/ls: Operation not permitted
    bash: /tmp/ls: Operation not permitted
    ...

Actual results:

    On inspection no audit messages are generated that match denies.


Expected results:

    Audit messages are generated for denies.

Additional info:
- This case is raised for a Red Hat Consultant.
- Consultant and project will be appended in a private comment.

Comment 2 Daniel Reynolds 2022-10-27 06:57:43 UTC
The original case is for RHEL 9 Edge.  I have reproduced this on RHEL 9.  If I need to raise another BZ for RHEL9 Edge, please let me know.


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