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 1532019 - SELinux is preventing /usr/bin/bash from using the dac_read_search capability
Summary: SELinux is preventing /usr/bin/bash from using the dac_read_search capability
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-07 13:23 UTC by srakitnican
Modified: 2018-01-08 10:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-08 10:11:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1532017 0 unspecified CLOSED SELinux prevents /usr/bin/bash (running as squid_t) from getattr+execute access on the file /usr/sbin/ldconfig 2021-02-22 00:41:40 UTC

Internal Links: 1532017

Description srakitnican 2018-01-07 13:23:28 UTC
SELinux is preventing /usr/bin/bash from using the dac_read_search capability.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.
Do

Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that bash should have the dac_read_search capability by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'cache_swap.sh' --raw | audit2allow -M my-cacheswapsh
# semodule -i my-cacheswapsh.pp


Additional Information:
Source Context                system_u:system_r:squid_t:s0
Target Context                system_u:system_r:squid_t:s0
Target Objects                Unknown [ capability ]
Source                        cache_swap.sh
Source Path                   /usr/bin/bash
Port                          <Unknown>
Host                          <machine>
Source RPM Packages           bash-4.2.46-29.el7_4.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-166.el7_4.7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     <machine>
Platform                      Linux <machine> 4.14.12-1.el7.elrepo.x86_64 #1 SMP
                              Fri Jan 5 13:28:56 EST 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-01-07 12:16:00 CET
Last Seen                     2018-01-07 12:16:00 CET
Local ID                      586117ca-c3a9-4813-b23e-a23d17870b12

Raw Audit Messages
type=AVC msg=audit(1515323760.772:112): avc:  denied  { dac_read_search } for  pid=1664 comm="cache_swap.sh" capability=2  scontext=system_u:system_r:squid_t:s0 tcontext=system_u:system_r:squid_t:s0 tclass=capability permissive=0


type=SYSCALL msg=audit(1515323760.772:112): arch=x86_64 syscall=stat success=yes exit=0 a0=239c2c0 a1=7ffde7b09ca0 a2=7ffde7b09ca0 a3=8 items=0 ppid=1 pid=1664 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=cache_swap.sh exe=/usr/bin/bash subj=system_u:system_r:squid_t:s0 key=(null)

Hash: cache_swap.sh,squid_t,squid_t,capability,dac_read_search


---------


# locate cache_swap.sh
/usr/libexec/squid/cache_swap.sh

Comment 2 Lukas Vrabec 2018-01-08 10:11:11 UTC
This will be fixed in next minor release. 

Thanks,
Lukas.


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