Bug 2073386
| Summary: | SELinux is preventing wsrep_sst_rsync getattr of /usr/bin/hostname | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Jakub Heger <jheger> | |
| Component: | mysql-selinux | Assignee: | Michal Schorm <mschorm> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jakub Heger <jheger> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 9.0 | CC: | databases-maint, ljavorsk, lvrabec, mmalik, mschorm, peljasz, redhat-bugzilla, rmetrich, robert.scheck, ssekidde, zmiklank | |
| Target Milestone: | rc | Keywords: | Rebase, Triaged, ZStream | |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2089180 2096271 (view as bug list) | Environment: | ||
| Last Closed: | 2022-10-19 13:39:05 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 2089180, 2096271 | |||
The SELinux denials recorded in the attached logs appeared in the enforcing mode. To analyze and fix the problem properly, we need to know what kind of SELinux denials appear in permissive mode. Please run the automated test in permissive mode, collect SELinux denials and attach them here. Thank you. ----
type=PROCTITLE msg=audit(04/11/2022 05:40:39.149:300) : proctitle=/usr/bin/bash -ue /usr//bin/wsrep_sst_rsync --role joiner --address 10.0.139.106 --datadir /var/lib/mysql/ --parent 4959 --mysql
type=SYSCALL msg=audit(04/11/2022 05:40:39.149:300) : arch=x86_64 syscall=newfstatat success=yes exit=0 a0=AT_FDCWD a1=0x55caee8708b0 a2=0x7ffc1704f5a0 a3=0x0 items=0 ppid=4968 pid=5055 auid=unset uid=mysql gid=mysql euid=mysql suid=mysql fsuid=mysql egid=mysql sgid=mysql fsgid=mysql tty=(none) ses=unset comm=wsrep_sst_rsync exe=/usr/bin/bash subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(04/11/2022 05:40:39.149:300) : avc: denied { getattr } for pid=5055 comm=wsrep_sst_rsync path=/usr/bin/hostname dev="vda1" ino=4458075 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
----
type=PROCTITLE msg=audit(04/11/2022 05:40:39.149:301) : proctitle=/usr/bin/bash -ue /usr//bin/wsrep_sst_rsync --role joiner --address 10.0.139.106 --datadir /var/lib/mysql/ --parent 4959 --mysql
type=SYSCALL msg=audit(04/11/2022 05:40:39.149:301) : arch=x86_64 syscall=access success=yes exit=0 a0=0x55caee8708b0 a1=X_OK a2=0x7ffc1704f4c0 a3=0x0 items=0 ppid=4968 pid=5055 auid=unset uid=mysql gid=mysql euid=mysql suid=mysql fsuid=mysql egid=mysql sgid=mysql fsgid=mysql tty=(none) ses=unset comm=wsrep_sst_rsync exe=/usr/bin/bash subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(04/11/2022 05:40:39.149:301) : avc: denied { execute } for pid=5055 comm=wsrep_sst_rsync name=hostname dev="vda1" ino=4458075 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
----
type=PROCTITLE msg=audit(04/11/2022 05:40:39.149:302) : proctitle=/usr/bin/bash -ue /usr//bin/wsrep_sst_rsync --role joiner --address 10.0.139.106 --datadir /var/lib/mysql/ --parent 4959 --mysql
type=SYSCALL msg=audit(04/11/2022 05:40:39.149:302) : arch=x86_64 syscall=access success=yes exit=0 a0=0x55caee8708b0 a1=R_OK a2=0x7ffc1704f4c0 a3=0x0 items=0 ppid=4968 pid=5055 auid=unset uid=mysql gid=mysql euid=mysql suid=mysql fsuid=mysql egid=mysql sgid=mysql fsgid=mysql tty=(none) ses=unset comm=wsrep_sst_rsync exe=/usr/bin/bash subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(04/11/2022 05:40:39.149:302) : avc: denied { read } for pid=5055 comm=wsrep_sst_rsync name=hostname dev="vda1" ino=4458075 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
----
type=PROCTITLE msg=audit(04/11/2022 05:40:39.149:303) : proctitle=/usr/bin/bash -ue /usr//bin/wsrep_sst_rsync --role joiner --address 10.0.139.106 --datadir /var/lib/mysql/ --parent 4959 --mysql
type=PATH msg=audit(04/11/2022 05:40:39.149:303) : item=0 name=/lib64/ld-linux-x86-64.so.2 inode=6382671 dev=fd:01 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ld_so_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(04/11/2022 05:40:39.149:303) : cwd=/var/lib/mysql
type=EXECVE msg=audit(04/11/2022 05:40:39.149:303) : argc=2 a0=hostname a1=-s
type=SYSCALL msg=audit(04/11/2022 05:40:39.149:303) : arch=x86_64 syscall=execve success=yes exit=0 a0=0x55caee8708b0 a1=0x55caee876310 a2=0x55caee870960 a3=0x55caee876670 items=1 ppid=4968 pid=5055 auid=unset uid=mysql gid=mysql euid=mysql suid=mysql fsuid=mysql egid=mysql sgid=mysql fsgid=mysql tty=(none) ses=unset comm=hostname exe=/usr/bin/hostname subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(04/11/2022 05:40:39.149:303) : avc: denied { map } for pid=5055 comm=hostname path=/usr/bin/hostname dev="vda1" ino=4458075 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(04/11/2022 05:40:39.149:303) : avc: denied { execute_no_trans } for pid=5055 comm=wsrep_sst_rsync path=/usr/bin/hostname dev="vda1" ino=4458075 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(04/11/2022 05:40:39.149:303) : avc: denied { open } for pid=5055 comm=wsrep_sst_rsync path=/usr/bin/hostname dev="vda1" ino=4458075 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file permissive=1
Is this what you are looking for?
Yes, thank you. CentOS Stream 9 MR: https://gitlab.com/redhat/centos-stream/rpms/mysql-selinux/-/merge_requests/2 C9S MR merged *** Bug 2089664 has been marked as a duplicate of this bug. *** |
Description of problem: See avc.log [1] from beaker job [2]. Version-Release number of selected component (if applicable): selinux-policy-34.1.29-1.el9_0.noarch How reproducible: always Steps to Reproduce: 1. Run /CoreOS/mariadb/Multihost/Galera-basic-setup 2. 3. Actual results: <snip> SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Memory protection checking: actual (secure) Max kernel policy version: 33 selinux-policy-34.1.29-1.el9_0.noarch ---- time->Thu Apr 7 03:43:56 2022 type=PROCTITLE msg=audit(1649317436.179:381): proctitle=2F7573722F62696E2F62617368002D7565002F7573722F2F62696E2F77737265705F7373745F7273796E63002D2D726F6C65006A6F696E6572002D2D616464726573730031302E302E3136302E3535002D2D64617461646972002F7661722F6C69622F6D7973716C2F002D2D706172656E74003238373734002D2D6D7973716C type=PATH msg=audit(1649317436.179:381): item=0 name="/usr//bin/hostname" inode=134357841 dev=fd:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:hostname_exec_t:s0 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0 type=CWD msg=audit(1649317436.179:381): cwd="/var/lib/mysql" type=SYSCALL msg=audit(1649317436.179:381): arch=80000016 syscall=293 success=no exit=-13 a0=ffffffffffffff9c a1=2aa2130af50 a2=3ffc0afa990 a3=0 items=1 ppid=28783 pid=28870 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="wsrep_sst_rsync" exe="/usr/bin/bash" subj=system_u:system_r:mysqld_t:s0 key=(null) type=AVC msg=audit(1649317436.179:381): avc: denied { getattr } for pid=28870 comm="wsrep_sst_rsync" path="/usr/bin/hostname" dev="dm-0" ino=134357841 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:hostname_exec_t:s0 tclass=file permissive=0 </snip> Expected results: No AVC denials. Additional info: [1] https://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2022/04/64784/6478420/11749573/142376733/664901856/avc.log [2] https://beaker.engineering.redhat.com/recipes/11749573#task142376733