Details
Description
The systemd unit loads a mysql-writable file as a service EnvironmentFile and then runs a command that inherits that environment:
|
systemd.service |
User=mysql
|
EnvironmentFile=-/run/mysqld/wsrep-new-cluster
|
ExecStartPost=!/etc/mysql/debian-start
|
A database account with only the FILE privilege (and empty secure_file_priv, the default) can write an poisoned /run/mysqld/wsrep-new-cluster (with IFS, PATH, various LD_* variables), via SELECT … INTO DUMPFILE, which is writable by the mysql user. On the next service restart, systemd passes that environment to the ExecStart/ExecStartPos processes.
Reported by Vincent55 Yang
via the Webpros (cPanel/Plesk) security team
Attachments
Issue Links
- is caused by
-
MDEV-15502 debian: systemd, with tmpfiles install not required
-
- Closed
-
-
MDEV-19210 use environment file in systemd units for _WSREP_*
-
- Closed
-
-
MDEV-37726 wsrep-new-cluster and wsrep-start-position in wrong directory with wrong selinux permissions
-
- Closed
-