Bug 2245705 - SELinux is preventing mariadbd from 'read' accesses on the file disable_ipv6.
Summary: SELinux is preventing mariadbd from 'read' accesses on the file disable_ipv6.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql-selinux
Version: 37
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Schorm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:abb3d3eeaedee62accf58006a19...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-10-23 17:17 UTC by John Griffiths
Modified: 2024-11-20 10:59 UTC (History)
5 users (show)

Fixed In Version: mysql-selinux-1.0.9-1.fc40 mysql-selinux-1.0.10-1.fc40 mysql-selinux-1.0.10-1.fc39 mysql-selinux-1.0.10-1.fc38 mysql-selinux-1.0.10-1.fc37
Clone Of:
Environment:
Last Closed: 2023-11-27 01:53:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Griffiths 2023-10-23 17:17:44 UTC
Description of problem:
SELinux is preventing mariadbd from 'read' accesses on the file disable_ipv6.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that mariadbd should be allowed read access on the disable_ipv6 file 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 'mariadbd' --raw | audit2allow -M my-mariadbd
# semodule -X 300 -i my-mariadbd.pp

Additional Information:
Source Context                system_u:system_r:mysqld_t:s0
Target Context                system_u:object_r:sysctl_net_t:s0
Target Objects                disable_ipv6 [ file ]
Source                        mariadbd
Source Path                   mariadbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-37.22-1.fc37.noarch
Local Policy RPM              mysql-selinux-1.0.7-2.fc37.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.5.7-100.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Wed Oct 11 03:54:39 UTC 2023
                              x86_64 x86_64
Alert Count                   1
First Seen                    2023-10-20 00:05:10 EDT
Last Seen                     2023-10-20 00:05:10 EDT
Local ID                      90d7fa4f-66cd-4a00-aeae-4b9ab1aed952

Raw Audit Messages
type=AVC msg=audit(1697774710.430:41854): avc:  denied  { read } for  pid=1650 comm="mariadbd" name="disable_ipv6" dev="proc" ino=21348 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=0


Hash: mariadbd,mysqld_t,sysctl_net_t,file,read

Version-Release number of selected component:
selinux-policy-targeted-37.22-1.fc37.noarch

Additional info:
component:      mysql-selinux
reporter:       libreport-2.17.11
hashmarkername: setroubleshoot
kernel:         6.5.7-100.fc37.x86_64
type:           libreport

Comment 1 Anthony Messina 2023-11-11 17:22:35 UTC
I can confirm this issue exists in Fedora 39.

Comment 2 Fedora Update System 2023-11-17 22:59:06 UTC
FEDORA-2023-2b65fa4f45 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-2b65fa4f45

Comment 3 Fedora Update System 2023-11-17 23:09:42 UTC
FEDORA-2023-2b65fa4f45 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Michal Schorm 2023-11-17 23:19:43 UTC
Sorry for the misleading Fedora Update reports.
This issue has NOT been fixed.

I've made an attempt to fix it, but I was unsuccessful.
I've reverted the respective commit on the upstream of the 'mysql-selinux' package, however the update automation still picked up the BZ number from the reverted commit message and used them to mark those BZs as resolved.

While the fix attempt I made wasn't working, I believe the research behind it I've made should be correct.
  https://github.com/devexp-db/mysql-selinux/commit/de84778e555b891fd9ea5f3111c87a4990650d6c

I'll try again after consultation with someone proficient in writing SELinux rules.

Comment 5 Fedora Update System 2023-11-18 12:33:47 UTC
FEDORA-2023-26954ac6f4 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-26954ac6f4

Comment 6 Fedora Update System 2023-11-18 12:36:39 UTC
FEDORA-2023-26954ac6f4 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2023-11-18 15:15:52 UTC
FEDORA-2023-f5860f0475 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f5860f0475

Comment 8 Fedora Update System 2023-11-18 15:15:54 UTC
FEDORA-2023-50b22e7196 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-50b22e7196

Comment 9 Michal Schorm 2023-11-18 15:18:46 UTC
This is the actual update that should fix your issue, please test it:
  https://bodhi.fedoraproject.org/updates/?search=mysql-selinux-1.0.10

Comment 10 Fedora Update System 2023-11-19 02:49:25 UTC
FEDORA-2023-de0c445f23 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-de0c445f23`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-de0c445f23

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-11-19 03:06:19 UTC
FEDORA-2023-50b22e7196 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-50b22e7196`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-50b22e7196

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-11-19 03:19:10 UTC
FEDORA-2023-f5860f0475 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-f5860f0475`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-f5860f0475

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Aoife Moloney 2023-11-23 01:52:05 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 14 Fedora Update System 2023-11-27 01:53:54 UTC
FEDORA-2023-de0c445f23 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2023-11-27 02:31:21 UTC
FEDORA-2023-50b22e7196 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2023-11-27 02:40:49 UTC
FEDORA-2023-f5860f0475 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2024-11-20 08:43:39 UTC
FEDORA-2024-8beb0aba20 (selinux-policy-41.26-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-8beb0aba20

Comment 18 Fedora Update System 2024-11-20 10:59:31 UTC
FEDORA-2024-8beb0aba20 (selinux-policy-41.26-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


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