MADB-10-005600 - Access to database files must be limited to relevant processes and to authorized, administrative users.

Information

Applications, including MariaDB, must prevent unauthorized and unintended information transfer via shared system resources. Permitting only MariaDB processes and authorized, administrative users to have access to the files where the database resides helps ensure that those files are not shared inappropriately and are not open to backdoor access and manipulation.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

By default all of the MariaDB database files, log files, and backup files are located in the /var/lib/mysql.

To find the location of the datadir run this command:

Mariadb > SHOW GLOBAL VARIABLES LIKE 'datadir';

Check the /etc/my.cnf file for the following variables to determine if any of these files have a nondefault location configured. Only variables that specify a directory different from datadir will be in a different directory. If the variable only specifies a file name that file will still be in the datadir directory.

error_log
innodb_log_group_home_dir
innodb_temp_data_file_path
innodb_tmpdir
innodb_undo_directory
innodb_temp_data_file_path
innodb_tmpdir
log_bin_basename
log_error
relay_log_basename
relay_log_file_info
sql_error_log_filename
tmpdir

Configure the permissions granted by the operating system/file system on the database files, database log files, and database backup files so that only relevant system accounts and authorized system administrators and database administrators with a need to know are permitted to read/view these files.

Any files (e.g., extra configuration files) created in datadir, or a nondefault directory defined by a variable above, must be owned by the database administrator, with only owner permissions to read, write, and execute.

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_MariaDB_Enterprise_10-x_V2R2_STIG.zip

Item Details

Category: SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|SC-4, CAT|II, CCI|CCI-001090, Rule-ID|SV-253713r961149_rule, STIG-ID|MADB-10-005600, Vuln-ID|V-253713

Plugin: MySQLDB

Control ID: 7e41d06598651be6e0d76b8b4f9321b61ea66d5e969fd9e93a24bc45e2615e3d