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 1919402 - missing compat of pam_tty_audit.so / selinux / systemd
Summary: missing compat of pam_tty_audit.so / selinux / systemd
Keywords:
Status: CLOSED DUPLICATE of bug 1861771
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-22 19:22 UTC by Leon Fauster
Modified: 2022-01-05 13:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-22 20:05:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Leon Fauster 2021-01-22 19:22:12 UTC
## Description of problem:

Configuring RHEL8 as described here:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/sec-configuring_pam_for_auditing#sec-configuring_pam_tty_audit

resulted in AVC/Deny and filled log files with

time->Mon Jan 11 10:05:01 2021
type=PROCTITLE msg=audit(1610355901.401:35527): proctitle="(systemd)"
type=SYSCALL msg=audit(1610355901.401:35527): arch=c000003e syscall=46 success=yes exit=16 a0=b a1=7ffd25f88150 a2=0 a3=0 items=0 ppid=1 pid=174285 auid=48 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4200 comm="(systemd)" exe="/usr/lib/systemd/systemd" subj=system_u:system_r:init_t:s0 key=(null)
type=AVC msg=audit(1610355901.401:35527): avc:  denied  { audit_control } for  pid=174285 comm="(systemd)" capability=30  scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=capability permissive=0


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

# rpm -q pam systemd selinux-policy
pam-1.3.1-11.el8.x86_64
systemd-239-41.el8_3.1.x86_64
selinux-policy-3.14.3-54.el8.noarch


## How reproducible:

# useradd testuser
# echo -e "session     required \t\t\t\t\t pam_tty_audit.so disable=* enable=testuser"  >> /etc/pam.d/password-auth
# echo -e "session     required \t\t\t\t\t pam_tty_audit.so disable=* enable=testuser"  >> /etc/pam.d/system-auth
# reboot


## Expected results:

No AVC logs


## Additional info:

Workaround, custom module:

    module audit4systemd 1.0;
    
    require {
    	type init_t;
	class capability audit_control;
    }
    
    #============= init_t ==============
    allow init_t self:capability audit_control;

Comment 1 Zdenek Pytela 2021-01-22 20:05:51 UTC

*** This bug has been marked as a duplicate of bug 1861771 ***


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