Bug 2294899 - SELinux is preventing mariadbd from 'write' accesses on the file memory.pressure.
Summary: SELinux is preventing mariadbd from 'write' accesses on the file memory.press...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql-selinux
Version: 40
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Schorm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:2a51c9f7bff4129d178f8633ae1...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-07-01 13:28 UTC by dani
Modified: 2024-09-26 02:44 UTC (History)
7 users (show)

Fixed In Version: mysql-selinux-1.0.11-1.fc41 mysql-selinux-1.0.11-1.fc39 mysql-selinux-1.0.11-1.fc40
Clone Of:
Environment:
Last Closed: 2024-09-25 01:29:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (1.88 KB, text/plain)
2024-07-01 13:28 UTC, dani
no flags Details
File: os_info (698 bytes, text/plain)
2024-07-01 13:28 UTC, dani
no flags Details

Description dani 2024-07-01 13:28:45 UTC
Description of problem:
Started the mariadb servi ce for the first time
SELinux is preventing mariadbd from 'write' accesses on the file memory.pressure.

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

If you believe that mariadbd should be allowed write access on the memory.pressure 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:cgroup_t:s0
Target Objects                memory.pressure [ file ]
Source                        mariadbd
Source Path                   mariadbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-40.23-1.fc40.noarch
Local Policy RPM              mysql-selinux-1.0.10-3.fc40.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.9.6-200.fc40.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Jun 21 15:48:21 UTC 2024
                              x86_64
Alert Count                   1
First Seen                    2024-07-01 16:05:18 IDT
Last Seen                     2024-07-01 16:05:18 IDT
Local ID                      a8fdaa46-9a59-4be9-9b00-2800d4394312

Raw Audit Messages
type=AVC msg=audit(1719839118.244:1866): avc:  denied  { write } for  pid=666485 comm="mariadbd" name="memory.pressure" dev="cgroup2" ino=36547 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=file permissive=0


Hash: mariadbd,mysqld_t,cgroup_t,file,write

Version-Release number of selected component:
selinux-policy-targeted-40.23-1.fc40.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing mariadbd from 'write' accesses on the file memory.pressure.
package:        selinux-policy-targeted-40.23-1.fc40.noarch
component:      mysql-selinux
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.9.6-200.fc40.x86_64
comment:        Started the mariadb servi ce for the first time
component:      mysql-selinux

Comment 1 dani 2024-07-01 13:28:47 UTC
Created attachment 2038643 [details]
File: description

Comment 2 dani 2024-07-01 13:28:48 UTC
Created attachment 2038644 [details]
File: os_info

Comment 3 Michal Schorm 2024-08-09 23:50:54 UTC
Hello, thank you for the report.

This is most likely related to:
  https://github.com/MariaDB/server/commit/2323483528fbc5116c2990a208afddd775ee0e85

My conclusion from a quick initial investigation is that it is expected for the MariaDB to read to memory.pressure file, but I haven't noticed a block of code in which the write access would be required.

Further investigation is necessary.

Comment 4 Michael Chapman 2024-09-13 08:16:42 UTC
Duplicate of #2256002?

Comment 5 Fedora Update System 2024-09-16 13:22:57 UTC
FEDORA-2024-3721532bce (mysql-selinux-1.0.11-1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-3721532bce

Comment 6 Fedora Update System 2024-09-16 13:23:05 UTC
FEDORA-2024-28bb0038ce (mysql-selinux-1.0.11-1.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-28bb0038ce

Comment 7 Fedora Update System 2024-09-16 13:23:11 UTC
FEDORA-2024-4f35baf4d4 (mysql-selinux-1.0.11-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-4f35baf4d4

Comment 8 Fedora Update System 2024-09-17 03:07:49 UTC
FEDORA-2024-4f35baf4d4 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-4f35baf4d4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-4f35baf4d4

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

Comment 9 Fedora Update System 2024-09-17 03:12:48 UTC
FEDORA-2024-28bb0038ce 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-2024-28bb0038ce`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-28bb0038ce

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

Comment 10 Fedora Update System 2024-09-18 01:42:51 UTC
FEDORA-2024-3721532bce has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-3721532bce`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-3721532bce

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

Comment 11 Fedora Update System 2024-09-25 01:29:15 UTC
FEDORA-2024-4f35baf4d4 (mysql-selinux-1.0.11-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2024-09-25 02:40:32 UTC
FEDORA-2024-28bb0038ce (mysql-selinux-1.0.11-1.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2024-09-26 02:44:16 UTC
FEDORA-2024-3721532bce (mysql-selinux-1.0.11-1.fc40) has been pushed to the Fedora 40 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.