Bug 1584643 - Unconfined /usr/bin/mysqld
Summary: Unconfined /usr/bin/mysqld
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: community-mysql
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jančo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1616258
TreeView+ depends on / blocked
 
Reported: 2018-05-31 11:24 UTC by Honza Horak
Modified: 2018-09-13 19:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1616258 (view as bug list)
Environment:
Last Closed: 2018-09-13 19:41:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Honza Horak 2018-05-31 11:24:44 UTC
Description of problem:
After moving /usr/libexec/mysqld to /usr/bin/mysqld, the selinux of this file is wrong:

# ls -lZ /usr/bin/mysqld
-rwxr-xr-x. 1 root root system_u:object_r:bin_t:s0 55830272 May 23 04:51 /usr/bin/mysqld

This can be either fixed by providing the fixed selinux rules for this package together with community-mysql (bug #1577199), or in selinux-policy package, or by reverting this particular change.

Comment 2 Jan Kurik 2018-08-14 11:18:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 3 Jakub Jančo 2018-08-20 13:37:07 UTC
Currently selinux policy defines type "mysqld_exec_t" for link.
# ls -Z /usr/sbin/mysqld 
system_u:object_r:mysqld_exec_t:s0 /usr/sbin/mysqld

This leads to more selinux denials for systemd service. As seen below.

time->Mon Aug 20 09:25:46 2018
type=AVC msg=audit(1534771546.671:542): avc:  denied  { read } for  pid=4542 comm="(mysqld)" name="mysqld" dev="vda1" ino=177756 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:mysqld_exec_t:s0 tclass=lnk_file permissive=0

I will revert label to previous "system_u:object_r:bin_t:s0", this "model" is followed by all links in OS and also systemd service works.

Comment 4 Jakub Jančo 2018-09-13 19:41:35 UTC
Fixed since selinux-policy-3.14.2-33


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