[MDEV-18374] SELinux breaks cracklib_password_check plugin Created: 2019-01-24 Updated: 2023-08-22 Resolved: 2023-07-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System, Plugins |
| Affects Version/s: | 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4.31, 10.5.22, 10.6.15, 10.9.8, 10.10.6, 10.11.5, 11.0.3, 11.1.2, 11.2.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Nikita Malyavin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The cracklib_password_check plugin is known to have problems with SELinux: https://mariadb.com/kb/en/library/cracklib-password-check-plugin/#selinux Since the plugin is in its own package anyway on all distributions where we provide it, maybe that package should also install an SELinux policy? The following one seems to work:
This policy gives the mysqld_t type access to files and directories in the crack_db_t context, which seems to be the correct one. We can see based on the following output:
The policy appears to work:
|
| Comments |
| Comment by Geoff Montee (Inactive) [ 2019-01-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I wanted to see if I could implement this change for RPMs, so I submitted a pull request: https://github.com/MariaDB/server/pull/1131 It seems to work. The SELinux policy is there, and the post-install script loads it:
And MariaDB is able to use CrackLib without any issues:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2022-03-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can still reproduce the described problem with cracklib plugin, but only with 10.2-10.4 on RHEL-7/CentOS-7. On RHEL-7 with 10.2-10.4, the policy Geoff suggested makes the problem go away, but I'm wondering if anyone knows what causes the difference between server and system versions. |