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.
Cause:
When the pam_tty_audit pam module is enabled for a user session, systemd needs the audit_control capability to be able to control kernel audit configuration and rules. This capability was not allowed,
Consequence:
The systemd user manager fails to start, errors are logged and AVC denials audited.
Graphical display managers do not work any longer as they use a systemd user session to spawn the greeter.
Fix:
The capability was added to the policy conditionally: it is required to turn on the new init_audit_control boolean which is off by default.
Result:
Uses can use the graphical user interface.
Description of problem:
When enabling pam_tty_audit.so PAM plugin to /etc/pam.d/system-auth, it's not possible to use the Graphical User Interface anymore.
/etc/pam.d/system-auth:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[...]
session required pam_tty_audit.so enable=*
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
This is due to "systemd --user" process being spawned while creating the user session.
It processes /etc/pam.d/systemd-user which in turns includes /etc/pam.d/system-auth.
This is done while "systemd --user" process runs as "init_t" (context of main systemd) but "init_t" has no audit_config capability:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
6403 13:32:34.671661 execve("/usr/lib/systemd/systemd", ["/usr/lib/systemd/systemd", "--user"], ... <unfinished ...>
[...]
6403 13:32:34.608087 write(9</sys/fs/selinux/user>, "system_u:system_r:init_t:s0-s0:c0.c1023 unconfined_u", 52 <unfinished ...>
--> it is running as "init_t"
[...]
6403 13:32:34.658547 write(9</proc/6403/task/6403/attr/exec>, "unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023\0", 54) = 54 <0.000095>
--> it switches to "unconfined_t"
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
The AVC popped while still being "init_t":
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# ausearch -m avc,user_avc -p 6403
----
time->Wed Jul 29 13:32:34 2020
type=AVC msg=audit(1596022354.666:200): avc: denied { audit_control } for pid=6403 comm="(systemd)" capability=30 scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=capability permissive=1
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-41.el8_2.5.noarch
How reproducible:
ALWAYS
Steps to Reproduce:
1. Configure "pam_tty_audit" in /etc/pam.d/system-auth on a system with GUI
/etc/pam.d/system-auth:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[...]
session required pam_tty_audit.so enable=*
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
2. Reboot
Actual results:
AVC and GUI not coming up
Expected results:
Works
This bug has not been fully acknowledged by the subsystem to be resolved during the RHEL 8.4 development and testing phase, so it will be evaluated for inclusion into the next minor product update.
If you still want to pursue this issue further, please attach information regarding severity of the bugzilla.
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 (selinux-policy 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-2021:1639
Description of problem: When enabling pam_tty_audit.so PAM plugin to /etc/pam.d/system-auth, it's not possible to use the Graphical User Interface anymore. /etc/pam.d/system-auth: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- [...] session required pam_tty_audit.so enable=* -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- This is due to "systemd --user" process being spawned while creating the user session. It processes /etc/pam.d/systemd-user which in turns includes /etc/pam.d/system-auth. This is done while "systemd --user" process runs as "init_t" (context of main systemd) but "init_t" has no audit_config capability: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- 6403 13:32:34.671661 execve("/usr/lib/systemd/systemd", ["/usr/lib/systemd/systemd", "--user"], ... <unfinished ...> [...] 6403 13:32:34.608087 write(9</sys/fs/selinux/user>, "system_u:system_r:init_t:s0-s0:c0.c1023 unconfined_u", 52 <unfinished ...> --> it is running as "init_t" [...] 6403 13:32:34.658547 write(9</proc/6403/task/6403/attr/exec>, "unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023\0", 54) = 54 <0.000095> --> it switches to "unconfined_t" -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- The AVC popped while still being "init_t": -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # ausearch -m avc,user_avc -p 6403 ---- time->Wed Jul 29 13:32:34 2020 type=AVC msg=audit(1596022354.666:200): avc: denied { audit_control } for pid=6403 comm="(systemd)" capability=30 scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=capability permissive=1 -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Version-Release number of selected component (if applicable): selinux-policy-3.14.3-41.el8_2.5.noarch How reproducible: ALWAYS Steps to Reproduce: 1. Configure "pam_tty_audit" in /etc/pam.d/system-auth on a system with GUI /etc/pam.d/system-auth: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- [...] session required pam_tty_audit.so enable=* -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- 2. Reboot Actual results: AVC and GUI not coming up Expected results: Works