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 2038965 - [RHEL 9] RFE: backport of --secontext=mismatch functionality
Summary: [RHEL 9] RFE: backport of --secontext=mismatch functionality
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: strace
Version: 9.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eugene Syromiatnikov
QA Contact: Jesus Checa
Jaroslav Klech
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-10 16:25 UTC by Eugene Syromiatnikov
Modified: 2022-05-17 16:35 UTC (History)
6 users (show)

Fixed In Version: strace-5.13-6.el9
Doc Type: Enhancement
Doc Text:
.The `strace` utility now correctly displays SELinux context mismatches An existing `--secontext` option of `strace` has been extended with the `mismatch` parameter. This parameter enables to print the expected context along with the actual one upon mismatch only. The output is separated by double exclamation marks (`!!`), first the actual context, then the expected one. In the examples below, the `full,mismatch` parameters print the expected full context along with the actual one because the user part of the contexts mismatches. However, when using a solitary `mismatch`, it only checks the type part of the context. The expected context is not printed because the type part of the contexts matches. ---- [...] $ strace --secontext=full,mismatch -e statx stat /home/user/file statx(AT_FDCWD, "/home/user/file" [system_u:object_r:user_home_t:s0!!unconfined_u:object_r:user_home_t:s0], ... $ strace --secontext=mismatch -e statx stat /home/user/file statx(AT_FDCWD, "/home/user/file" [user_home_t:s0], ... ---- SELinux context mismatches often cause access control issues associated with SELinux. The mismatches printed in the system call traces can significantly expedite the checks of SELinux context correctness. The system call traces can also explain specific kernel behavior with respect to access control checks.
Clone Of: 2038810
Environment:
Last Closed: 2022-05-17 16:01:32 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-107312 0 None None None 2022-01-10 16:39:35 UTC
Red Hat Product Errata RHBA-2022:4023 0 None None None 2022-05-17 16:01:36 UTC

Description Eugene Syromiatnikov 2022-01-10 16:25:09 UTC
+++ This bug was initially created as a clone of Bug #2038810 +++

Description of problem:

Please backport "--secontext=mismatch" functionality to system's strace on RHEL8:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
commit ca1aa96f2b00a0dda41506c8eb15bed265066e3a
Author: Renaud Métrich <rmetrich>
Date:   Tue Oct 5 08:36:22 2021 +0200
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Having this in system's strace will greatly enhance troubleshooting of SELinux issues, through not requiring to verify the contexts against expected ones.


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

strace-5.7-3


How reproducible:

N/A

Comment 11 errata-xmlrpc 2022-05-17 16:01:32 UTC
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 (new packages: strace), 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-2022:4023


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