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.
Description of problem:
With scap-security-guide, we ship 2 "similar" rules:
- xccdf_org.ssgproject.content_rule_configure_bashrc_tmux ("Support session locking with tmux (not enforcing)")
which ships the following snippet:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
if [ "$PS1" ]; then
parent=$(ps -o ppid= -p $$)
name=$(ps -o comm= -p $parent)
case "$name" in (sshd|login) tmux ;; esac
fi
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
- xccdf_org.ssgproject.content_rule_configure_bashrc_exec_tmux ("Support session locking with tmux")
which ships the following snippet:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
if [ "$PS1" ]; then
parent=$(ps -o ppid= -p $$)
name=$(ps -o comm= -p $parent)
case "$name" in (sshd|login) exec tmux ;; esac
fi
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
The difference being "exec tmux" in second rule, compared to just "tmux" in first rule.
Please explain why we ship xccdf_org.ssgproject.content_rule_configure_bashrc_tmux ("Support session locking with tmux (not enforcing)") at all, implementing this rule leads to non-sense when logging in, as shown in the example below:
1. ssh to the system
--> tmux started and "tmux prompt" is displayed
2. exit from tmux
--> initial "ssh" shell prompt is displayed
In a nutshell, once you do "ssh" on the system, you need to exit TWICE to get out of ssh. This is because it spawns "tmux" instead of "exec tmux" in first rule.
This doesn't make any sense to me.
Version-Release number of selected component (if applicable):
scap-security-guide
How reproducible:
Always, see above.
Comment 1Watson Yuuma Sato
2023-05-04 15:43:15 UTC
Hi Renaud,
Thank you for the feedback.
The rule configure_bashrc_tmux was created to align with a change in RHEL-08-020041 RHEL8 STIG V1R9.
For reference: https://stigaview.com/products/rhel8/v1r9/RHEL-08-020041/
At the time of development we note the described behavior and briefly discussed the scope and impact of the change with DISA.
But as a STIG update is in effect the moment it is released, we opted to keep the profile aligned with the STIG guidance.
To minimize the impact of the change, we added a warning about this to the rule description:
"This rule configures Tmux to be executed in a way that exiting Tmux drops the user into a regular shell instead of logging them out, therefore the session locking mechanism is not enforced on the user."
We will get back with DISA to discuss RHEL-08-020041.
Thanks Watson for the explanation and reporting to DISA.
Comment 6RHEL Program Management
2023-08-10 13:47:17 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.
To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:
"Bugzilla Bug" = 1234567
In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues.
Description of problem: With scap-security-guide, we ship 2 "similar" rules: - xccdf_org.ssgproject.content_rule_configure_bashrc_tmux ("Support session locking with tmux (not enforcing)") which ships the following snippet: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- if [ "$PS1" ]; then parent=$(ps -o ppid= -p $$) name=$(ps -o comm= -p $parent) case "$name" in (sshd|login) tmux ;; esac fi -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- - xccdf_org.ssgproject.content_rule_configure_bashrc_exec_tmux ("Support session locking with tmux") which ships the following snippet: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- if [ "$PS1" ]; then parent=$(ps -o ppid= -p $$) name=$(ps -o comm= -p $parent) case "$name" in (sshd|login) exec tmux ;; esac fi -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- The difference being "exec tmux" in second rule, compared to just "tmux" in first rule. Please explain why we ship xccdf_org.ssgproject.content_rule_configure_bashrc_tmux ("Support session locking with tmux (not enforcing)") at all, implementing this rule leads to non-sense when logging in, as shown in the example below: 1. ssh to the system --> tmux started and "tmux prompt" is displayed 2. exit from tmux --> initial "ssh" shell prompt is displayed In a nutshell, once you do "ssh" on the system, you need to exit TWICE to get out of ssh. This is because it spawns "tmux" instead of "exec tmux" in first rule. This doesn't make any sense to me. Version-Release number of selected component (if applicable): scap-security-guide How reproducible: Always, see above.