MariaDB Enterprise 10.x Security Technical Implementation Guide

  • Version/Release: V2R1
  • Published: 2024-06-10
  • Released: 2024-07-24
  • Expand All:
  • Severity:
  • Sort:
Compare

Select any two versions of this STIG to compare the individual requirements

View

Select any old version/release of this STIG to view the previous requirements

This Security Technical Implementation Guide is published as a tool to improve the security of Department of Defense (DOD) information systems. The requirements are derived from the National Institute of Standards and Technology (NIST) 800-53 and related documents. Comments or proposed revisions to this document should be sent via email to the following address: disa.stig_spt@mail.mil.
a
MariaDB must limit the number of concurrent sessions to an organization-defined number per user for all accounts and/or account types.
AC-10 - Low - CCI-000054 - V-253666 - SV-253666r960735_rule
RMF Control
AC-10
Severity
Low
CCI
CCI-000054
Version
MADB-10-000100
Vuln IDs
  • V-253666
Rule IDs
  • SV-253666r960735_rule
Database management includes the ability to control the number of users and user sessions utilizing MariaDB. Unlimited concurrent connections to MariaDB could allow a successful Denial of Service (DoS) attack by exhausting connection resources; and a system can also fail or be degraded by an overload of legitimate users. Limiting the number of concurrent sessions per user is helpful in reducing these risks. This requirement addresses concurrent session control for a single account. It does not address concurrent sessions by a single user via multiple system accounts; and it does not deal with the total number of sessions across all accounts. The capability to limit the number of concurrent sessions per user must be configured in or added to MariaDB (for example, by use of a logon trigger), when this is technically feasible. Note that it is not sufficient to limit sessions via a web server or application server alone, because legitimate users and adversaries can potentially connect to MariaDB by other means. The organization will need to define the maximum number of concurrent sessions by account type, by account, or a combination thereof. In deciding on the appropriate number, it is important to consider the work requirements of the various types of users. For example, 2 might be an acceptable limit for general users accessing the database via an application; but 10 might be too few for a database administrator using a database management GUI tool, where each query tab and navigation pane may count as a separate session. (Sessions may also be referred to as connections or logons, which for the purposes of this requirement are synonyms.)
Checks: C-57118r841521_chk

To check the number of connections allowed for each user, as the database administrator, run the following SQL: MariaDB> SELECT user, max_user_connections FROM mysql.user; If any users have more connections configured than documented, this is a finding. A value of 0 indicates unlimited and is a finding.

Fix: F-57069r841522_fix

To limit the number of connections allowed by a specific user, as a user with appropriate privileges, run the following SQL: MariaDB> GRANT USAGE ON *.* TO 'username'@'host' WITH MAX_USER_CONNECTIONS number_of_connections;

c
MariaDB must integrate with an organization-level authentication/access mechanism providing account management and automation for all users, groups, roles, and any other principals.
AC-2 - High - CCI-000015 - V-253667 - SV-253667r960768_rule
RMF Control
AC-2
Severity
High
CCI
CCI-000015
Version
MADB-10-000200
Vuln IDs
  • V-253667
Rule IDs
  • SV-253667r960768_rule
Enterprise environments make account management for applications and databases challenging and complex. A manual process for account management functions adds the risk of a potential oversight or other error. Managing accounts for the same person in multiple places is inefficient and prone to problems with consistency and synchronization. A comprehensive application account management process that includes automation helps to ensure that accounts designated as requiring attention are consistently and promptly addressed. Examples include, but are not limited to, using automation to take action on multiple accounts designated as inactive, suspended, or terminated, or by disabling accounts located in noncentralized account stores, such as multiple servers. Account management functions can also include assignment of group or role membership; identifying account type; specifying user access authorizations (i.e., privileges); account removal, update, or termination; and administrative alerts. The use of automated mechanisms can include, for example: using email or text messaging to notify account managers when users are terminated or transferred; using the information system to monitor account usage; and using automated telephone notification to report atypical system account usage. MariaDB must be configured to automatically utilize organization-level account management functions, and these functions must immediately enforce the organizations current account policy. Automation may be comprised of differing technologies that when placed together contain an overall mechanism supporting an organizations automated account management requirements.
Checks: C-57119r841524_chk

If all accounts are authenticated by the organization-level authentication/access mechanism such as LDAP, Kerberos, Active Directory and not by MariaDB, this is not a finding. If there are any accounts managed by the DBMS, review the system documentation for justification and approval of these accounts. If any DBMS-managed accounts exist that are not documented and approved, this is a finding. As the OS administrator, review the configuration files /etc/pam.d and /etc/pam.conf. If file is missing or not configured, this is a finding. Example for LDAP authentication and authorization via PAM would be /etc/pam.d/mariadb_ldap: ############################# auth required pam_ldap.so account required pam_ldap.so ############################# Verify that PAM is by installed the following SQL: MariaDB> SHOW PLUGINS; If pam is not listed as active, this is a finding. To find users not using PAM plugin for authentication: MariaDB> SELECT user, host, plugin FROM mysql.user WHERE plugin != 'pam'; If any users are returned, this is a finding.

Fix: F-57070r841525_fix

Integrate MariaDB security with an organization-level authentication/access mechanism providing account management for all users, groups, roles, and any other principals. As the database administrator, install and configure the PAM authentication module: MariaDB> INSTALL SONAME 'auth_pam'; PAM supports many authentication methods including LDAP, Active Directory, and Kerberos. Each method must be configured properly in /etc/pam.d and /etc/pam.conf. To alter non-PAM authenticated users to using PAM: MariaDB> ALTER USER 'username'@'host' IDENTIFIED VIA pam USING mariadb_ldap;

c
MariaDB must enforce approved authorizations for logical access to information and system resources in accordance with applicable access control policies.
AC-3 - High - CCI-000213 - V-253668 - SV-253668r960792_rule
RMF Control
AC-3
Severity
High
CCI
CCI-000213
Version
MADB-10-000300
Vuln IDs
  • V-253668
Rule IDs
  • SV-253668r960792_rule
Authentication with a DoD-approved PKI certificate does not necessarily imply authorization to access MariaDB. To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DoD-approved PKIs, all DoD systems, including databases, must be properly configured to implement access control policies. Successful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Information systems use access control policies and enforcement mechanisms to implement this requirement. Access control policies include identity-based policies, role-based policies, and attribute-based policies. Access enforcement mechanisms include access control lists, access control matrices, and cryptography. These policies and mechanisms must be employed by the application to control access between users (or processes acting on behalf of users) and objects (e.g., devices, files, records, processes, programs, and domains) in the information system. This requirement is applicable to access control enforcement applications, a category that includes database management systems. If MariaDB does not follow applicable policy when approving access, it may be in conflict with networks or other applications in the information system. This may result in users either gaining or being denied access inappropriately and in conflict with applicable policy.
Checks: C-57120r841527_chk

From the system security plan or equivalent documentation, determine the appropriate permissions on database objects for each kind (group role) of user. If this documentation is missing, this is a finding. First, as the database administrator, check the privileges of all users and roles in the database. Find all users: MariaDB> SELECT user, host FROM mysql.user WHERE is_role = 'N'; Find all roles: MariaDB> SELECT user FROM mysql.user WHERE is_role = 'Y'; For each user found, check grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; For each role found, check grants: MariaDB> SHOW GRANTS FOR 'rolename'; Review all users and roles and their associated privileges. If any users and/or roles privileges exceed those documented, this is a finding. As the database administrator, check the configured authentication settings: MariaDB> SHOW PLUGINS; To find users not using PAM plugin for authentication: MariaDB> SELECT user, host, plugin FROM mysql.user WHERE plugin != 'pam'; If any users are returned, this is a finding. Review all entries and their associated authentication methods. If any entries do not have their documented authentication requirements, this is a finding.

Fix: F-57071r841528_fix

Create and/or maintain documentation of each group roles appropriate permissions on database objects. Implement these permissions in the database and remove any permissions that exceed those documented. The following are examples of how to use role privileges in MariaDB to enforce access controls. Run these as the database administrator. For a complete list of privileges, see the official documentation: https://mariadb.com/kb/en/grant/ #### Roles Example 1 The following example demonstrates how to create an admin role with SHUTDOWN privileges. As the database administrator, run the following SQL: MariaDB> CREATE ROLE admin; MariaDB> GRANT SHUTDOWN ON *.* TO admin; #### Roles Example 2 The following example demonstrates how to create a user make the user a member of the admin role. As the database administrator, run the following SQL: MariaDB> CREATE USER 'admin_user'@'host' IDENTIFIED VIA PAM; MariaDB> GRANT admin TO 'admin_user'@'%'; #### Roles Example 3 The following demonstrates how to revoke privileges from a role using REVOKE. As the database administrator, run the following SQL: MariaDB> REVOKE admin FROM 'admin_user'@'host'; #### Roles Example 4 The following demonstrates how to modify privileges for a role using GRANT. As the database administrator, run the following SQL: MariaDB> GRANT PROCESS ON *.* TO admin; The following are examples of how to use grant privileges in MariaDB to enforce access controls on objects. #### Grant Example 1 The following example demonstrates how to grant INSERT on a table to a role. As the database administrator, run the following SQL: MariaDB> GRANT INSERT ON test.t1 TO admin; #### Grant Example 2 The following example demonstrates how to grant ALL PRIVILEGES on a table to a role. As the database administrator, run the following SQL: MariaDB> GRANT ALL PRIVILEGES ON test.t1 TO admin; #### Grant Example 3 The following example demonstrates how to grant a role to a role. As the database administrator, run the following SQL: MariaDB> CREATE ROLE admin_master; MariaDB> GRANT admin TO admin_master; #### Revoke Example 1 The following example demonstrates how to revoke access from a role. As the database administrator, run the following SQL: MariaDB> REVOKE PROCESS ON *.* FROM admin; To change authentication requirements for the database, as the OS administrator, review the configuration files /etc/pam.d and /etc/pam.conf. After changes to the configuration files /etc/pam.d and /etc/pam.conf, reload the server: # SYSTEMD SERVER ONLY $ sudo systemctl reload mariadb # INITD SERVER ONLY $ sudo service mariadb reload

b
MariaDB must protect against a user falsely repudiating having performed organization-defined actions.
AU-10 - Medium - CCI-000166 - V-253669 - SV-253669r960864_rule
RMF Control
AU-10
Severity
Medium
CCI
CCI-000166
Version
MADB-10-000400
Vuln IDs
  • V-253669
Rule IDs
  • SV-253669r960864_rule
Nonrepudiation of actions taken is required in order to maintain data integrity. Examples of particular actions taken by individuals include creating information, sending a message, approving information (e.g., indicating concurrence or signing a contract), and receiving a message. Nonrepudiation protects against later claims by a user of not having created, modified, or deleted a particular data item or collection of data in the database. In designing a database, the organization must define the types of data and the user actions that must be protected from repudiation. The implementation must then include building audit features into the application data tables and configuring MariaDB’s audit tools to capture the necessary audit trail. Design and implementation also must ensure that applications pass individual user identification to MariaDB, even where the application connects to MariaDB with a standard, shared account. It is recommended to not allow shared accounts, including root. The root user is known by all attackers, and often used in attempted attacks on the database servers.
Checks: C-57121r841530_chk

All users should have individual accounts with appropriate privileges. The root user should be removed after administrative accounts with SUPER privilege are created. Query all users and determine if any are suspected shared accounts. Document any necessary shared accounts. MariaDB> SELECT user, host FROM mysql.user; Determine if any accounts are shared. A shared account is defined as a username, hostname, and password that are used by multiple individuals to log in to MariaDB. An example of a shared account is the MariaDB root account – root@localhost. If accounts are determined to be shared, determine if individuals are first individually authenticated. If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding. The key is individual accountability. If this can be traced, this is not a finding. If accounts are determined to be shared, determine if they are directly accessible to end users. If so, this is a finding. Review contents of audit logs, traces, and data tables to confirm the identity of the individual user performing the action is captured. If shared identifiers are found, and not accompanied by individual identifiers, this is a finding.

Fix: F-57072r841531_fix

Remove shared accounts which are not documented and have been determined to not be necessary. MariaDB> DROP USER 'user'@'hostname';

b
MariaDB must provide audit record generation capability for DoD-defined auditable events within all DBMS/database components.
AU-12 - Medium - CCI-000169 - V-253670 - SV-253670r960879_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000169
Version
MADB-10-000500
Vuln IDs
  • V-253670
Rule IDs
  • SV-253670r960879_rule
Without the capability to generate audit records, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. Audit records can be generated from various components within MariaDB (e.g., process, module). Certain specific application functionalities may be audited as well. The list of audited events is the set of events for which audits are to be generated. This set of events is typically a subset of the list of all events for which the system is capable of generating audit records. DoD has defined the list of events for which MariaDB will provide an audit record generation capability as the following: (i) Successful and unsuccessful attempts to access, modify, or delete privileges, security objects, security levels, or categories of information (e.g., classification levels); (ii) Access actions, such as successful and unsuccessful logon attempts, privileged activities, or other system-level access, starting and ending time for user access to the system, concurrent logons from different workstations, successful and unsuccessful accesses to objects, all program initiations, and all direct access to the information system; and (iii) All account creation, modification, disabling, and termination actions. Organizations may define additional events requiring continuous or ad hoc auditing.
Checks: C-57122r841533_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify audit filters match organization-defined auditing requirements. If not, this is a finding.

Fix: F-57073r841534_fix

Configure MariaDB to generate audit records for at least the DoD minimum set of events. Edit the mariadb-enterprise.cnf configuration file located in /etc/my.cnf.d/. Under [mariadb], add the following: server_audit_logging = ON Save the configuration file. This change will not take effect until MariaDB Enterprise Server is restarted. Using the MariaDB Enterprise Audit plugin, MariaDB can be configured to audit these requests. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters. Ex: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' )); More information about MariaDB auditing can be found here: https://mariadb.com/docs/security/mariadb-enterprise-audit/

b
MariaDB must allow only the ISSM (or individuals or roles appointed by the ISSM) to select which auditable events are to be audited.
AU-12 - Medium - CCI-000171 - V-253671 - SV-253671r960882_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000171
Version
MADB-10-000600
Vuln IDs
  • V-253671
Rule IDs
  • SV-253671r960882_rule
Without the capability to restrict which roles and individuals can select which events are audited, unauthorized personnel may be able to prevent or interfere with the auditing of critical events. Suppression of auditing could permit an adversary to evade detection. Misconfigured audits can degrade the systems performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
Checks: C-57123r841536_chk

MariaDB Enterprise Audit plugin stores audit filters in the table mysql.server_audit_filters. Any users with update/delete/insert access to this table can modify the audit filters. Users with global insert, update, delete, and/or drop privileges can modify audit filters. Find users with global insert, update, delete, and/or drop privileges: MariaDB> SELECT user, host, insert_priv, update_priv, delete_priv, drop_priv FROM mysql.user WHERE insert_priv = 'y' OR update_priv = 'y' OR delete_priv = 'y' OR drop_priv = 'y'; Users with insert, update, delete, and/or drop privileges on the mysql database can modify audit filters. Find users with insert, update, delete, and/or drop privileges on the mysql database: MariaDB> SELECT user, host, insert_priv, update_priv, delete_priv, drop_priv FROM mysql.db WHERE db = 'mysql' AND (insert_priv = 'y' OR update_priv = 'y' OR delete_priv = 'y' OR drop_priv = 'y' ); Users with insert, update, delete, and/or drop privileges on the server_audit_filters and server_audit_users tables can modify audit filters. Find users with insert, update, delete, and/or drop privileges on the mysql database: MariaDB> SELECT user, host, db, table_name, grantor, table_priv, timestamp, column_priv FROM mysql.tables_priv WHERE db = 'mysql' AND table_name IN ('server_audit_filters','server_audit_users') AND (table_priv LIKE '%Insert%' OR table_priv LIKE '%Update%' OR table_priv LIKE '%Delete%' OR table_priv LIKE '%Drop%' ); If any users with the above privileges are found which should not have access to modify audit filters, this is a finding.

Fix: F-57074r841537_fix

Grant the necessary privileges to authorized users. Example: MariaDB> GRANT ALL PRIVILEGES ON mysql.server_audit_filters TO 'username'@'host'; MariaDB> GRANT ALL PRIVILEGES ON mysql.server_audit_users TO 'username'@'host'; For users found with access who are not authorized to modify audit filters, review the user's privileges, and update accordingly.

b
MariaDB must be able to generate audit records when privileges/permissions are retrieved.
AU-12 - Medium - CCI-000172 - V-253672 - SV-253672r960885_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-000700
Vuln IDs
  • V-253672
Rule IDs
  • SV-253672r960885_rule
Under some circumstances, it may be useful to monitor who/what is reading privilege/permission/role information. Therefore, it must be possible to configure auditing to do this. MariaDB makes such information available through an audit log file. This requirement addresses explicit requests for privilege/permission/role membership information. It does not refer to the implicit retrieval of privileges/permissions/role memberships that MariaDB continually performs to determine if any and every action on the database is permitted.
Checks: C-57124r841539_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; As a Linux user with sufficient privileges to view logs, tail the audit log file. $ tail -f /var/log/mysql/server_audit.log (default location) In another terminal run: MariaDB> SHOW GRANTS; If an audit record is not produced in the first terminal, this is a finding.

Fix: F-57075r841540_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must be able to generate audit records when unsuccessful attempts to retrieve privileges/permissions occur.
AU-12 - Medium - CCI-000172 - V-253673 - SV-253673r960885_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-000800
Vuln IDs
  • V-253673
Rule IDs
  • SV-253673r960885_rule
Under some circumstances, it may be useful to monitor who/what is reading privilege/permission/role information. Therefore, it must be possible to configure auditing to do this. MariaDB makes such information available through an audit log file. This requirement addresses explicit requests for privilege/permission/role membership information. It does not refer to the implicit retrieval of privileges/permissions/role memberships that MariaDB continually performs to determine if any and every action on the database is permitted. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-57125r841542_chk

As the database administrator, create a user by running the following SQL: MariaDB> CREATE USER 'test_user'@'localhost' IDENTIFIED BY 'test_user_password'; In one terminal, tail the audit log file: tail -F /var/lib/mysql/server_audit.log (default location) In another terminal attempt to retrieve information from the MariaDB table, mysql.roles_mapping, by logging in as the test_user and running a query which it does not have privileges to do, for example: $ mariadb -u test_user -p MariaDB> SELECT * FROM mysql.roles_mapping; The audit log will show: 20190321 21:39:20,5a7e16cc51f7, test_user ,localhost,127,394,QUERY,, select * from mysql.roles_mapping ,1142 To find failed queries, look for two elements: The notation indicating that it is a QUERY entry, and the last value for the entry. If the query is unsuccessful, the value will be NOT EQUAL TO 0. If the above steps cannot verify that audit records are produced when MariaDB denies retrieval of privileges/permissions/role memberships, this is a finding. If an audit record is not produced in the first terminal, this is a finding.

Fix: F-57076r841543_fix

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; Check what filters are in place by running the following as an administrative user: MariaDB> SELECT * FROM mysql.server_audit_filters; Update the filters as necessary.

b
MariaDB must initiate session auditing upon startup.
AU-14 - Medium - CCI-001464 - V-253674 - SV-253674r960888_rule
RMF Control
AU-14
Severity
Medium
CCI
CCI-001464
Version
MADB-10-000900
Vuln IDs
  • V-253674
Rule IDs
  • SV-253674r960888_rule
Session auditing is for use when a user's activities are under investigation. To be sure of capturing all activity during those periods when session auditing is in use, it must be in operation for the whole time MariaDB is running.
Checks: C-57126r841545_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place for user by running the following as an administrative user: MariaDB> SELECT sau.host, sau.user, saf.filtername, JSON_DETAILED(saf.rule) FROM mysql.server_audit_filters saf JOIN mysql.server_audit_users sau ON saf.filtername = sau.filtername WHERE saf.filtername != 'default'\G Verify the corresponding audit filters are in place. If not, this is a finding.

Fix: F-57077r841546_fix

If not already exists, create a named filter with the required auditing for the user in question. Example: MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('session_auditing', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "table_event":[ "WRITE", "CREATE", "DROP", "RENAME", "ALTER" ] }' )); Then assign the named filter to the user. Example: MariaDB> INSERT INTO mysql.server_audit_users (host, user, filtername) VALUES ("%", "username", "session_auditing"); Reload filters. MariaDB> SET GLOBAL server_audit_reload_filters = ON;

b
MariaDB must produce audit records containing sufficient information to establish what type of events occurred.
AU-3 - Medium - CCI-000130 - V-253675 - SV-253675r960891_rule
RMF Control
AU-3
Severity
Medium
CCI
CCI-000130
Version
MADB-10-001000
Vuln IDs
  • V-253675
Rule IDs
  • SV-253675r960891_rule
Information system auditing capability is critical for accurate forensic analysis. Without establishing what type of event occurred, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. Audit record content that may be necessary to satisfy the requirement of this policy includes, for example, time stamps, user/process identifiers, event descriptions, success/fail indications, filenames involved, and access control or flow control rules invoked. Associating event types with detected events in the application and audit logs provides a means of investigating an attack; recognizing resource utilization or capacity thresholds; or identifying an improperly configured application. Database software is capable of a range of actions on data stored within the database. It is important, for accurate forensic analysis, to know exactly what actions were performed. This requires specific information regarding the event type an audit record is referring to. If event type information is not recorded and stored with the audit record, the record itself is of very limited use.
Checks: C-57127r841548_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Log in to MariaDB Enterprise Server and verify the audit log location. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; Verify the necessary audit filters are in place: MariaDB> SELECT * FROM mysql.server_audit_filters; In another terminal, view the audit log file: $ tail -f /var/log/mysql/audit.log Back in the MariaDB shell, run a query which matches an audit filter. Example if query_events is ALL: MariaDB> SELECT * FROM mysql.help_topic; Verify the entry was logged in the audit log and contains the necessary event type information. If not, this is a finding.

Fix: F-57078r841549_fix

Update necessary audit filters. For example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must include additional, more detailed, organization-defined information in the audit records for audit events identified by type, location, or subject.
AU-3 - Medium - CCI-000135 - V-253676 - SV-253676r960909_rule
RMF Control
AU-3
Severity
Medium
CCI
CCI-000135
Version
MADB-10-001600
Vuln IDs
  • V-253676
Rule IDs
  • SV-253676r960909_rule
Information system auditing capability is critical for accurate forensic analysis. Reconstruction of harmful events or forensic analysis is not possible if audit records do not contain enough information. To support analysis, some types of events will need information to be logged that exceeds the basic requirements of event type, time stamps, location, source, outcome, and user identity. If additional information is not available, it could negatively impact forensic investigations into user actions or other malicious events. The organization must determine what additional information is required for complete analysis of the audited events. The additional information required is dependent on the type of information (e.g., sensitivity of the data and the environment within which it resides). At a minimum, the organization must employ either full-text recording of privileged commands or the individual identities of users of shared accounts, or both. The organization must maintain audit trails in sufficient detail to reconstruct events to determine the cause and impact of compromise. Examples of detailed information the organization may require in audit records are full-text recording of privileged commands or the individual identities of shared account users.
Checks: C-57128r841551_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Log in to MariaDB Enterprise Server and verify the audit log location. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; Verify the necessary audit filters are in place: MariaDB> SELECT * FROM mysql.server_audit_filters; In another terminal, view the audit log file: $ tail -f /var/log/mysql/audit.log Back in the MariaDB shell, run a query which matches an audit filter. Example if query_events is ALL: MariaDB> SELECT * FROM mysql.help_topic; Verify the entry was logged in the audit log and contains the necessary event user information. If not, this is a finding.

Fix: F-57079r841552_fix

Update necessary audit filters. For example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must by default shut down upon audit failure, to include the unavailability of space for more audit log records; or must be configurable to shut down upon audit failure.
AU-5 - Medium - CCI-000140 - V-253677 - SV-253677r960915_rule
RMF Control
AU-5
Severity
Medium
CCI
CCI-000140
Version
MADB-10-001700
Vuln IDs
  • V-253677
Rule IDs
  • SV-253677r960915_rule
It is critical that when MariaDB is at risk of failing to process audit logs as required, an action is taken to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. When the need for system availability does not outweigh the need for a complete audit trail, the DBMS should shut down immediately, rolling back all in-flight transactions. Systems where audit trail completeness is paramount will most likely be at a lower MAC level than MAC I; the final determination is the prerogative of the application owner, subject to Authorizing Official concurrence. In any case, sufficient auditing resources must be allocated to avoid a shutdown in all but the most extreme situations.
Checks: C-57129r841554_chk

If the application owner has determined that the need for system availability outweighs the need for a complete audit trail, this is not applicable (NA). Otherwise, review the procedures, manual and/or automated, for monitoring the space used by audit trail(s) and for off-loading audit records to a centralized log management system. If the procedures do not exist, this is a finding. If the procedures exist, request evidence that they are followed. If the evidence indicates that the procedures are not followed, this is a finding. If the procedures exist, inquire if the system has ever run out of audit trail space in the last two years or since the last system upgrade, whichever is more recent. If it has run out of space in this period, and the procedures have not been updated to compensate, this is a finding.

Fix: F-57080r841555_fix

Modify DBMS, OS, or third-party logging application settings to alert appropriate personnel when a specific percentage of log storage capacity is reached.

b
MariaDB must be configurable to overwrite audit log records, oldest first (First-In-First-Out - FIFO), in the event of unavailability of space for more audit log records.
AU-5 - Medium - CCI-000140 - V-253678 - SV-253678r960915_rule
RMF Control
AU-5
Severity
Medium
CCI
CCI-000140
Version
MADB-10-001800
Vuln IDs
  • V-253678
Rule IDs
  • SV-253678r960915_rule
It is critical that when MariaDB is at risk of failing to process audit logs as required, it take action to mitigate the failure. Audit processing failures include software/hardware errors; failures in the audit capturing mechanisms; and audit storage capacity being reached or exceeded. Responses to audit failure depend upon the nature of the failure mode. When availability is an overriding concern, approved actions in response to an audit failure are as follows: (i) If the failure was caused by the lack of audit record storage capacity, the DBMS must continue generating audit records, if possible (automatically restarting the audit service if necessary), overwriting the oldest audit records in a first-in-first-out manner. (ii) If audit records are sent to a centralized collection server and communication with this server is lost or the server fails, the DBMS must queue audit records locally until communication is restored or until the audit records are retrieved manually. Upon restoration of the connection to the centralized collection server, action should be taken to synchronize the local audit data with the collection server. Systems where availability is paramount will most likely be MAC I; the final determination is the prerogative of the application owner, subject to Authorizing Official concurrence. In any case, sufficient auditing resources must be allocated to avoid audit data loss in all but the most extreme situations.
Checks: C-57130r841557_chk

If the application owner has determined that the need for system availability outweighs the need for a complete audit trail, this is not applicable (NA). If an externally managed and monitored partition or logical volume that can be grown dynamically is being used for logging, this is not a finding. If MariaDB is auditing to a directory that is not being actively checked for availability of disk space, and if a tool, utility, script, or other mechanism is not being used to ensure sufficient disk space is available for the creation of new audit logs, this is a finding. If a tool, utility, script, or other mechanism is being used to rotate audit logs, and oldest logs are not being removed to ensure sufficient space for newest logs, or oldest logs are not being replaced by newest logs, this is a finding.

Fix: F-57081r841558_fix

Establish a process with accompanying tools for monitoring available disk space and ensuring that sufficient disk space is maintained to continue generating audit logs, overwriting the oldest existing records if necessary. To set up the audit logs to write to sylog: Edit the mariadb-enterprise.cnf file. Add the following under the [mariadb] section: server_audit_output_type = 'syslog' After the .cnf file is updated and saved, the mariadb database service must be restarted. If not writing to syslog, log rotation and purging should be configured.

b
The audit information produced by MariaDB must be protected from unauthorized read access.
AU-9 - Medium - CCI-000162 - V-253679 - SV-253679r960930_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-000162
Version
MADB-10-002000
Vuln IDs
  • V-253679
Rule IDs
  • SV-253679r960930_rule
If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is difficult, if not impossible, to achieve. In addition, access to audit records provides information an attacker could potentially use to his or her advantage. To ensure the veracity of audit data, the information system and/or the application must protect audit information from any and all unauthorized access. This includes read, write, copy, etc. This requirement can be achieved through multiple methods which will depend upon system architecture and design. Some commonly employed methods include ensuring log files enjoy the proper file system permissions utilizing file system protections and limiting log data location. Additionally, applications with user interfaces to audit records should not allow for the unfettered manipulation of or access to those records via the application. If the application provides access to the audit data, the application becomes accountable for ensuring that audit information is protected from unauthorized access. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.
Checks: C-57131r841560_chk

Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

Fix: F-57082r841561_fix

If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

b
The audit information produced by MariaDB must be protected from unauthorized modification.
AU-9 - Medium - CCI-000163 - V-253680 - SV-253680r960933_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-000163
Version
MADB-10-002100
Vuln IDs
  • V-253680
Rule IDs
  • SV-253680r960933_rule
If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is impossible to achieve. To ensure the veracity of audit data the information system and/or the application must protect audit information from unauthorized modification. This requirement can be achieved through multiple methods that will depend upon system architecture and design. Some commonly employed methods include ensuring log files enjoy the proper file system permissions and limiting log data locations. Applications providing a user interface to audit data will leverage user permissions and roles identifying the user accessing the data and the corresponding rights that the user enjoys to make access decisions regarding the modification of audit data. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity. Modification of database audit data could mask the theft of, or the unauthorized modification of, sensitive data stored in the database.
Checks: C-57132r841563_chk

Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

Fix: F-57083r841564_fix

If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

b
The audit information produced by MariaDB must be protected from unauthorized deletion.
AU-9 - Medium - CCI-000164 - V-253681 - SV-253681r960936_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-000164
Version
MADB-10-002200
Vuln IDs
  • V-253681
Rule IDs
  • SV-253681r960936_rule
If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is impossible to achieve. To ensure the veracity of audit data, the information system and/or the application must protect audit information from unauthorized deletion. This requirement can be achieved through multiple methods which will depend upon system architecture and design. Some commonly employed methods include ensuring log files enjoy the proper file system permissions utilizing file system protections; restricting access; and backing up log data to ensure log data is retained. Applications providing a user interface to audit data will leverage user permissions and roles identifying the user accessing the data and the corresponding rights the user enjoys to make access decisions regarding the deletion of audit data. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity. Deletion of database audit data could mask the theft of, or the unauthorized modification of, sensitive data stored in the database.
Checks: C-57133r841566_chk

Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

Fix: F-57084r841567_fix

If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

b
MariaDB must protect its audit features from unauthorized access.
AU-9 - Medium - CCI-001493 - V-253682 - SV-253682r960939_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-001493
Version
MADB-10-002300
Vuln IDs
  • V-253682
Rule IDs
  • SV-253682r960939_rule
Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Depending upon the log format and application, system and application log tools may provide the only means to manipulate and manage application and system log data. It is, therefore, imperative that access to audit tools be controlled and protected from unauthorized access. Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys to make access decisions regarding the access to audit tools. Audit tools include, but are not limited to, OS-provided audit tools, vendor-provided audit tools, and open source audit tools needed to successfully view and manipulate audit information system activity and records. If an attacker were to gain access to audit tools, he could analyze audit logs for system weaknesses or weaknesses in the auditing itself. An attacker could also manipulate logs to hide evidence of malicious activity.
Checks: C-57134r841569_chk

Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

Fix: F-57085r841570_fix

If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

b
MariaDB must protect its audit configuration from unauthorized modification.
AU-9 - Medium - CCI-001494 - V-253683 - SV-253683r960942_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-001494
Version
MADB-10-002400
Vuln IDs
  • V-253683
Rule IDs
  • SV-253683r960942_rule
Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit data. Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys to make access decisions regarding the modification of audit tools. Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.
Checks: C-57135r841572_chk

Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

Fix: F-57086r841573_fix

If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

b
MariaDB must protect its audit features from unauthorized removal.
AU-9 - Medium - CCI-001495 - V-253684 - SV-253684r960945_rule
RMF Control
AU-9
Severity
Medium
CCI
CCI-001495
Version
MADB-10-002500
Vuln IDs
  • V-253684
Rule IDs
  • SV-253684r960945_rule
Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit data. Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys to make access decisions regarding the deletion of audit tools. Audit tools include, but are not limited to, vendor-provided and open-source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.
Checks: C-57136r841575_chk

Determine if the MariaDB Enterprise Audit plugin is logging to a file or syslog. MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If FILE, find the location of the audit log: MariaDB> SHOW GLOBAL VARIABLES LIKE 'server_audit_file_path'; If FILE, check the permission of the file: $ sudo ls -al /path/to/audit.log Consult the organization's security guide on acceptable permissions and ownership of logs with respect to who can modify them. Verify the log files have the set configurations. If the permissions are not set to the organization's standards, this is a finding. If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

Fix: F-57087r841576_fix

If the audit.log file permissions do not comply with organization's standards, change the permissions. Example: $ chown user:group /path/to/audit.log $ chmod 660 /path/to/audit.log If the MariaDB server is configured to use syslog for logging, consult the organization's syslog setting for permissions and ownership of logs with respect to who can modify them.

b
MariaDB must limit privileges to change software modules, to include stored procedures, functions and triggers, and links to software external to the DBMS.
CM-5 - Medium - CCI-001499 - V-253685 - SV-253685r960960_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
MADB-10-002600
Vuln IDs
  • V-253685
Rule IDs
  • SV-253685r960960_rule
If the system were to allow any user to make changes to software libraries, those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. Accordingly, only qualified and authorized individuals must be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. Unmanaged changes that occur to the database code can lead to unauthorized or compromised installations.
Checks: C-57137r841578_chk

Review documentation to determine which users are authorized to modify the MariaDB Enterprise Server binary files and shared library paths. If any unauthorized users are granted modify rights, this is a finding. Check what users have access to install/uninstall MariaDB Enterprise Server plugins. This privilege can be listed in one of three places: Table level, database level, or global. Table level: MariaDB> SELECT user, host FROM mysql.tables_priv WHERE db = 'mysql' and table_name = ' plugin'; Database level: MariaDB> SELECT user, host FROM mysql.db WHERE db = 'mysql' and (insert_priv = 'y') or (delete_priv = 'y') or (insert_priv = 'y' and delete_priv = 'y'); Global: SELECT user, host FROM mysql.user WHERE (insert_priv = 'y') or (delete_priv = 'y') or (insert_priv = 'y' and delete_priv = 'y'); If any user identified by the above queries is not authorized to install/uninstall MariaDB Enterprise Server plugins, this is a finding. Review monitoring procedures and implementation evidence to verify monitoring of changes to database software libraries, related applications, and configuration files is done. Verify the list of files and directories being monitored is complete. If monitoring does not occur or is not complete, this is a finding.

Fix: F-57088r841579_fix

Remove privileges from users identified as not authorized to install/uninstall MariaDB Enterprise Server plugins. Implement procedures to monitor for unauthorized changes to DBMS software libraries, related software application libraries, and configuration files. If a third-party automated tool is not employed, an automated job that reports file information on the directories and files of interest and compares them to the baseline report for the same will meet the requirement.

c
The MariaDB software installation account must be restricted to authorized users.
CM-5 - High - CCI-001499 - V-253686 - SV-253686r960960_rule
RMF Control
CM-5
Severity
High
CCI
CCI-001499
Version
MADB-10-002700
Vuln IDs
  • V-253686
Rule IDs
  • SV-253686r960960_rule
When dealing with change control issues, it should be noted any changes to the hardware, software, and/or firmware components of the information system and/or application can have significant effects on the overall security of the system. If the system were to allow any user to make changes to software libraries, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. Accordingly, only qualified and authorized individuals must be allowed access to information system components for purposes of initiating changes, including upgrades and modifications. DBA and other privileged administrative or application owner accounts are granted privileges that allow actions that can have a great impact on database security and operation. It is especially important to grant privileged access to only those persons who are qualified and authorized to use them.
Checks: C-57138r841581_chk

Review procedures for controlling, granting access to, and tracking use of the MariaDB software installation account. If access or use of this account is not restricted to the minimum number of personnel required or if unauthorized access to the account has been granted, this is a finding.

Fix: F-57089r841582_fix

Develop, document, and implement procedures to restrict and track use of the MariaDB software installation account.

b
Database software, including MariaDB configuration files, must be stored in dedicated directories, separate from the host OS and other applications.
CM-5 - Medium - CCI-001499 - V-253687 - SV-253687r960960_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
MADB-10-002800
Vuln IDs
  • V-253687
Rule IDs
  • SV-253687r960960_rule
When dealing with change control issues, it should be noted any changes to the hardware, software, and/or firmware components of the information system and/or application can potentially have significant effects on the overall security of the system. Multiple applications can provide a cumulative negative effect. A vulnerability and subsequent exploit to one application can lead to an exploit of other applications sharing the same security context. For example, an exploit to a web server process that leads to unauthorized administrative access to host system directories can most likely lead to a compromise of all applications hosted by the same system. Database software not installed using dedicated directories both threatens and is threatened by other hosted applications. Access controls defined for one application may by default provide access to the other application s database objects or directories. Any method that provides any level of separation of security context assists in the protection between applications.
Checks: C-57139r841584_chk

Review the MariaDB software library directory and note other root directories located on the same disk directory or any subdirectories. The default install directory is /var/lib/mysql. If any non-MariaDB software directories exist on the disk directory, examine or investigate their use. If any of the directories are used by other applications, including third-party applications that use MariaDB, this is a finding. Only applications that are required for the functioning and administration, not use, of MariaDB should be located in the same disk directory as the MariaDB software libraries. If other applications are located in the same directory as MariaDB, this is a finding.

Fix: F-57090r841585_fix

Install all applications on directories separate from the MariaDB software library directory. Relocate any directories or reinstall other application software that currently shares the MariaDB software library directory.

b
Database objects (including but not limited to tables, indexes, storage, stored procedures, functions, triggers, links to software external to MariaDB, etc.) must be owned by database/MariaDB principals authorized for ownership.
CM-5 - Medium - CCI-001499 - V-253688 - SV-253688r960960_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
MADB-10-002900
Vuln IDs
  • V-253688
Rule IDs
  • SV-253688r960960_rule
Within the database, object ownership implies full privileges to the owned object, including the privilege to assign access to the owned objects to other subjects. Database functions and procedures can be coded using definers rights. This allows anyone who uses the object to perform the actions if they were the owner. If not properly managed, this can lead to privileged actions being taken by unauthorized individuals. Conversely, if critical tables or other objects rely on unauthorized owner accounts, these objects may be lost when an account is removed.
Checks: C-57140r841587_chk

Review system documentation to identify accounts authorized to have privileges against database objects. Review account privileges on objects in the database(s). To show the list of system privileges that the MariaDB server supports, run: MariaDB> SHOW PRIVILEGES; Gather a list of SHOW GRANTS commands. SHOW GRANTS will list the privileges granted to the account. Run this database query to create the SHOW GRANTS script for each user: MariaDB> SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N'; Run each SHOW GRANTS command for each user. MariaDB> SHOW GRANTS FOR 'user'@'host'; Verify that all users have the correct privileges, if they do not, this is a finding. Only DEFINERS of routines (functions and procedures) can change routines. To view the DEFINERS of all functions and procedures, as database administrator run the following SQL: MariaDB> SELECT * FROM mysql.proc \G Only DEFINERS of triggers can change triggers. To view all triggers and their DEFINERS, as database administrator run the following SQL: MariaDB> SELECT * FROM information_schema.triggers \G If any database users are found to have unauthorized privileges on database objects, this is a finding.

Fix: F-57091r841588_fix

Assign ownership of authorized objects to authorized object owner accounts.

b
The role(s)/group(s) used to modify database structure (including but not necessarily limited to tables, indexes, storage, etc.) and logic modules (stored procedures, functions, triggers, links to software external to the MariaDB, etc.) must be restricted to authorized users.
CM-5 - Medium - CCI-001499 - V-253689 - SV-253689r960960_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001499
Version
MADB-10-003000
Vuln IDs
  • V-253689
Rule IDs
  • SV-253689r960960_rule
If the MariaDB were to allow any user to make changes to database structure or logic, then those changes might be implemented without undergoing the appropriate testing and approvals that are part of a robust change management process. Accordingly, only qualified and authorized individuals must be allowed to obtain access to information system components for purposes of initiating changes, including upgrades and modifications. Unmanaged changes that occur to the database software libraries or configuration can lead to unauthorized or compromised installations.
Checks: C-57141r841590_chk

Gather a list of SHOW GRANTS commands. This list will include users and roles: MariaDB> SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user; Run each SHOW GRANTS commands and verify that all objects have the correct privileges, if they do not, this is a finding. MariaDB> SHOW GRANTS FOR 'user'@'host'; Find the data directory and verify its operating system privileges. MariaDB> SHOW GLOBAL VARIABLES LIKE '%datadir%'; # ls -al /path/to/datadir If permissions of the database directory are not limited to an authorized user account, this is a finding.

Fix: F-57092r841591_fix

As the database administrator, revoke any permissions from a role that are deemed unnecessary by running the following SQL: MariaDB> REVOKE PERMISSION FROM ROLE_NAME ; Revoke any roles from a user if they are deemed unnecessary by running the following SQL: MariaDB> REVOKE ROLE_NAME FROM test_user ; If the revoked role is the default role for the user, the REVOKE command should be followed by a command to set a new default role that has appropriate permissions, or no default role: MariaDB> SET DEFAULT ROLE NONE FOR test_user ; MariaDB> SET DEFAULT ROLE ROLE_NAME for test_user ;

b
Default demonstration and sample databases, database objects, and applications must be removed.
CM-7 - Medium - CCI-000381 - V-253690 - SV-253690r960963_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-000381
Version
MADB-10-003100
Vuln IDs
  • V-253690
Rule IDs
  • SV-253690r960963_rule
Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). It is detrimental for software products to provide, or install by default, functionality exceeding requirements or mission objectives. Examples include, but are not limited to, installing advertising software, demonstrations, or browser plugins not related to requirements or providing a wide array of functionality, not required for every mission, that cannot be disabled. DBMSs must adhere to the principles of least functionality by providing only essential capabilities. Demonstration and sample database objects and applications present publicly known attack points for malicious users. These demonstration and sample objects are meant to provide simple examples of coding-specific functions and are not developed to prevent vulnerabilities from being introduced to the DBMS and host system.
Checks: C-57142r841593_chk

As the database administrator, show all databases by running the following SQL: MariaDB> SHOW DATABASES; Determine if the test database still exists. If it does, this is a finding.

Fix: F-57093r841594_fix

If a test database is found, this is a sign that the mysql_secure_installation script was not ran when the database software was installed. It is recommended to do so. This script will prompt the user to set the MariaDB root user's password, remove all anonymous users, disallow the root user from logging in remotely to the database, remove the test database and access to it, and then reload the privilege tables. $ mariadb-secure-installation reply Y to setting a root password if one is not already set. reply Y to Remove anonymous users reply Y to disallow root login remotely reply Y to Remove test database and access to it reply Y to Reload privilege tables now (this ensures that all changes made so far will take effect immediately) Note: For this request only the "reply Y to Remove" test database and access to it is necessary, but "Y" to all the questions is recommended. Alternatively, simply dropping the test database will remedy the finding. MariaDB> DROP DATABASE test;

b
Unused database components, DBMS software, and database objects must be removed.
CM-7 - Medium - CCI-000381 - V-253691 - SV-253691r960963_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-000381
Version
MADB-10-003200
Vuln IDs
  • V-253691
Rule IDs
  • SV-253691r960963_rule
Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). It is detrimental for software products to provide, or install by default, functionality exceeding requirements or mission objectives. DBMSs must adhere to the principles of least functionality by providing only essential capabilities.
Checks: C-57143r841596_chk

List all plugins and determine which are acceptable. MariaDB> SHOW PLUGINS; If unused plugins are installed and are not documented and authorized, this is a finding.

Fix: F-57094r841597_fix

To uninstall the plugin but leave the libraries in place: MariaDB> UNINSTALL PLUGIN plugin_name; To uninstall the plugin and the associated libraries: MariaDB> UNINSTALL SONAME plugin_name;

b
Access to external executables must be disabled or restricted.
CM-7 - Medium - CCI-000381 - V-253692 - SV-253692r960963_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-000381
Version
MADB-10-003400
Vuln IDs
  • V-253692
Rule IDs
  • SV-253692r960963_rule
Information systems are capable of providing a wide variety of functions and services. Some of the functions and services, provided by default, may not be necessary to support essential organizational operations (e.g., key missions, functions). It is detrimental for applications to provide, or install by default, functionality exceeding requirements or mission objectives. Applications must adhere to the principles of least functionality by providing only essential capabilities. MariaDB may spawn additional external processes to execute procedures that are defined in MariaDB but stored in external host files (external procedures). The spawned process used to execute the external procedure may operate within a different OS security context than MariaDB and provide unauthorized access to the host system.
Checks: C-57144r841599_chk

MariaDB's LOAD DATA LOCAL INFILE command can interact with the server's underlying OS. To check the value of this option, run the following command as the database administrator: MariaDB> SHOW GLOBAL VARIABLES LIKE 'local_infile'; Verify the option is set according to the security guide. If it is not, this is a finding. If the value of local_infile is set to ON per the security guide, user privileges must be checked. Only users with FILE privilege can use the LOAD DATA LOCAL INFILE command. To check the users who have FILE privilege against the security guide, run the following commands as the database administrator. 1. Check which users have FILE privilege and GRANT OPTION privileges and compare to the security guide to determine if a user has FILE privilege that should not or if a user has GRANT OPTION and should not. If the users have privileges they should not have, this is a finding. Run this script to create the SHOW GRANTS script for each user: MariaDB> SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N'; Run each SHOW GRANTS command for each user. MariaDB> SHOW GRANTS FOR 'user'@'host'; 2. Check which roles have FILE privilege and GRANT OPTION privileges and compare to the security guide to determine if a role has FILE privilege that should not or if a role has GRANT OPTION and should not. If the roles have privileges they should not have, this is a finding. MariaDB> SELECT DISTINCT CONCAT('SHOW GRANTS FOR ',role, ';') FROM mysql.roles_mapping; Run each SHOW GRANTS command for each role. 3. From the two outputs above, check which users and roles can set roles and grant privileges by checking who has GRANT OPTION and FILE privileges and comparing to the security guide. If any user or role has GRANT OPTION or FILE privileges they should not have, this is a finding.

Fix: F-57095r841600_fix

To disable LOAD DATA LOCAL INFILE make the following update as the database administrator: Edit the mariadb-enterprise.cnf configuration file located in /etc/my.cnf.d/. Under [mariadb], add the following: local_infile = 0 Save the configuration file. This change will not take effect until MariaDB Enterprise Server is restarted. To remove FILE and GRANT OPTION privileges use the right combination of the following commands: 1. revoke FILE privilege from a user MariaDB> REVOKE FILE FROM 'user'@'host'; 2. revoke FILE privilege from a role MariaDB> REVOKE FILE FROM role; 3. revoke GRANT OPTION privilege from a user MariaDB> REVOKE GRANT OPTION FROM 'user'@'host'; 4. revoke a role grant from a user MariaDB> REVOKE ROLE FROM grantee;

b
MariaDB must be configured to prohibit or restrict the use of organization-defined functions, ports, protocols, and/or services, as defined in the PPSM CAL and vulnerability assessments.
CM-7 - Medium - CCI-000382 - V-253693 - SV-253693r960966_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-000382
Version
MADB-10-003500
Vuln IDs
  • V-253693
Rule IDs
  • SV-253693r960966_rule
To prevent unauthorized connection of devices, unauthorized transfer of information, or unauthorized tunneling (i.e., embedding of data types within data types), organizations must disable or restrict unused or unnecessary physical and logical ports/protocols/services on information systems. Applications are capable of providing a wide variety of functions and services. Some of the functions and services provided by default may not be necessary to support essential organizational operations. Additionally, it is sometimes convenient to provide multiple services from a single component (e.g., email and web services); however, doing so increases risk over limiting the services provided by any one component. To support the requirements and principles of least functionality, the application must support the organizational requirements, providing only essential capabilities and limiting the use of ports, protocols, and/or services to only those required, authorized, and approved to conduct official business or address authorized quality-of-life issues. Database Management Systems using ports, protocols, and services deemed unsafe are open to attack through those ports, protocols, and services. This can allow unauthorized access to the database and through the database to other components of the information system.
Checks: C-57145r841602_chk

Review system documentation for a list of approved ports. As the database administrator, run the following command to determine the currently defined port: MariaDB> SHOW GLOBAL VARIABLES LIKE '%port%'; If the currently defined port is deemed prohibited, this is a finding.

Fix: F-57096r841603_fix

Modify the MariaDB configuration file located within /etc/my.cnf.d/ and update the variable port to an acceptable port. Restart MariaDB Enterprise Server. Example: [server] port = 4008

b
MariaDB must uniquely identify and authenticate organizational users (or processes acting on behalf of organizational users).
IA-2 - Medium - CCI-000764 - V-253694 - SV-253694r960969_rule
RMF Control
IA-2
Severity
Medium
CCI
CCI-000764
Version
MADB-10-003600
Vuln IDs
  • V-253694
Rule IDs
  • SV-253694r960969_rule
To ensure accountability and prevent unauthenticated access, organizational users must be identified and authenticated to prevent potential misuse and compromise of the system. Organizational users include organizational employees or individuals the organization deems to have equivalent status of employees (e.g., contractors). Organizational users (and any processes acting on behalf of users) must be uniquely identified and authenticated for all accesses, except the following: (i) Accesses explicitly identified and documented by the organization. Organizations document specific user actions that can be performed on the information system without identification or authentication; and (ii) Accesses that occur through authorized use of group authenticators without individual authentication. Organizations may require unique identification of individuals using shared accounts, for detailed accountability of individual activity. It is recommended to not allow shared accounts, including root. The root user is known by all attackers, and often used in attempted attacks on the database servers.
Checks: C-57146r841605_chk

All users should have individual accounts with appropriate privileges. The root users should be removed after administrative accounts with SUPER privilege are created. Query all users and determine if any are suspected shared accounts. Document any necessary shared accounts. MariaDB> SELECT user, host FROM mysql.user; Determine if any accounts are shared. A shared account is defined as a username, hostname, and password that are used by multiple individuals to log in to MariaDB. An example of a shared account is the MariaDB root account – root@localhost. If accounts are determined to be shared, determine if individuals are first individually authenticated. If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding. The key is individual accountability. If this can be traced, this is not a finding. If accounts are determined to be shared, determine if they are directly accessible to end users. If so, this is a finding. Review contents of audit logs, traces, and data tables to confirm the identity of the individual user performing the action is captured. If shared identifiers are found, and not accompanied by individual identifiers, this is a finding.

Fix: F-57097r841606_fix

Remove shared accounts which are not documented and have been determined to not be necessary. MariaDB> DROP USER 'user'@'hostname';

c
If MariaDB authentication, using passwords, is employed, then MariaDB must enforce the DOD standards for password complexity.
- High - CCI-004066 - V-253695 - SV-253695r998223_rule
RMF Control
Severity
High
CCI
CCI-004066
Version
MADB-10-003700
Vuln IDs
  • V-253695
Rule IDs
  • SV-253695r998223_rule
OS/enterprise authentication and identification must be used (SRG-APP-000023-DB-000001). Native MariaDB authentication may be used only when circumstances make it unavoidable; and must be documented and Authorizing Official (AO)-approved. The DOD standard for authentication is DOD-approved PKI certificates. Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate and requires AO approval. In such cases, the DOD standards for password complexity and lifetime must be implemented. DBMS products that can inherit the rules for these from the operating system or access control program (e.g., Microsoft Active Directory) must be configured to do so. For MariaDB, the rules must be enforced using available configuration parameters or custom code. By default, MariaDB Enterprise Server has the simple_password_check plugin installed and enabled. However, the default password requirements are eight character minimum, one numeric character, and one special character.
Checks: C-57147r998222_chk

Check the simple_password_check plugin variables to ensure they match the password requirements. MariaDB> SHOW GLOBAL VARIABLES LIKE 'simple_password_check_%'; Determine whether the following rules are enforced. If they do not meet the following password requirements, this is a finding. a. minimum of 15 characters, including at least one of each of the following character sets: - Uppercase - Lowercase - Numerics - Special characters (e.g., ~ ! @ # $ % ^ & * ( ) _ + = - ' [ ] / ? > <) b. Minimum number of characters changed from previous password: 50 percent of the minimum password length; that is, eight.

Fix: F-57098r841609_fix

Locate the MariaDB Enterprise Server configuration file (mariadb-enterprise.cnf) which contains the simple_password_check plugin variables within /etc/my.cnf.d/. Edit the variables. Example: simple_password_check_digits = 2 simple_password_check_letters_same_case = 2 simple_password_check_minimal_length = 15 simple_password_check_other_characters = 2

b
If MariaDB authentication using passwords is employed, MariaDB must enforce the DOD standards for password lifetime.
- Medium - CCI-004066 - V-253696 - SV-253696r998224_rule
RMF Control
Severity
Medium
CCI
CCI-004066
Version
MADB-10-003750
Vuln IDs
  • V-253696
Rule IDs
  • SV-253696r998224_rule
OS/enterprise authentication and identification must be used (SRG-APP-000023-DB-000001). Native MariaDB authentication may be used only when circumstances make it unavoidable and must be documented and Authorizing Official (AO)-approved. The DOD standard for authentication is DOD-approved PKI certificates. Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate and requires AO approval. In such cases, the DOD standards for password complexity and lifetime must be implemented. DBMS products that can inherit the rules for these from the operating system or access control program (e.g., Microsoft Active Directory) must be configured to do so. For MariaDB, the rules must be enforced using available configuration parameters or custom code.
Checks: C-57148r841611_chk

Check the default password lifetime variable to verify it matches the password requirement. MariaDB> SHOW GLOBAL VARIABLES LIKE 'default_password_lifetime%'; If the value returned is not 60 or less, this is a finding.

Fix: F-57099r841612_fix

Locate the MariaDB Enterprise Server configuration file (mariadb-enterprise.cnf) that contains the password variables within /etc/my.cnf.d/. Edit the variables. Example: default_password_lifetime = 60

c
If passwords are used for authentication, MariaDB must store only hashed, salted representations of passwords.
- High - CCI-004062 - V-253697 - SV-253697r998225_rule
RMF Control
Severity
High
CCI
CCI-004062
Version
MADB-10-003800
Vuln IDs
  • V-253697
Rule IDs
  • SV-253697r998225_rule
The DOD standard for authentication is DOD-approved PKI certificates. Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate and requires Authorizing Official (AO) approval. In such cases, database passwords stored in clear text, using reversible encryption, or using unsalted hashes would be vulnerable to unauthorized disclosure. Database passwords must always be in the form of one-way, salted hashes when stored internally or externally to the MariaDB.
Checks: C-57149r841614_chk

MariaDB stores passwords encrypted. When querying users, the passwords are displayed encrypted. However, third-party applications, scripts, etc., might be storing passwords. In such cases, it is important to ensure these passwords are encrypted. Check all third-party applications, scripts, etc., which connect to the database and verify the passwords are encrypted. If any passwords are found in clear text, this is a finding.

Fix: F-57100r841615_fix

Document all applications, scripts, etc., which connect to the database server. Ensure passwords, if stored, are encrypted and secure.

c
If passwords are used for authentication, MariaDB must transmit only encrypted representations of passwords.
IA-5 - High - CCI-000197 - V-253698 - SV-253698r961029_rule
RMF Control
IA-5
Severity
High
CCI
CCI-000197
Version
MADB-10-003900
Vuln IDs
  • V-253698
Rule IDs
  • SV-253698r961029_rule
The DoD standard for authentication is DoD-approved PKI certificates. Authentication based on User ID and Password may be used only when it is not possible to employ a PKI certificate and requires AO approval. In such cases, passwords need to be protected at all times, and encryption is the standard method for protecting passwords during transmission. DBMS passwords sent in clear text format across the network are vulnerable to discovery by unauthorized users. Disclosure of passwords may easily lead to unauthorized access to the database.
Checks: C-57150r841617_chk

MariaDB by default only sends passwords encrypted. However, when authenticating via the PAM Authentication Plugin, the password is sent in cleartext. Thus when using PAM authentication, it is recommended to use TLS/SSL encryption for all database connections. If using PAM authentication, verify TLS/SSL is in use. Run the following database command: MariaDB> STATUS; Verify the line which starts with "SSL:" is as expected. If it returns "Not in use", this is a finding.

Fix: F-57101r841618_fix

As the administrator locate the MariaDB configuration file to change. This varies depending on setup and how configuration files are managed but should be in /etc/my.cnf.d/. It is recommended to have a separate configuration file within this directory for SSL connection information. In the [server] section add the lines for SSL: ssl ssl-ca=/path/to/ssl/ca-cert.pem ssl-cert=/path/to/ssl/server-cert.pem ssl-key=/path/to/ssl/server-key.pem Restart of the MariaDB Server and verify SSL is being used. MariaDB> STATUS; Verify line beginning with "SSL:".

b
MariaDB, when utilizing PKI-based authentication, must validate certificates by performing RFC 5280-compliant certification path validation.
IA-5 - Medium - CCI-000185 - V-253699 - SV-253699r961038_rule
RMF Control
IA-5
Severity
Medium
CCI
CCI-000185
Version
MADB-10-004000
Vuln IDs
  • V-253699
Rule IDs
  • SV-253699r961038_rule
The DoD standard for authentication is DoD-approved PKI certificates. A certificate's certification path is the path from the end entity certificate to a trusted root certification authority (CA). Certification path validation is necessary for a relying party to make an informed decision regarding acceptance of an end entity certificate. Certification path validation includes checks such as certificate issuer trust, time validity and revocation status for each certificate in the certification path. Revocation status information for CA and subject certificates in a certification path is commonly provided via certificate revocation lists (CRLs) or online certificate status protocol (OCSP) responses. Database Management Systems that do not validate certificates by performing RFC 5280-compliant certification path validation are in danger of accepting certificates that are invalid and/or counterfeit. This could allow unauthorized access to the database.
Checks: C-57151r841620_chk

As the database administrator, list all users and their SSL setup by running the following: MariaDB> SELECT user, host, ssl_type FROM mysql.user; Use the result of the next query to verify the MariaDB Server is using certificates: MariaDB> STATUS; Verify the line beginning with "SSL:" returns expected SSL information. Using the following query, verify SSL is configured as expected: MariaDB> SHOW GLOBAL VARIABLES LIKE %ssl% ; If not configured as expected, this is a finding.

Fix: F-57102r841621_fix

As the administrator locate the MariaDB configuration file to change. This varies depending on setup and how configuration files are managed but should be in /etc/my.cnf.d/. It is recommended to have a separate configuration file within this directory for SSL connection information. In the [server] section add the lines for SSL: ssl-ca=/path/to/ssl/ca-cert.pem ssl-cert=/path/to/ssl/server-cert.pem ssl-key=/path/to/ssl/server-key.pem To fully implement SSL for MariaDB, the client settings and user accounts need to be set up as well. More information can be found here: https://mariadb.com/kb/en/securing-connections-for-client-and-server/

c
MariaDB must enforce authorized access to all PKI private keys stored/used by the DBMS.
IA-5 - High - CCI-000186 - V-253700 - SV-253700r961041_rule
RMF Control
IA-5
Severity
High
CCI
CCI-000186
Version
MADB-10-004100
Vuln IDs
  • V-253700
Rule IDs
  • SV-253700r961041_rule
The DoD standard for authentication is DoD-approved PKI certificates. PKI certificate-based authentication is performed by requiring the certificate holder to cryptographically prove possession of the corresponding private key. If the private key is stolen, an attacker can use the private key(s) to impersonate the certificate holder. In cases where the MariaDB-stored private keys are used to authenticate MariaDB to the system's clients, loss of the corresponding private keys would allow an attacker to successfully perform undetected man in the middle attacks against the MariaDB system and its clients. Both the holder of a digital certificate and the issuing authority must take careful measures to protect the corresponding private key. Private keys should always be generated and protected in FIPS 140-2 validated cryptographic modules. All access to the private key(s) of MariaDB must be restricted to authorized and authenticated users. If unauthorized users have access to one or more of the MariaDB s private keys, an attacker could gain access to the key(s) and use them to impersonate the database on the network or otherwise perform unauthorized actions.
Checks: C-57152r841623_chk

First, as the database administrator, verify the following settings: Note: If no specific directory given before the filename, the files are stored in DATADIR. MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_ca'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_cert'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_key'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'ssl_crlpath'; MariaDB> SHOW GLOBAL VARIABLES LIKE 'datadir'; Verify the permissions of the above files. Example: ls -al /path/to/ssl_cert MariaDB Enterprise Server runs as the mysql operating system user, thus should be owned by user mysql and group mysql with user read and group read file level permissions. Example: -r-------. 1 mysql If the files and directories are not properly secured, this is a finding.

Fix: F-57103r841624_fix

If the SSL files are not secured properly in the file system, change the ownership and permissions with operating system operations. Example: chown mysql:mysql /path/to/file chmod 440 /path/to/file

b
MariaDB must map PKI ID to an associated user account.
IA-5 - Medium - CCI-000187 - V-253701 - SV-253701r961044_rule
RMF Control
IA-5
Severity
Medium
CCI
CCI-000187
Version
MADB-10-004200
Vuln IDs
  • V-253701
Rule IDs
  • SV-253701r961044_rule
The DoD standard for authentication is DoD-approved PKI certificates. Once a PKI is validated, it is mapped to the DBMS user account for the authentication identity and then can be used for authorization decisions.
Checks: C-57153r841626_chk

Query all users to confirm issuer and subject are configured correctly: MariaDB>SELECT user, host, ssl_type, CAST(x509_issuer AS CHAR) AS issuer, CAST(x509_subject AS CHAR) AS subject FROM mysql.user; If users are not mapped correctly, this is a finding.

Fix: F-57104r841627_fix

Example command to create users with proper X509 certificate subject and issuer: MariaDB>CREATE USER 'janedoe'@'%' IDENTIFIED BY 'Some_Password_Here_$9' REQUIRE SUBJECT '/C=US/ST=Ohio/L=Columbus/O=MariaDB Corporation/CN=Jane Doe' AND ISSUER '/C=US/ST=Ohio/L=Columbus/O=MariaDB Corporation/CN=MariaDB CA';

c
MariaDB must obscure feedback of authentication information during the authentication process to protect the information from possible exploitation/use by unauthorized individuals.
IA-6 - High - CCI-000206 - V-253702 - SV-253702r961047_rule
RMF Control
IA-6
Severity
High
CCI
CCI-000206
Version
MADB-10-004300
Vuln IDs
  • V-253702
Rule IDs
  • SV-253702r961047_rule
The DoD standard for authentication is DoD-approved PKI certificates. Normally, with PKI authentication, the interaction with the user for authentication will be handled by a software component separate from the DBMS, such as ActivIdentity ActivClient. However, in cases where the DBMS controls the interaction, this requirement applies. To prevent the compromise of authentication information such as passwords and PINs during the authentication process, the feedback from the system must not provide any information that would allow an unauthorized user to compromise the authentication mechanism. Obfuscation of user-provided authentication secrets when typed into the system is a method used in addressing this risk. Displaying asterisks when a user types in a password or a smart card PIN is an example of obscuring feedback of authentication secrets. This calls for review of applications, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.
Checks: C-57154r841629_chk

Verify best practices are documented and users trained to use the password command line interface flags appropriately. For example, the command line option --password (or -p) prompts for a password to be entered and obscures feedback on the typed in password. Ensure users are trained to use alternatives to command line password parameters, if they are not, this is a finding.

Fix: F-57105r841630_fix

When connecting to the database, the username and password are sent to the server via the command line interface or other connector interface. Using the command line interface, passing the -p or --password flags but not including the password in the command will prompt for the password and not display it on the screen as typed. Example: mariadb -u username -p

c
MariaDB must use NIST FIPS 140-2 validated cryptographic modules for cryptographic operations.
IA-7 - High - CCI-000803 - V-253703 - SV-253703r961050_rule
RMF Control
IA-7
Severity
High
CCI
CCI-000803
Version
MADB-10-004400
Vuln IDs
  • V-253703
Rule IDs
  • SV-253703r961050_rule
Use of weak or not validated cryptographic algorithms undermines the purposes of utilizing encryption and digital signatures to protect data. Weak algorithms can be easily broken and not validated cryptographic modules may not implement algorithms correctly. Unapproved cryptographic modules or algorithms should not be relied on for authentication, confidentiality, or integrity. Weak cryptography could allow an attacker to gain access to and modify data stored in the database as well as the administration settings of the DBMS. Applications, including DBMSs, utilizing cryptography are required to use approved NIST FIPS 140-2 validated cryptographic modules that meet the requirements of applicable federal laws, Executive Orders, directives, policies, regulations, standards, and guidance. The security functions validated as part of FIPS 140-2 for cryptographic modules are described in FIPS 140-2 Annex A. NSA Type-X (where X=1, 2, 3, 4) products are NSA-certified, hardware-based encryption modules.
Checks: C-57155r841632_chk

As the system administrator, run the following at the Linux commands: # openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 If fips is not included in the openssl version, this is a finding. # sysctl crypto.fips_enabled crypto.fips_enabled = 1 If crypto.fips_enabled = 0, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE '%have_openssl'; If the value of have_openssl is not YES, this is a finding. MariaDB> SHOW GLOBAL VARIABLES LIKE '%version_ssl_library%'; If the value of version_ssl_library does not contain fips, this is a finding. Examine the application's code to verify it does not make calls using libmysqlclient. If code uses libmysqlclient, this is a finding.

Fix: F-57106r841633_fix

If crypto.fips_enabled = 0, for Red Hat Linux, configure the operating system to implement DoD-approved encryption by following the steps below: To enable strict FIPS compliance, the fips=1 kernel option must be added to the kernel command line during system installation so key generation is done with FIPS-approved algorithms and continuous monitoring tests in place. Enable FIPS mode with the following command: # sudo fips-mode-setup --enable Modify the kernel command line of the current kernel in the "grub.cfg" file by adding the following option to the GRUB_CMDLINE_LINUX key in the "/etc/default/grub" file and then rebuild the "grub.cfg" file: fips=1 Changes to "/etc/default/grub" require rebuilding the "grub.cfg" file as follows: On BIOS-based machines, use the following command: # sudo grub2-mkconfig -o /boot/grub2/grub.cfg On UEFI-based machines, use the following command: # sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg If /boot or /boot/efi reside on separate partitions, the kernel parameter "boot=<partition of /boot or /boot/efi>" must be added to the kernel command line. Identify a partition by running the df /boot or df /boot/efi command: # sudo df /boot Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 495844 53780 416464 12% /boot To ensure the "boot=" configuration option will work even if device naming changes occur between boots, identify the universally unique identifier (UUID) of the partition with the following command: # sudo blkid /dev/sda1 /dev/sda1: UUID="05c000f1-a213-759e-c7a2-f11b7424c797" TYPE="ext4" For the example above, append the following string to the kernel command line: boot=UUID=05c000f1-a213-759e-c7a2-f11b7424c797 Reboot the system for the changes to take effect. More information can be found here: RedHat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations Ubuntu: https://security-certs.docs.ubuntu.com/en/fips

b
The MariaDB must uniquely identify and authenticate nonorganizational users (or processes acting on behalf of nonorganizational users).
IA-8 - Medium - CCI-000804 - V-253704 - SV-253704r961053_rule
RMF Control
IA-8
Severity
Medium
CCI
CCI-000804
Version
MADB-10-004500
Vuln IDs
  • V-253704
Rule IDs
  • SV-253704r961053_rule
Nonorganizational users include all information system users other than organizational users, which include organizational employees or individuals the organization deems to have equivalent status of employees (e.g., contractors, guest researchers, individuals from allied nations). Nonorganizational users must be uniquely identified and authenticated for all accesses other than those accesses explicitly identified and documented by the organization when related to the use of anonymous access, such as accessing a web server. Accordingly, a risk assessment is used in determining the authentication needs of the organization. Scalability, practicality, and security are simultaneously considered in balancing the need to ensure ease of use for access to federal information and information systems with the need to protect and adequately mitigate risk to organizational operations, organizational assets, individuals, other organizations, and the nation.
Checks: C-57156r841635_chk

All users should have individual accounts with appropriate privileges. The root users should be removed after administrative accounts with SUPER privilege are created. Query all users and determine if any are suspected shared accounts. Document any necessary shared accounts. MariaDB&gt; SELECT user, host FROM mysql.user; Determine if any accounts are shared. A shared account is defined as a username, hostname, and password that are used by multiple individuals to log in to MariaDB. An example of a shared account is the MariaDB root account – root@localhost. If accounts are determined to be shared, determine if individuals are first individually authenticated. If individuals are not individually authenticated before using the shared account (e.g., by the operating system or possibly by an application making calls to the database), this is a finding. The key is individual accountability. If this can be traced, this is not a finding. If accounts are determined to be shared, determine if they are directly accessible to end users. If so, this is a finding. Review contents of audit logs, traces, and data tables to confirm the identity of the individual user performing the action is captured. If shared identifiers are found, and not accompanied by individual identifiers, this is a finding.

Fix: F-57107r841636_fix

Remove shared accounts which are not documented and have been determined to not be necessary. MariaDB> DROP USER 'user'@'hostname';

b
MariaDB must separate user functionality (including user interface services) from database management functionality.
SC-2 - Medium - CCI-001082 - V-253705 - SV-253705r961095_rule
RMF Control
SC-2
Severity
Medium
CCI
CCI-001082
Version
MADB-10-004600
Vuln IDs
  • V-253705
Rule IDs
  • SV-253705r961095_rule
Information system management functionality includes functions necessary to administer databases, network components, workstations, or servers and typically requires privileged user access. The separation of user functionality from information system management functionality is either physical or logical and is accomplished by using different computers, different central processing units, different instances of the operating system, different network addresses, combinations of these methods, or other methods, as appropriate. An example of this type of separation is observed in web administrative interfaces that use separate authentication methods for users of any other information system resources. This may include isolating the administrative interface on a different domain and with additional access controls. If administrative functionality or information regarding MariaDB management is presented on an interface available for users, information on MariaDB settings may be inadvertently made available to the user.
Checks: C-57157r841638_chk

Show the list of system privileges that the MariaDB server supports, run: MariaDB&gt; SHOW PRIVILEGES; Gather a list of SHOW GRANTS commands. SHOW GRANTS will list the privileges granted to the account. Run this database query to create the SHOW GRANTS script for each user: MariaDB&gt; SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N'; Run each SHOW GRANTS command for each user. MariaDB&gt; SHOW GRANTS FOR 'user'@'host'; If any nonadministrative role has any one of the following privileges, this is a finding. Create user Event Process Proxy Reload Replication client Replication slave Show databases Shutdown Supe, Usage If administrator and general user functionality are not separated either physically or logically, this is a finding.

Fix: F-57108r841639_fix

Configure MariaDB Enterprise Server to separate database administration and general user functionality. Do not grant Create user, Event, Process, Proxy, Reload, Replication client, Replication slave, Show databases, Shutdown, Super, Create tablespace, Usage privileges to users and roles that do not require it. To remove privileges, see the following examples: 1. Revoke privileges from a specific user: MariaDB> REVOKE SUPER, PROCESS ON *.* FROM 'user'@'host'; 2. Revoke privileges from a role: MariaDB> REVOKE 'role' FROM 'user'@'host';

b
MariaDB must invalidate session identifiers upon user logout or other session termination.
SC-23 - Medium - CCI-001185 - V-253706 - SV-253706r961113_rule
RMF Control
SC-23
Severity
Medium
CCI
CCI-001185
Version
MADB-10-004700
Vuln IDs
  • V-253706
Rule IDs
  • SV-253706r961113_rule
Captured sessions can be reused in replay attacks. This requirement limits the ability of adversaries to capture and continue to employ previously valid session IDs. This requirement focuses on communications protection for the MariaDB session rather than for the network packet. The intent of this control is to establish grounds for confidence at each end of a communications session in the ongoing identity of the other party and in the validity of the information being transmitted. Session IDs are tokens generated by MariaDB to uniquely identify a user's (or process's) session. MariaDB will make access decisions and execute logic based on the session ID. Unique session IDs help to reduce predictability of said identifiers. Unique session IDs address man-in-the-middle attacks, including session hijacking or insertion of false information into a session. If the attacker is unable to identify or guess the session information related to pending application traffic, they will have more difficulty in hijacking the session or otherwise manipulating valid sessions. When a user logs out, or when any other session termination event occurs, the DBMS must terminate the user's session(s) to minimize the potential for sessions to be hijacked.
Checks: C-57158r841641_chk

As the database administrator, run the following SQL: MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'tcp_keepalive_interval'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'tcp_keepalive_probes'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'tcp_keepalive_time'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'tcp_nodelay'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'max_statement_time'; If these settings are not set, this is a finding.

Fix: F-57109r841642_fix

As the administrator locate the my.cnf file to change. For Centos, RedHat, and similar distributions this will be in /etc/my.cnf.d/. In the [mariadb] section add the lines: tcp_keepalive_interval == seconds https://mariadb.com/docs/reference/mdb/system-variables/tcp_keepalive_interval/ tcp_keepalive_probes == number of probes https://mariadb.com/docs/reference/mdb/system-variables/tcp_keepalive_probes/ tcp_keepalive_time == seconds https://mariadb.com/docs/reference/mdb/system-variables/tcp_keepalive_time/ tcp_nodelay == boolean (off or on) https://mariadb.com/docs/reference/mdb/system-variables/tcp_nodelay/ max_statement_time == seconds https://mariadb.com/docs/reference/mdb/system-variables/max_statement_time/

b
MariaDB must maintain the authenticity of communications sessions by guarding against man-in-the-middle attacks that guess at Session ID values.
SC-23 - Medium - CCI-001188 - V-253707 - SV-253707r961119_rule
RMF Control
SC-23
Severity
Medium
CCI
CCI-001188
Version
MADB-10-004900
Vuln IDs
  • V-253707
Rule IDs
  • SV-253707r961119_rule
Unique session IDs help to reduce predictability of said identifiers. Unique session IDs address man-in-the-middle attacks, including session hijacking or insertion of false information into a session. If the attacker is unable to identify or guess the session information related to pending application traffic, they will have more difficulty in hijacking the session or otherwise manipulating valid sessions. When a user logs out, or when any other session termination event occurs, the DBMS must terminate the user session(s) to minimize the potential for sessions to be hijacked.
Checks: C-57159r841644_chk

Determine if MariaDB is configured to require SSL. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'require_secure_transport'; If require_secure_transport is not "ON", this is a finding.

Fix: F-57110r841645_fix

Modify the MariaDB configuration file located within /etc/my.cnf.d/ and set the variable require_secure_transport to "ON" under the server section. Restart MariaDB Enterprise Server. Example: [server] require_secure_transport = ON

b
MariaDB must fail to a secure state if system initialization fails, shutdown fails, or aborts fail.
SC-24 - Medium - CCI-001190 - V-253708 - SV-253708r961122_rule
RMF Control
SC-24
Severity
Medium
CCI
CCI-001190
Version
MADB-10-005000
Vuln IDs
  • V-253708
Rule IDs
  • SV-253708r961122_rule
Failure to a known state can address safety or security in accordance with the mission/business needs of the organization. Failure to a known secure state helps prevent a loss of confidentiality, integrity, or availability in the event of a failure of the information system or a component of the system. Failure to a known safe state helps prevent systems from failing to a state that may cause loss of data or unauthorized access to system resources. Systems that fail suddenly and with no incorporated failure state planning may leave the hosting system available but with a reduced security protection capability. Preserving information system state data also facilitates system restart and return to the operational mode of the organization with less disruption of mission/business processes. MariaDB must fail to a known consistent state. Transactions must be successfully completed or rolled back. In general, security mechanisms must be designed so that a failure will follow the same execution path as disallowing the operation. For example, application security methods, such as isAuthorized(), isAuthenticated(), and validate(), must all return false if there is an exception during processing. If security controls can throw exceptions, they must be very clear about exactly what that condition means. Abort refers to stopping a program or function before it has finished naturally. The term abort refers to both requested and unexpected terminations. MariaDB is a fully functional ACID RDBMS with persistent storage, logs, rollback, recovery, and backup procedures. InnoDB is the default storage engine for MariaDB and all uncommitted transactions are rolled back upon restart from a failure. The process is automatic and all incomplete transactions will be rolled back to a consistent state to guarantee consistency. Users can also conduct a recovery to a point in time if needed.
Checks: C-57160r841647_chk

Verify InnoDB logging is configured. As the database administrator, verify the following settings: Note: If no specific directory is given before the filename, the files are stored in DATADIR. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'log_bin'; If value is "OFF", this is a finding.

Fix: F-57111r841648_fix

If value of log_bin is "OFF", modify the MariaDB configuration file. This can be found in /etc/my.cnf.d/. Optionally specify the location of the binary logs by specifying the full path for the binary logs. [mariadb] log_bin=mariadb_bin

b
In the event of a system failure, MariaDB must preserve any information necessary to determine cause of failure and any information necessary to return to operations with least disruption to mission processes.
SC-24 - Medium - CCI-001665 - V-253709 - SV-253709r961125_rule
RMF Control
SC-24
Severity
Medium
CCI
CCI-001665
Version
MADB-10-005100
Vuln IDs
  • V-253709
Rule IDs
  • SV-253709r961125_rule
Failure to a known state can address safety or security in accordance with the mission/business needs of the organization. Failure to a known secure state helps prevent a loss of confidentiality, integrity, or availability in the event of a failure of the information system or a component of the system. Preserving information system state information helps to facilitate system restart and return to the operational mode of the organization with less disruption of mission/business processes. Since it is usually not possible to test this capability in a production environment, systems must either be validated in a testing environment or prior to installation. This requirement is usually a function of the design of the IDPS component. Compliance can be verified by acceptance/validation processes or vendor attestation. MariaDB is a fully functional ACID RDBMS with persistent storage, logs, rollback, recovery, and backup procedures. InnoDB is the default storage engine for MariaDB and all uncommitted transactions are rolled back upon restart from a failure. The process is automatic and all incomplete transactions will be rolled back to a consistent state to guarantee consistency. Users can also conduct a recovery to a point in time if needed.
Checks: C-57161r841650_chk

Verify InnoDB logging is configured. As the database administrator, verify the following settings: Note: If no specific directory is given before the filename, the files are stored in DATADIR. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'log_bin'; If value is "OFF", this is a finding.

Fix: F-57112r841651_fix

If value of log_bin is "OFF", modify the MariaDB configuration file. This can be found in /etc/my.cnf.d/. Optionally specify the location of the binary logs by specifying the full path for the binary logs. [mariadb] log_bin=mariadb_bin

c
MariaDB must protect the confidentiality and integrity of all information at rest.
SC-28 - High - CCI-001199 - V-253710 - SV-253710r961128_rule
RMF Control
SC-28
Severity
High
CCI
CCI-001199
Version
MADB-10-005200
Vuln IDs
  • V-253710
Rule IDs
  • SV-253710r961128_rule
This control is intended to address the confidentiality and integrity of information at rest in nonmobile devices and covers user information and system information. Information at rest refers to the state of information when it is located on a secondary storage device (e.g., disk drive, tape drive) within an organizational information system. Applications and application users generate information throughout the course of their application use. User data generated, as well as application-specific configuration data, must be protected. Organizations may choose to employ different mechanisms to achieve confidentiality and integrity protections, as appropriate. If the confidentiality and integrity of application data is not protected, the data will be open to compromise and unauthorized modification.
Checks: C-57162r841653_chk

If the application owner and Authorizing Official have determined that encryption of data at rest is NOT required, this is not a finding. One possible way to encrypt data within MariaDB is to use the file key management plugin. To determine if this is installed, check the following variables as the Database administrator: MariaDB&gt; SHOW PLUGINS; Confirm the file_key_management.so is listed. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'file_key%'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'aria_en%'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_tables'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_log'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'innodb_tablespace%'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'encrypt%'; Confirm these are ON. If disk or filesystem requires encryption, ask the system owner, DBA, and SA to demonstrate the use of disk-level encryption. If this is required and is not found, this is a finding. If controls do not exist or are not enabled, this is a finding.

Fix: F-57113r841654_fix

MariaDB's data-at-rest encryption requires the use of a key management and encryption plugin. These plugins are responsible both for the management of encryption keys and for the actual encryption and decryption of data. MariaDB supports the use of multiple encryption keys. Each encryption key uses a 32-bit integer as a key identifier. If the specific plugin supports key rotation, then encryption keys can also be rotated, which creates a new version of the encryption key. The File Key Management plugin that ships with MariaDB is a key management and encryption plugin that reads encryption keys from a plain-text file. Although the plugin's shared library is distributed with MariaDB by default, the plugin is not installed by MariaDB by default. The plugin can be installed by providing the --plugin-load or the --plugin-load-add options. This can be specified as a command-line argument to mysqld or it can be specified in a relevant server option group in an option file. For example: [mariadb] ... plugin_load_add = file_key_management Creating the Key File: To encrypt tables with encryption keys using the File Key Management plugin, first create the file that contains the encryption keys. The file must contain two pieces of information for each encryption key. First, each encryption key must be identified with a 32-bit integer as the key identifier. Second, the encryption key itself must be provided in hex-encoded form. These two pieces of information must be separated by a semicolon. For example, the file is formatted in the following way: <encryption_key_id1>;<hex-encoded_encryption_key1> <encryption_key_id2>;<hex-encoded_encryption_key2> The key file can also be optionally encrypted to make it less accessible from the file system. That is explained further in the section below. The File Key Management plugin uses Advanced Encryption Standard (AES) to encrypt data, which supports 128-bit, 192-bit, and 256-bit encryption keys. Therefore, the plugin also supports 128-bit, 192-bit, and 256-bit encryption keys. Random encryption keys can be generated using the openssl rand command. For example, to create a random 256-bit (32-byte) encryption key, run the following command: $ openssl rand -hex 32 a7addd9adea9978fda19f21e6be987880e68ac92632ca052e5bb42b1a506939a Copy this encryption key to the key file using a text editor, or append a series of keys to a new key file. For example, to append three new encryption keys to a new key file, execute the following: $ sudo openssl rand -hex 32 >> /etc/mysql/encryption/keyfile $ sudo openssl rand -hex 32 >> /etc/mysql/encryption/keyfile $ sudo openssl rand -hex 32 >> /etc/mysql/encryption/keyfile The new key file would look something like the following after this step: a7addd9adea9978fda19f21e6be987880e68ac92632ca052e5bb42b1a506939a 49c16acc2dffe616710c9ba9a10b94944a737de1beccb52dc1560abfdd67388b 8db1ee74580e7e93ab8cf157f02656d356c2f437d548d5bf16bf2a56932954a3 The key file still needs to have a key identifier for each encryption key added to the beginning of each line. Key identifiers do not need to be contiguous. Open the new key file in the preferred text editor and add the key identifiers. For example, the key file would look something like the following after this step: 1;a7addd9adea9978fda19f21e6be987880e68ac92632ca052e5bb42b1a506939a 2;49c16acc2dffe616710c9ba9a10b94944a737de1beccb52dc1560abfdd67388b 100;8db1ee74580e7e93ab8cf157f02656d356c2f437d548d5bf16bf2a56932954a3 The key identifiers give the user a way to reference the encryption keys from MariaDB. In the example above, encryption keys can be referenced using the key identifiers 1, 2, or 100 with the ENCRYPTION_KEY_ID table option or with system variables such as innodb_default_encryption_key_id. Multiple encryption keys are not always necessary; the encryption key with the key identifier "1" is the only mandatory encryption key. Once the File Key Management Plugin is enabled, use it by creating an encrypted table: CREATE TABLE t (i int) ENGINE=InnoDB ENCRYPTED=YES Now, table t will be encrypted using the encryption key from the key file.

b
Database contents must be protected from unauthorized and unintended information transfer by enforcement of a data-transfer policy.
SC-4 - Medium - CCI-001090 - V-253711 - SV-253711r961149_rule
RMF Control
SC-4
Severity
Medium
CCI
CCI-001090
Version
MADB-10-005400
Vuln IDs
  • V-253711
Rule IDs
  • SV-253711r961149_rule
Applications, including MariaDB, must prevent unauthorized and unintended information transfer via shared system resources. Data used for the development and testing of applications often involves copying data from production. It is important that specific procedures exist for this process, to include the conditions under which such transfer may take place, where the copies may reside, and the rules for ensuring sensitive data are not exposed. Copies of sensitive data must not be misplaced or left in a temporary location without the proper controls.
Checks: C-57163r841656_chk

Review the procedures for the refreshing of development/test data from production. Review any scripts or code that exists for the movement of production data to development/test systems, or to any other location or for any other purpose. Verify that copies of production data are not left in unprotected locations. If the code that exists for data movement does not comply with the organization-defined data transfer policy and/or fails to remove any copies of production data from unprotected locations, this is a finding.

Fix: F-57114r841657_fix

Modify any code used for moving data from production to development/test systems to comply with the organization-defined data transfer policy, and to ensure copies of production data are not left in unsecured locations.

b
MariaDB must prevent unauthorized and unintended information transfer via shared system resources.
SC-4 - Medium - CCI-001090 - V-253712 - SV-253712r961149_rule
RMF Control
SC-4
Severity
Medium
CCI
CCI-001090
Version
MADB-10-005500
Vuln IDs
  • V-253712
Rule IDs
  • SV-253712r961149_rule
The purpose of this control is to prevent information, including encrypted representations of information, produced by the actions of a prior user/role (or the actions of a process acting on behalf of a prior user/role) from being available to any current user/role (or current process) that obtains access to a shared system resource (e.g., registers, main memory, secondary storage) after the resource has been released back to the information system. Control of information in shared resources is also referred to as object reuse.
Checks: C-57164r841659_chk

Review the procedures for the refreshing of development/test data from production. Review any scripts or code that exists for the movement of production data to development/test systems, or to any other location or for any other purpose. Verify that copies of production data are not left in unprotected locations. If the code that exists for data movement does not comply with the organization-defined data transfer policy and/or fails to remove any copies of production data from unprotected locations, this is a finding.

Fix: F-57115r841660_fix

Modify any code used for moving data from production to development/test systems to comply with the organization-defined data transfer policy, and to ensure copies of production data are not left in unsecured locations.

b
Access to database files must be limited to relevant processes and to authorized, administrative users.
SC-4 - Medium - CCI-001090 - V-253713 - SV-253713r961149_rule
RMF Control
SC-4
Severity
Medium
CCI
CCI-001090
Version
MADB-10-005600
Vuln IDs
  • V-253713
Rule IDs
  • SV-253713r961149_rule
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.
Checks: C-57165r841662_chk

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 &gt; 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 default 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 Review the permissions granted to users by the operating system/file system on the database files, database log files, and database backup files. To verify that all files are owned by the database administrator and have the correct permissions, run the following as the database administrator: $ sudo su - root $ ls -lR {datadir} $ ls -lR other directories defined by variables above If using mysqldump or another tool for backups, also run the "ls" command as above on the directory that will be containing the backup file. If any files are not owned by the database administrator or allow anyone but the database administrator to read/write/execute, this is a finding. If any user/role who is not an authorized system administrator with a need-to-know, database administrator with a need-to-know, or system account for running MariaDB processes is permitted to read/view any of these files, this is a finding.

Fix: F-57116r841663_fix

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.

b
MariaDB must check the validity of all data inputs except those specifically identified by the organization.
SI-10 - Medium - CCI-001310 - V-253714 - SV-253714r961158_rule
RMF Control
SI-10
Severity
Medium
CCI
CCI-001310
Version
MADB-10-005700
Vuln IDs
  • V-253714
Rule IDs
  • SV-253714r961158_rule
Invalid user input occurs when a user inserts data or characters into an application's data entry fields and the application is unprepared to process that data. This results in unanticipated application behavior, potentially leading to an application or information system compromise. Invalid user input is one of the primary methods employed when attempting to compromise an application. With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database. Even when no such hijacking takes place, invalid input that gets recorded in the database, whether accidental or malicious, reduces the reliability and usability of the system. Available protections include data types, referential constraints, uniqueness constraints, range checking, and application-specific logic. Application-specific logic can be implemented within the database in stored procedures and triggers, where appropriate. This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.
Checks: C-57166r841665_chk

Review MariaDB code (trigger procedures, functions), application code, settings, column and field definitions, and constraints to determine whether the database is protected against invalid input. If code exists that allows invalid data to be acted upon or input into the database, this is a finding. If column/field definitions do not exist in the database, this is a finding. If columns/fields do not contain constraints and validity checking where required, this is a finding. Where a column/field is noted in the system documentation as necessarily free-form, even though its name and context suggest that it should be strongly typed and constrained, the absence of these protections is not a finding. Where a column/field is clearly identified by name, caption or context as Notes, Comments, Description, Text, etc., the absence of these protections is not a finding. Check application code that interacts with MariaDB for the use of prepared statements. If prepared statements are not used, this is a finding.

Fix: F-57117r841666_fix

Modify database code to properly validate data before it is put into the database or acted upon by the database. Modify the database to contain constraints and validity checking on database columns and tables that require them for data integrity. Use prepared statements when taking user input. Do not allow general users direct console access to MariaDB.

b
MariaDB and associated applications must reserve the use of dynamic code execution for situations that require it.
SI-10 - Medium - CCI-001310 - V-253715 - SV-253715r961158_rule
RMF Control
SI-10
Severity
Medium
CCI
CCI-001310
Version
MADB-10-005800
Vuln IDs
  • V-253715
Rule IDs
  • SV-253715r961158_rule
With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. In such cases, the attacker deduces the manner in which SQL statements are being processed, either from inside knowledge or by observing system behavior in response to invalid inputs. When the attacker identifies scenarios where SQL queries are being assembled by application code (which may be within the database or separate from it) and executed dynamically, the attacker is then able to craft input strings that subvert the intent of the query. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database. The principal protection against code injection is not to use dynamic execution except where it provides necessary functionality that cannot be used otherwise. Use strongly typed data items rather than general-purpose strings as input parameters to task-specific, pre-compiled stored procedures and functions (and triggers). This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.
Checks: C-57167r841668_chk

Review MariaDB source code (stored procedures, functions, triggers) and application source code, to identify cases of dynamic code execution. To list all stored procedures, functions, and triggers in the database, as the database administrator, run the following SQL: MariaDB&gt; SHOW FUNCTION STATUS; MariaDB&gt; SHOW PROCEDURE STATUS; MariaDB&gt; SHOW TRIGGERS; Any user input should be handled through prepared statements. If dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, this is a finding.

Fix: F-57118r841669_fix

Where dynamic code execution is employed in circumstances where the objective could practically be satisfied by static execution with strongly typed parameters, modify the code to do so.

b
MariaDB and associated applications, when making use of dynamic code execution, must scan input data for invalid values that may indicate a code injection attack.
SI-10 - Medium - CCI-001310 - V-253716 - SV-253716r961158_rule
RMF Control
SI-10
Severity
Medium
CCI
CCI-001310
Version
MADB-10-005900
Vuln IDs
  • V-253716
Rule IDs
  • SV-253716r961158_rule
With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. In such cases, the attacker deduces the manner in which SQL statements are being processed, either from inside knowledge or by observing system behavior in response to invalid inputs. When the attacker identifies scenarios where SQL queries are being assembled by application code (which may be within the database or separate from it) and executed dynamically, the attacker is then able to craft input strings that subvert the intent of the query. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database. The principal protection against code injection is not to use dynamic execution except where it provides necessary functionality that cannot be used otherwise. Use strongly typed data items rather than general-purpose strings as input parameters to task-specific, pre-compiled stored procedures and functions (and triggers). When dynamic execution is necessary, ways to mitigate the risk include the following, which should be implemented both in the on-screen application and at the database level, in the stored procedures: - Allow strings as input only when necessary. - Rely on data typing to validate numbers, dates, etc. Do not accept invalid values. If substituting other values for them, think carefully about whether this could be subverted. - Limit the size of input strings to what is truly necessary. - If single quotes/apostrophes, double quotes, semicolons, equal signs, angle brackets, or square brackets will never be valid as input, reject them. - If comment markers will never be valid as input, reject them. In SQL, these are -- or /* */ - If HTML and XML tags, entities, comments, etc., will never be valid, reject them. - If wildcards are present, reject them unless truly necessary. In SQL these are the underscore and the percentage sign, and the word ESCAPE is also a clue that wildcards are in use. - If SQL key words, such as SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, ESCAPE, UNION, GRANT, REVOKE, DENY, MODIFY will never be valid, reject them. Use case-insensitive comparisons when searching for these. Bear in mind that some of these words, particularly Grant (as a person s name), could also be valid input. - If there are range limits on the values that may be entered, enforce those limits. - Institute procedures for inspection of programs for correct use of dynamic coding, by a party other than the developer. - Conduct rigorous testing of program modules that use dynamic coding, searching for ways to subvert the intended use. - Record the inspection and testing in the system documentation. - Bear in mind that all this applies not only to screen input, but also to the values in an incoming message to a web service or to a stored procedure called by a software component that has not itself been hardened in these ways. Not only can the caller be subject to such vulnerabilities; it may itself be the attacker. This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.
Checks: C-57168r841671_chk

Review MariaDB source code (stored procedures, functions, triggers) and application source code to identify cases of dynamic code execution. If dynamic code execution is employed without protective measures against code injection, this is a finding.

Fix: F-57119r841672_fix

Where dynamic code execution is used, modify the code to implement protections against code injection.

b
MariaDB must automatically terminate a user's session after organization-defined conditions or trigger events requiring session disconnect.
AC-12 - Medium - CCI-002361 - V-253717 - SV-253717r961221_rule
RMF Control
AC-12
Severity
Medium
CCI
CCI-002361
Version
MADB-10-006200
Vuln IDs
  • V-253717
Rule IDs
  • SV-253717r961221_rule
This addresses the termination of user-initiated logical sessions in contrast to the termination of network connections that are associated with communications sessions (i.e., network disconnect). A logical session (for local, network, and remote access) is initiated whenever a user (or process acting on behalf of a user) accesses an organizational information system. Such user sessions can be terminated (and thus terminate user access) without terminating network sessions. Session termination ends all processes associated with a user's logical session except those batch processes/jobs that are specifically created by the user (i.e., session owner) to continue after the session is terminated. Conditions or trigger events requiring automatic session termination can include, for example, organization-defined periods of user inactivity, targeted responses to certain types of incidents, and time-of-day restrictions on information system use. This capability is typically reserved for specific cases where the system owner, data owner, or organization requires additional assurance. As a good programming practice, all applications should close the database connection when they finish using the resource. MariaDB will close the session when the connection is closed and release all resources associated with the session. If the connection is not closed, MariaDB has the five global variables to allow timeouts to occur and automatically close the connection and release all associated resources.
Checks: C-57169r841674_chk

MariaDB has five global variables that can be set so that connections will be closed after a certain period of inactivity. Check the values for these variables and verify they correspond to security procedures defined: MariaDB&gt; SHOW GLOBAL VARIABLES LIKE '%timeout%'; interactive_timeout - Time in seconds that the server waits for an interactive connection (one that connects with the mysql_real_connect() CLIENT_INTERACTIVE option) to become active before closing it. See also wait_timeout. wait_timeout - Time in seconds that the server waits for a connection to become active before closing it. The session value is initialized when a thread starts up from either the global value, if the connection is noninteractive, or from the interactive_timeout value, if the connection is interactive. In situations where transactions may be started, but not committed or rolled back, more granular control and a shorter timeout may be desirable so as to avoid locks being held for too long. idle_transaction_timeout idle_write_transaction_timeout idle_readonly_transaction_timeout Review system documentation to obtain the organization's definition of circumstances requiring automatic session termination. If the documentation explicitly states that such termination is not required or is prohibited, this is not a finding. If the security procedures require server-side session termination within a specified amount of time but MariaDB is not configured accordingly, this is a finding.

Fix: F-57120r841675_fix

Configure MariaDB to automatically terminate a user's session based on security procedures requirements regarding conditions or trigger events that require session termination. To change the values of the following timeout variables to conform to organization-defined values for triggering conditions or events requiring session termination select the appropriate variable to change and as the database administrator. As the administrator locate the MariaDB Enterprise Server configuration file to change. For Centos, RedHat, and similar distributions this will be in /etc/my.cnf.d/. In the [mariadb] section add the lines: interactive_timeout = value wait_timeout = value idle_transaction_timeout = value idle_write_transaction_timeout = value idle_readonly_transaction_timeout = value Where value is in seconds and corresponds to the company defined value. Restart MariaDB Enterprise Server for these changes to take effect.

b
MariaDB must provide logout functionality to allow the user to manually terminate a session initiated by that user.
AC-12 - Medium - CCI-002363 - V-253718 - SV-253718r961224_rule
RMF Control
AC-12
Severity
Medium
CCI
CCI-002363
Version
MADB-10-006300
Vuln IDs
  • V-253718
Rule IDs
  • SV-253718r961224_rule
If a user cannot explicitly end a DBMS session, the session may remain open and be exploited by an attacker; this is referred to as a zombie session. Such logout may be explicit or implicit. Examples of explicit are clicking on a Log Out link or button in the application window; clicking the Windows Start button and selecting Log Out or Shut Down. Examples of implicit logout are closing the application's (main) window and powering off the workstation without invoking the OS shutdown. Both the explicit and implicit logouts must be detected by the DBMS. In all cases, the DBMS must ensure that the user's DBMS session and all processes owned by the session are terminated. This should not, however, interfere with batch processes/jobs initiated by the user during his/her online session; these should be permitted to run to completion. As a good programming practice, all applications should close the database connection when they finish using the resource. MariaDB will close the session when the connection is closed and release all resources associated with the session. If the connection cannot be closed, MariaDB has the five global variables to allow timeouts to occur and automatically close the connection and release all associated resources.
Checks: C-57170r841677_chk

MariaDB has five global variables which can be set so that connections will be closed after a certain period of inactivity. Check the values for these variables and verify they correspond to security procedures defined: MariaDB&gt; SHOW GLOBAL VARIABLES LIKE '%timeout%'; interactive_timeout - Time in seconds that the server waits for an interactive connection (one that connects with the mysql_real_connect() CLIENT_INTERACTIVE option) to become active before closing it. See also wait_timeout. wait_timeout - Time in seconds that the server waits for a connection to become active before closing it. The session value is initialized when a thread starts up from either the global value, if the connection is noninteractive, or from the interactive_timeout value, if the connection is interactive. In situations where transactions may be started, but not committed or rolled back, more granular control and a shorter timeout may be desirable so as to avoid locks being held for too long. idle_transaction_timeout idle_write_transaction_timeout idle_readonly_transaction_timeout Review system documentation to obtain the organization's definition of circumstances requiring automatic session termination. If the documentation explicitly states that such termination is not required or is prohibited, this is not a finding. If the security procedures require server-side session termination within a specified amount of time but MariaDB is not configured accordingly, this is a finding.

Fix: F-57121r841678_fix

As an authorized user locate the session to be terminated and terminate that session. To locate a session and terminate the session follow the following steps: 1. Connect to the MariaDB database using an authorized user: mariadb -u admin_user -p 2. At the MariaDB prompt run either of the following commands: MariaDB> SHOW PROCESSLIST; MariaDB> SELECT id, user, host, db, command, time, state, info, progress FROM information_schema.processlist; 3. Identify the session to be terminated and issue kill process number from display. (**This will kill the session.**) Example: MariaDB> KILL 192; 4. A kill query process number can be issued from display. (**This will kill the active query but leave the session active for run-away queries. **) Configure MariaDB to automatically terminate a user session based on security procedures requirements regarding conditions or trigger events that require session termination. To change the values of the following timeout variables to conform to organization-defined values for triggering conditions or events requiring session termination, select the appropriate variable to change as the database administrator. As the administrator locate the MariaDB Enterprise Server configuration file to change. For Centos, RedHat, and similar distributions this will be in /etc/my.cnf.d/. In the [mariadb] section add the lines: interactive_timeout = value wait_timeout = value idle_transaction_timeout = value idle_write_transaction_timeout = value idle_readonly_transaction_timeout = value Where value is in seconds and corresponds to the company defined value. Restart MariaDB Enterprise Server for these changes to take effect.

b
MariaDB must associate organization-defined types of security labels having organization-defined security label values with information in storage.
AC-16 - Medium - CCI-002262 - V-253719 - SV-253719r961269_rule
RMF Control
AC-16
Severity
Medium
CCI
CCI-002262
Version
MADB-10-006400
Vuln IDs
  • V-253719
Rule IDs
  • SV-253719r961269_rule
Without the association of security labels to information, there is no basis for MariaDB to make security-related access-control decisions. Security labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information. These labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy. One example includes marking data as classified or CUI. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise. The mechanism used to support security labeling may be a feature of the DBMS product, a third-party product, or custom application code.
Checks: C-57171r841680_chk

If security labeling is not required, this is not a finding. If security labeling requirements have been specified, but the security labeling is not implemented or does not reliably maintain labels on information in storage, this is a finding.

Fix: F-57122r841681_fix

Add custom data structures, data elements and application code, to provide reliable security labeling of information in transmission. Write Custom Code: https://mariadb.com/resources/blog/protect-your-data-row-level-security-in-mariadb-10-0/

b
MariaDB must associate organization-defined types of security labels having organization-defined security label values with information in process.
AC-16 - Medium - CCI-002263 - V-253720 - SV-253720r961272_rule
RMF Control
AC-16
Severity
Medium
CCI
CCI-002263
Version
MADB-10-006500
Vuln IDs
  • V-253720
Rule IDs
  • SV-253720r961272_rule
Without the association of security labels to information, there is no basis for MariaDB to make security-related access-control decisions. Security labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information. These labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy. One example includes marking data as classified or CUI. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise. The mechanism used to support security labeling may be a feature of the DBMS product, a third-party product, or custom application code.
Checks: C-57172r841683_chk

If security labeling is not required, this is not a finding. If security labeling requirements have been specified, but the security labeling is not implemented or does not reliably maintain labels on information in process, this is a finding.

Fix: F-57123r841684_fix

Add custom data structures, data elements and application code, to provide reliable security labeling of information in transmission. Write Custom Code: https://mariadb.com/resources/blog/protect-your-data-row-level-security-in-mariadb-10-0/

b
MariaDB must associate organization-defined types of security labels having organization-defined security label values with information in transmission.
AC-16 - Medium - CCI-002264 - V-253721 - SV-253721r961275_rule
RMF Control
AC-16
Severity
Medium
CCI
CCI-002264
Version
MADB-10-006600
Vuln IDs
  • V-253721
Rule IDs
  • SV-253721r961275_rule
Without the association of security labels to information, there is no basis for MariaDB to make security-related access-control decisions. Security labels are abstractions representing the basic properties or characteristics of an entity (e.g., subjects and objects) with respect to safeguarding information. These labels are typically associated with internal data structures (e.g., tables, rows) within the database and are used to enable the implementation of access control and flow control policies, reflect special dissemination, handling or distribution instructions, or support other aspects of the information security policy. One example includes marking data as classified or CUI. These security labels may be assigned manually or during data processing, but, either way, it is imperative these assignments are maintained while the data is in storage. If the security labels are lost when the data is stored, there is the risk of a data compromise. The mechanism used to support security labeling in MariaDB is custom application code.
Checks: C-57173r841686_chk

If security labeling is not required, this is not a finding. If security labeling requirements have been specified, but the security labeling is not implemented or does not reliably maintain labels on information in transmission, this is a finding.

Fix: F-57124r841687_fix

Add custom data structures, data elements and application code, to provide reliable security labeling of information in transmission. Write Custom Code: https://mariadb.com/resources/blog/protect-your-data-row-level-security-in-mariadb-10-0/

b
MariaDB must enforce discretionary access control policies, as defined by the data owner, over defined subjects, and objects.
AC-3 - Medium - CCI-002165 - V-253722 - SV-253722r961317_rule
RMF Control
AC-3
Severity
Medium
CCI
CCI-002165
Version
MADB-10-006700
Vuln IDs
  • V-253722
Rule IDs
  • SV-253722r961317_rule
Discretionary Access Control (DAC) is based on the notion that individual users are owners of objects and therefore have discretion over who should be authorized to access the object and in which mode (e.g., read or write). Ownership is usually acquired as a consequence of creating the object or via specified ownership assignment. DAC allows the owner to determine who will have access to objects they control. An example of DAC includes user-controlled table permissions. When discretionary access control policies are implemented, subjects are not constrained with regard to what actions they can take with information for which they have already been granted access. Thus, subjects that have been granted access to information are not prevented from passing (i.e., the subjects have the discretion to pass) the information to other subjects or objects. A subject that is constrained in its operation by Mandatory Access Control policies is still able to operate under the less rigorous constraints of this requirement. Thus, while Mandatory Access Control imposes constraints preventing a subject from passing information to another subject operating at a different sensitivity level, this requirement permits the subject to pass the information to any subject at the same sensitivity level. The policy is bounded by the information system boundary. Once the information is passed outside of the control of the information system, additional means may be required to ensure the constraints remain in effect. While the older, more traditional definitions of discretionary access control require identity-based access control, that limitation is not required for this use of discretionary access control.
Checks: C-57174r841689_chk

Review system documentation to identify the required DAC. Review the security configuration of the database and MariaDB. If applicable, review the security configuration of the application(s) using the database. If the discretionary access control defined in the documentation is not implemented in the security configuration, this is a finding. To check the permissions granted to a user use the following queries: As the database administrator, run the following SQL: **For user privileges: Run this script to create the SHOW GRANTS script for each user: MariaDB&gt; SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N'; Run each SHOW GRANTS command for each user. Verify that all users have the correct privileges. If they do not, this is a finding. **For role privileges (except admin_option, whether the role can be granted by a particular use): MariaDB&gt; SELECT CONCAT('SHOW GRANTS FOR ',Role,';' ) FROM mysql.roles_mapping; Run each SHOW GRANTS command for each role. Verify that all roles have the correct privileges. If they do not, this is a finding. **To determine if a role has admin_option (Whether the role can be granted by a particular user) MariaDB&gt; SELECT * FROM mysql.roles_mapping; Verify that all privileges are correct. If they are not, this is a finding.

Fix: F-57125r841690_fix

Implement the organization's DAC policy in the security configuration of the database and DBMS, and, if applicable, the security configuration of the application(s) using the database. To grant and revoke privileges, as the database administrator, use the following SQL syntax: **To Grant User and Role privileges: MariaDB> GRANT privilege ON database . table TO user|role ; **To Revoke User and Role privileges: MariaDB> REVOKE privilege_type ON database . table FROM user|role ;

b
MariaDB must prevent nonprivileged users from executing privileged functions, to include disabling, circumventing, or altering implemented security safeguards/countermeasures.
AC-6 - Medium - CCI-002235 - V-253723 - SV-253723r961353_rule
RMF Control
AC-6
Severity
Medium
CCI
CCI-002235
Version
MADB-10-006800
Vuln IDs
  • V-253723
Rule IDs
  • SV-253723r961353_rule
Preventing nonprivileged users from executing privileged functions mitigates the risk that unauthorized individuals or processes may gain unnecessary access to information or privileges. System documentation should include a definition of the functionality considered privileged. Depending on circumstances, privileged functions can include, for example, establishing accounts, performing system integrity checks, or administering cryptographic key management activities. Nonprivileged users are individuals that do not possess appropriate authorizations. Circumventing intrusion detection and prevention mechanisms or malicious code protection mechanisms are examples of privileged functions that require protection from nonprivileged users. A privileged function in MariaDB/database context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to: CREATE ALTER DROP GRANT REVOKE There may also be Data Manipulation Language (DML) statements that, subject to context, should be regarded as privileged. Possible examples include: TRUNCATE TABLE; DELETE, or DELETE affecting more than n rows, for some n, or DELETE without a WHERE clause; UPDATE or UPDATE affecting more than n rows, for some n, or UPDATE without a WHERE clause; any SELECT, INSERT, UPDATE, or DELETE to an application-defined security table executed by other than a security principal. Depending on the capabilities of the DBMS and the design of the database and associated applications, the prevention of unauthorized use of privileged functions may be achieved by means of DBMS security features, database triggers, other mechanisms, or a combination of these.
Checks: C-57175r841692_chk

Review the system documentation to obtain the definition of the database/MariaDB functionality considered privileged in the context of the system in question. Review the MariaDB security configuration and/or other means used to protect privileged functionality from unauthorized use. If the configuration does not protect all of the actions defined as privileged, this is a finding.

Fix: F-57126r841693_fix

Configure MariaDB security to protect all privileged functionality.

b
Execution of software modules (to include stored procedures, functions, and triggers) with elevated privileges must be restricted to necessary cases only.
AC-6 - Medium - CCI-002233 - V-253724 - SV-253724r961359_rule
RMF Control
AC-6
Severity
Medium
CCI
CCI-002233
Version
MADB-10-006900
Vuln IDs
  • V-253724
Rule IDs
  • SV-253724r961359_rule
In certain situations, to provide required functionality, MariaDB needs to execute internal logic (stored procedures, functions, triggers, etc.) and/or external code modules with elevated privileges. However, if the privileges required for execution are at a higher level than the privileges assigned to organizational users invoking the functionality applications/programs, those users are indirectly provided with greater privileges than assigned by organizations. Privilege elevation must be used only where necessary and protected from misuse. This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.
Checks: C-57176r841695_chk

Functions and Procedures in MariaDB all have DEFINER and SECURITY_TYPE options. If SECURITY_TYPE = DEFINER then the function or procedure is run using the privileges of the DEFINER account. If SECURITY_TYPE = INVOKER, then they will be run using the privileges of the user invoking the function or procedure. To list the values of the DEFINER and SECURITY_TYPE in functions and procedures as the database administrator, run the following SQL: MariaDB&gt; SELECT ROUTINE_NAME, ROUTINE_SCHEMA, ROUTINE_TYPE, DEFINER, SECURITY_TYPE FROM information_schema.routines WHERE ROUTINE_SCHEMA NOT IN ('sys','mysql'); Triggers in MariaDB have a DEFINER option. For Triggers the value of the DEFINER determines the privileges to be used at trigger activation time. To list the values of the DEFINER in Triggers, as the database administrator, run the following SQL: MariaDB&gt; SELECT trigger_schema, trigger_name, action_statement, definer FROM information_schema.triggers; If elevation of MariaDB privileges is utilized but not documented, this is a finding. If elevation of MariaDB privileges is documented, but not implemented as described in the documentation, this is a finding. If the privilege-elevation logic can be invoked in ways other than intended, or in contexts other than intended, or by subjects/principals other than intended, this is a finding.

Fix: F-57127r841696_fix

Determine where, when, how, and by what principals/subjects elevated privilege is needed. To change the values of the SECURITY_TYPE for functions and procedures: MariaDB> USE <database>; MariaDB> ALTER FUNCTION procedure_name | function_name sql security INVOKER | DEFINER ; To change the values of the DEFINER for functions, procedures, and triggers, run the following SQL as the database administrator: MariaDB> SHOW CREATE function | procedure ; MariaDB> DROP function | procedure ; Recreate the function or procedure using the results of the create statement (from the SHOW CREATE results above), with the definer set to the desired user.

b
MariaDB must allocate audit record storage capacity in accordance with organization-defined audit record storage requirements.
AU-4 - Medium - CCI-001849 - V-253727 - SV-253727r961392_rule
RMF Control
AU-4
Severity
Medium
CCI
CCI-001849
Version
MADB-10-007300
Vuln IDs
  • V-253727
Rule IDs
  • SV-253727r961392_rule
To ensure sufficient storage capacity for the audit logs, MariaDB must be able to allocate audit record storage capacity. Although another requirement (SRG-APP-000515-DB-000318) mandates that audit data be off-loaded to a centralized log management system, it remains necessary to provide space on the database server to serve as a buffer against outages and capacity limits of the off-loading mechanism. The task of allocating audit record storage capacity is usually performed during initial installation of MariaDB and is closely associated with the DBA and system administrator roles. The DBA or system administrator will usually coordinate the allocation of physical drive space with the application owner/installer and the application will prompt the installer to provide the capacity information, the physical location of the disk, or both. In determining the capacity requirements, consider such factors as total number of users; expected number of concurrent users during busy periods; number and type of events being monitored; types and amounts of data being captured; the frequency/speed with which audit records are off-loaded to the central log management system; and any limitations that exist on MariaDB s ability to reuse the space formerly occupied by off-loaded records.
Checks: C-57179r841704_chk

Investigate whether there have been any incidents where MariaDB ran out of audit file log disk space since the last time the space was allocated or other corrective measures were taken. If there have been incidents where MariaDB ran out of audit log file disk space, this is a finding. MariaDB can be configured to use syslog or any OS system file to store audit records to designated disk directories. Check the log file location: To check how much storage capacity is available for audit records, first determine the location where the audit logs are being written by executing the following command. Run the following SQL: show global variables like 'server_audit%' ; For system logs (syslog): From the query above verify the value of: server_audit_output_type=SYSLOG For OS file: From the query above verify the value of: server_audit_output_type=FILE If written to SYSLOG, follow the procedure for storage in the corresponding OS STIG. If written to FILE, check the remaining storage on the disk. If it does not meet organizationally defined audit record storage requirements, this is a finding.

Fix: F-57130r841705_fix

MariaDB audit log file location either goes to the syslog directory (if logging is set to SYSLOG) or is controlled by the server_audit_file_path in the MariaDB my.cnf configuration file. If the audit log file directory does not have enough disk space available, then increase the diskspace available for the audit log file directory or move the audit log file directory to another location that has more disk space available. Allocate sufficient audit file space to support peak demand. If server_audit_output_type=FILE set the directory in /etc/my.cnf to one that is managed by the centralized management system. [mariadb] server_audit_file_path= mydir / mylogfilename .log Now, as the system administrator, restart the server with the new configuration: $ systemctl restart mysqld Allocate sufficient audit file space to support peak demand for the log files.

b
MariaDB must provide a warning to appropriate support staff when allocated audit record storage volume reaches 75 percent of maximum audit record storage capacity.
AU-5 - Medium - CCI-001855 - V-253728 - SV-253728r961398_rule
RMF Control
AU-5
Severity
Medium
CCI
CCI-001855
Version
MADB-10-007400
Vuln IDs
  • V-253728
Rule IDs
  • SV-253728r961398_rule
Organizations are required to use a central log management system, so, under normal conditions, the audit space allocated to the DBMS on its own server will not be an issue. However, space will still be required on the MariaDB server for audit records in transit, and, under abnormal conditions, this could fill up. Since a requirement exists to halt processing upon audit failure, a service outage would result. If support personnel are not notified immediately upon storage volume utilization reaching 75 percent, they are unable to plan for storage capacity expansion. The appropriate support staff include, at a minimum, the ISSO and the DBA/SA.
Checks: C-57180r841707_chk

Review OS, or third-party logging application settings to determine whether a warning will be provided when 75 percent of DBMS audit log storage capacity is reached. If no warning will be provided, this is a finding.

Fix: F-57131r841708_fix

Configure the system to notify appropriate support staff immediately upon storage volume utilization reaching 75 percent. MariaDB does not monitor storage, however, it is possible to monitor storage with a script. ##### Example Monitoring Script #!/bin/bash DATADIR=/var/lib/psql/mysql CURRENT=$(df ${DATADIR?} | grep / | awk '{ print $5}' | sed 's/%//g') THRESHOLD=75 if [ "$CURRENT" -gt "$THRESHOLD" ] ; then mail -s 'Disk Space Alert' mail@support.com << EOF The data directory volume is almost full. Used: $CURRENT %EOF fi Schedule this script in cron to run around the clock.

b
MariaDB must provide an immediate real-time alert to appropriate support staff of all audit failure events requiring real-time alerts.
AU-5 - Medium - CCI-001858 - V-253729 - SV-253729r961401_rule
RMF Control
AU-5
Severity
Medium
CCI
CCI-001858
Version
MADB-10-007500
Vuln IDs
  • V-253729
Rule IDs
  • SV-253729r961401_rule
It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without a real-time alert, security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected. The appropriate support staff include, at a minimum, the ISSO and the DBA/SA. Alerts provide organizations with urgent messages. Real-time alerts provide these messages immediately (i.e., the time from event detection to alert occurs in seconds or less).
Checks: C-57181r841710_chk

Review MariaDB Server settings, OS, or third-party logging software settings to determine whether a real-time alert will be sent to the appropriate personnel when auditing fails for any reason. If real-time alerts are not sent upon auditing failure, this is a finding.

Fix: F-57132r841711_fix

Configure the system to provide an immediate real-time alert to appropriate support staff when a specified audit failure occurs. It is possible to create scripts or implement third-party tools to enable real-time alerting for audit failures in MariaDB.

b
MariaDB must record time stamps, in audit records and application data, that can be mapped to Coordinated Universal Time (UTC, formerly GMT).
AU-8 - Medium - CCI-001890 - V-253730 - SV-253730r961443_rule
RMF Control
AU-8
Severity
Medium
CCI
CCI-001890
Version
MADB-10-007600
Vuln IDs
  • V-253730
Rule IDs
  • SV-253730r961443_rule
If time stamps are not consistently applied and there is no common time reference, it is difficult to perform forensic analysis. Time stamps generated by MariaDB must include date and time. Time is commonly expressed in Coordinated Universal Time (UTC), a modern continuation of Greenwich Mean Time (GMT), or local time with an offset from UTC. Some DBMS products offer a data type called TIMESTAMP that is not a representation of date and time. Rather, it is a database state counter and does not correspond to calendar and clock time. This requirement does not refer to that meaning of TIMESTAMP.
Checks: C-57182r841713_chk

Check the current timezone value by running the following command as an administrative user: MariaDB&gt; SHOW GLOBAL VARIABLES LIKE '%zone%'; If time_zone = SYSTEM, and system_time_zone is not equal to UTC, this is a finding. If time_zone is not SYSTEM and is not UTC, this is a finding.

Fix: F-57133r841714_fix

On the OS command line run the following command to get the time zone the system is in: date | awk '{print $5;}' If the system is in UTC, to set the time zone for timestamps to UTC, modify the MariaDB configuration file located within /etc/my.cnf.d/ and set the variable time_zone to SYSTEM under the server section. Restart MariaDB Enterprise Server. Example: [server] Timezone = SYSTEM If the OS system timezone is not set to UTC, to set the time zone for timestamps to UTC, modify the MariaDB configuration file located within /etc/my.cnf.d/ and set the variable time_zone to UTC under the server section. Restart MariaDB Enterprise Server. Example: [server] Timezone = UTC

b
MariaDB must prohibit user installation of logic modules (stored procedures, functions, triggers, views, etc.) without explicit privileged status.
- Medium - CCI-003980 - V-253731 - SV-253731r998227_rule
RMF Control
Severity
Medium
CCI
CCI-003980
Version
MADB-10-007800
Vuln IDs
  • V-253731
Rule IDs
  • SV-253731r998227_rule
Allowing regular users to install software, without explicit privileges, creates the risk that untested or potentially malicious software will be installed on the system. Explicit privileges (escalated or administrative privileges) provide the regular user with explicit capabilities and control that exceed the rights of a regular user. DBMS functionality and the nature and requirements of databases will vary; so while users are not permitted to install unapproved software, there may be instances where the organization allows the user to install approved software packages such as from an approved software repository. The requirements for production servers will be more restrictive than those used for development and research. The DBMS must enforce software installation by users based upon what types of software installations are permitted (e.g., updates and security patches to existing software) and what types of installations are prohibited (e.g., software whose pedigree with regard to being potentially malicious is unknown or suspect by the organization). In the case of a database management system, this requirement covers stored procedures, functions, triggers, views, etc.
Checks: C-57183r998226_chk

If MariaDB supports only software development, experimentation and/or developer-level testing (that is, excluding production systems, integration testing, stress testing, and user acceptance testing), this is not a finding. Review MariaDB and database security settings with respect to nonadministrative users ability to create, alter, or replace logic modules, to include but not necessarily only stored procedures, functions, triggers, and views. 1. To list the privileges for all users on all tables and schemas, as the database administrator, do the following: Gather a list of SHOW GRANTS commands. SHOW GRANTS will list the privileges granted to the account. Run this script to create the SHOW GRANTS script for each user: MariaDB&gt; SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N'; Run each SHOW GRANTS command for each user. 2. Only DEFINERS of routines (functions and procedures) can change routines. To view the DEFINERS of all functions and procedures, as database administrator run the following SQL: MariaDB&gt; SELECT * FROM mysql.proc \G 3. Only DEFINERS of triggers can change triggers. To view all triggers and their DEFINERS, as database administrator run the following SQL: MariaDB&gt; SELECT * FROM information_schema.triggers \G 4. Views: At view definition time, the view creator must have the privileges needed to use the top-level objects accessed by the view. For example, if the view definition refers to table columns, the creator must have privileges for the columns, as described previously. If the definition refers to a stored function, only the privileges needed to invoke the function can be checked. The privileges required when the function runs can be checked only as it executes. For different invocations of the function, different execution paths within the function might be taken. If any such permissions exist and are not documented and approved, this is a finding.

Fix: F-57134r841717_fix

Document and obtain approval for any nonadministrative users who require the ability to create, alter, or replace logic modules. Check the security guide to implement the approved permissions. Revoke any unapproved permissions.

b
MariaDB must enforce access restrictions associated with changes to the configuration of MariaDB or database(s).
CM-5 - Medium - CCI-001813 - V-253732 - SV-253732r961461_rule
RMF Control
CM-5
Severity
Medium
CCI
CCI-001813
Version
MADB-10-007900
Vuln IDs
  • V-253732
Rule IDs
  • SV-253732r961461_rule
Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system. When dealing with access restrictions pertaining to change control, it should be noted that any changes to the hardware, software, and/or firmware components of the information system can potentially have significant effects on the overall security of the system. Accordingly, only qualified and authorized individuals should be allowed to obtain access to system components for the purposes of initiating changes, including upgrades and modifications.
Checks: C-57184r841719_chk

To list all the permissions of individual roles, as the database administrator, run the following SQL: 1. For User privileges: Gather a list of SHOW GRANTS commands. SHOW GRANTS will list the privileges granted to the account. Run this script to create the SHOW GRANTS script for each user: MariaDB&gt; SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR ', user,'@', host,';') AS grantQuery FROM mysql.user WHERE is_role = 'N'; Run each SHOW GRANTS command for each user. 2. For role privileges (except admin_option, whether the role can be granted by a particular use): MariaDB&gt; SELECT CONCAT('SHOW GRANTS FOR ',Role,';' ) FROM mysql.roles_mapping; Run each SHOW GRANTS command for each role. If any role has admin_option that should not, this is a finding. There are no privileges assigned to databases or tables, security is enforced through the traditional way with granting very specific user privileges. If any database or schema has update or create privileges and should not, this is a finding.

Fix: F-57135r841720_fix

Configure MariaDB to enforce access restrictions associated with changes to the configuration of MariaDB or database(s). 1. Use REVOKE to revoke privileges or roles on objects from users. MariaDB> REVOKE privileges ON object FROM user ; 2. Use REVOKE to remove a role from a user or another role that it was previously assigned to. MariaDB> REVOKE role FROM grantee or role ;

b
MariaDB must produce audit records of its enforcement of access restrictions associated with changes to the configuration of the DBMS or database(s).
- Medium - CCI-003938 - V-253733 - SV-253733r998228_rule
RMF Control
Severity
Medium
CCI
CCI-003938
Version
MADB-10-008000
Vuln IDs
  • V-253733
Rule IDs
  • SV-253733r998228_rule
Without auditing the enforcement of access restrictions against changes to configuration, it would be difficult to identify attempted attacks and an audit trail would not be available for forensic investigation for after-the-fact actions. Enforcement actions are the methods or mechanisms used to prevent unauthorized changes to configuration settings. Enforcement action methods may be as simple as denying access to a file based on the application of file permissions (access restriction). Audit items may consist of lists of actions blocked by access restrictions or changes identified after the fact.
Checks: C-57185r841722_chk

To verify that system denies are logged when unprivileged users attempt to change database configuration, run the following commands using the database administrator, and a newly created user shown here as test_user: MariaDB&gt; CREATE USER 'test_user'@'localhost' IDENTIFIED BY 'TEst_Password!2'; MariaDB&gt; CREATE DATABASE myapp; MariaDB&gt; CREATE TABLE myapp.mytable (a int, b char(10)); As the newly created test_user, alter the table: $ mariadb -u test_user -p Enter password: MariaDB&gt; ALTER TABLE mytable ADD COLUMN (c int); Check the latest log to determine if the denial is logged. For example: $ tail -f /var/log/mysql/audit.log 20190909 12:14:29,osboxes,test_user9,localhost,21,0,CONNECT,,,0 20190909 12:14:29,osboxes,test_user9,localhost,21,10,QUERY,, alter table myapp.mytable add column (c int) ,1142 20190909 12:14:29,osboxes,test_user9,localhost,21,0,DISCONNECT,,,0 If the denial is not produced, this is a finding. By default MariaDB configuration files are owned by the OS Administrator user (here root) and cannot be edited by nonprivileged users: $ ls -la /etc | grep my.cnf -rw-r--r--.   1 root root      301 Aug 25 12:45 my.cnf If my.cnf is not owned by the OS administrator (chown here as root) and does not have read and write permissions for the owner, this is a finding.

Fix: F-57136r841723_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' )); If the config files are not secured properly in the file system, change the ownership and permissions with operating system operations. Example: chown root:root /etc/my.cnf.d chmod 644 /etc/my.cnf.d

b
MariaDB must disable network functions, ports, protocols, and services deemed by the organization to be nonsecure, in accord with the Ports, Protocols, and Services Management (PPSM) guidance.
CM-7 - Medium - CCI-001762 - V-253734 - SV-253734r961470_rule
RMF Control
CM-7
Severity
Medium
CCI
CCI-001762
Version
MADB-10-008100
Vuln IDs
  • V-253734
Rule IDs
  • SV-253734r961470_rule
Use of nonsecure network functions, ports, protocols, and services exposes the system to avoidable threats.
Checks: C-57186r841725_chk

Check the ports in use by running the following command as the administrator user: MariaDB &gt; SHOW GLOBAL VARIABLES LIKE 'port'; If the currently defined port configuration is deemed prohibited, this is a finding.

Fix: F-57137r841726_fix

To verify that mariadb system denies specific network functions, locate cnf file and specifically bind ip address to deny (or port): $ ls -la /etc | grep my.cnf -rw-r--r--.   1 root root      301 Aug 25 12:45 my.cnf bind-address = 127.0.0.1 #just an example To specifically change default port (3306) is something different: port = 1234 bind = 10.10.10.10 #as an example After making changes to the .cnf file, stop and restart the database service.

b
MariaDB must require users to reauthenticate when organization-defined circumstances or situations require reauthentication.
- Medium - CCI-004895 - V-253735 - SV-253735r998229_rule
RMF Control
Severity
Medium
CCI
CCI-004895
Version
MADB-10-008200
Vuln IDs
  • V-253735
Rule IDs
  • SV-253735r998229_rule
The DOD standard for authentication of an interactive user is the presentation of a Common Access Card (CAC) or other physical token bearing a valid, current, DOD-issued Public Key Infrastructure (PKI) certificate, coupled with a Personal Identification Number (PIN) to be entered by the user at the beginning of each session and whenever reauthentication is required. Without reauthentication, users may access resources or perform tasks for which they do not have authorization. When applications provide the capability to change security roles or escalate the functional capability of the application, it is critical the user reauthenticate. In addition to the reauthentication requirements associated with session locks, organizations may require reauthentication of individuals and/or devices in other situations, including (but not limited to) the following circumstances: (i) When authenticators change; (ii) When roles change; (iii) When security categories of information systems change; (iv) When the execution of privileged functions occurs; (v) After a fixed period of time; or (vi) Periodically. Within the DOD, the minimum circumstances requiring reauthentication are privilege escalation and role changes.
Checks: C-57187r841728_chk

Determine all situations where a user must reauthenticate. Check if the mechanisms that handle such situations use the following SQL: To make a single user reauthenticate, an existing connection must be present: To search for a specific user: MariaDB&gt; SELECT * FROM information_schema.PROCESSLIST where user ='&lt;name&gt;' and host like '%'; To review all connections: MariaDB&gt; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; Note the ID(s) (processlist_id) of the connection(s) for the user that must reauthenticate. To make a user reauthenticate, run the following for each ID returned above (as they can have multiple connections): MariaDB&gt; KILL CONNECTION processslist_id; If the provided SQL does not force reauthentication, this is a finding.

Fix: F-57138r841729_fix

To force a single user reauthenticate, the user must be currently authenticated to the database server. Find the process ID of the user in question: MariaDB> SELECT id FROM information_schema.processlist WHERE user = 'username'; Use the id to kill the process, which kills the connection and forces the user to reauthenticate: MariaDB> KILL id; To force all users to reauthenticate, run the following as the database administrator: MariaDB> SELECT concat( KILL ,id, ; ) FROM information_schema.processlist INTO OUTFILE /tmp/x.txt; MariaDB> SOURCE /tmp/x.txt;

b
MariaDB must prohibit the use of cached authenticators after an organization-defined time period.
IA-5 - Medium - CCI-002007 - V-253736 - SV-253736r961521_rule
RMF Control
IA-5
Severity
Medium
CCI
CCI-002007
Version
MADB-10-008300
Vuln IDs
  • V-253736
Rule IDs
  • SV-253736r961521_rule
If cached authentication information is out-of-date, the validity of the authentication information may be questionable. Each connection to the MariaDB database requires the authentication of the user. The authentication remains in place for the connection until the connection is closed or the connection times out due to inactivity.
Checks: C-57188r841731_chk

The system parameter idle_transaction_timeout specifies in seconds when a connection will be terminated due to inactivity. After a connection is terminated, a new request to the database must be preceded by an authentication, which is not cached within the database. Run the following SQL: MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'idle_transaction_timeout'; If the value is 0, this is a finding.

Fix: F-57139r841732_fix

Verify that the idle_transaction_wait is set to a value greater than 0 or is set to the value needed by the administrator. The value of idle_transaction_wait can be validated by issuing SHOW VARIABLES. Example: Locate the MariaDB Enterprise Server configuration files in /etc/my.cnf.d/. Add the following: Under the [mariadb] section: idle_transaction_timeout = 60 After making changes to the .cnf file, stop and restart the database service.

c
MariaDB must use NSA-approved cryptography to protect classified information in accordance with the data owner's requirements.
SC-13 - High - CCI-002450 - V-253737 - SV-253737r962034_rule
RMF Control
SC-13
Severity
High
CCI
CCI-002450
Version
MADB-10-008400
Vuln IDs
  • V-253737
Rule IDs
  • SV-253737r962034_rule
Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated. It is the responsibility of the data owner to assess the cryptography requirements in light of applicable federal laws, Executive Orders, directives, policies, regulations, and standards. NSA-approved cryptography for classified networks is hardware based. This requirement addresses the compatibility of MariaDB with the encryption devices.
Checks: C-57189r841734_chk

If MariaDB is deployed in an unclassified environment, this is not applicable (NA). If MariaDB is not using NSA-approved cryptography to protect classified information in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards, this is a finding. To check if MariaDB is configured to use SSL, as the database administrator: MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'have_ssl'; If have_ssl is not YES, this is a finding. Consult network administration staff to determine whether the server is protected by NSA-approved encrypting devices. If not, this a finding.

Fix: F-57140r841735_fix

Configure the DBMS and related system components to use NSA-approved cryptography to protect classified information in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards. Configure MariaDB to use TLS. Details for this procedure can be found here: https://mariadb.com/docs/security/encryption/in-transit/enable-tls-server/

b
MariaDB must only accept end entity certificates issued by DoD PKI or DoD-approved PKI Certification Authorities (CAs) for the establishment of all encrypted sessions.
SC-23 - Medium - CCI-002470 - V-253738 - SV-253738r961596_rule
RMF Control
SC-23
Severity
Medium
CCI
CCI-002470
Version
MADB-10-008500
Vuln IDs
  • V-253738
Rule IDs
  • SV-253738r961596_rule
Only DoD-approved external PKIs have been evaluated to ensure that they have security controls and identity vetting procedures in place that are sufficient for DoD systems to rely on the identity asserted in the certificate. PKIs lacking sufficient security controls and identity vetting procedures risk being compromised and issuing certificates that enable adversaries to impersonate legitimate users. The authoritative list of DoD-approved PKIs is published at https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/pdf/unclass-ss_using_commercial_pki_certificates.pdf. This requirement focuses on communications protection for the MariaDB session rather than for the network packet.
Checks: C-57190r841737_chk

As the database administrator, check the following variables: MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'ssl_ca'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'ssl_cert'; The Value column will show the fully qualified file name of the ssl_ca and ssl_cert respectively. The issuer can be found by running the following command: $ openssl x509 -in fully-qualified-file-name-of-ssl_ca -noout -issuer $ openssl x509 -in fully-qualified-file-name-of-ssl_cert -noout -issuer The issuer should be checked against the authoritative list of DoD-approved PKIs, which is published at https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/pdf/unclass-ss_using_commercial_pki_certificates.pdf. If the DBMS will accept non-DoD approved PKI end-entity certificates, this is a finding.

Fix: F-57141r841738_fix

Revoke trust in any certificates not issued by a DoD-approved certificate authority. Configure MariaDB to accept only DoD and DoD-approved PKI end-entity certificates.

b
MariaDB must implement cryptographic mechanisms to prevent unauthorized modification of organization-defined information at rest (to include, at a minimum, PII and classified information) on organization-defined information system components.
SC-28 - Medium - CCI-002475 - V-253739 - SV-253739r961599_rule
RMF Control
SC-28
Severity
Medium
CCI
CCI-002475
Version
MADB-10-008600
Vuln IDs
  • V-253739
Rule IDs
  • SV-253739r961599_rule
MariaDB’s handling of data requiring data at rest protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. These cryptographic mechanisms may be native to the MariaDB or implemented via additional software or operating system/file system settings, as appropriate to the situation. Selection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields). The decision whether and what to encrypt rests with the data owner and is also influenced by the physical measures taken to secure the equipment and media on which the information resides.
Checks: C-57191r841740_chk

Review the security guide to determine whether the organization has defined the information at rest that is to be protected from modification, which must include, at a minimum, PII and classified information. If no information is identified as requiring such protection, this is not a finding. Review the configuration of MariaDB, operating system/file system, and additional software as relevant. One possible way to encrypt data within MariaDB is to use the file key management plugin. To determine if this is installed, check the following variables as the Database administrator: MariaDB&gt; SHOW PLUGINS; Confirm the file_key_management.so is listed. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'file_key%'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'aria_en%'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_tables'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_log'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'innodb_tablespace%'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'encrypt%'; Confirm that these are ON. If any of the information defined as requiring cryptographic protection from modification is not encrypted in a manner that provides the required level of protection, this is a finding.

Fix: F-57142r841741_fix

Configure MariaDB, operating system/file system, and additional software as relevant, to provide the required level of cryptographic protection. Once the File Key Management Plugin is enabled, use it by creating an encrypted table: MariaDB> CREATE TABLE t (i int) ENGINE=InnoDB ENCRYPTED=YES; Now, table t will be encrypted using the encryption key from the key file.

b
MariaDB must implement cryptographic mechanisms preventing the unauthorized disclosure of organization-defined information at rest on organization-defined information system components.
SC-28 - Medium - CCI-002476 - V-253740 - SV-253740r961602_rule
RMF Control
SC-28
Severity
Medium
CCI
CCI-002476
Version
MADB-10-008700
Vuln IDs
  • V-253740
Rule IDs
  • SV-253740r961602_rule
MariaDB’s handling of data requiring data at rest protections must employ cryptographic mechanisms to prevent unauthorized disclosure and modification of the information at rest. These cryptographic mechanisms may be native to the MariaDB or implemented via additional software or operating system/file system settings, as appropriate to the situation. Selection of a cryptographic mechanism is based on the need to protect the integrity of organizational information. The strength of the mechanism is commensurate with the security category and/or classification of the information. Organizations have the flexibility to either encrypt all information on storage devices (i.e., full disk encryption) or encrypt specific data structures (e.g., files, records, or fields). The decision whether and what to encrypt rests with the data owner and is also influenced by the physical measures taken to secure the equipment and media on which the information resides.
Checks: C-57192r841743_chk

Review the security guide to determine whether the organization has defined the information at rest that is to be protected from modification, which must include, at a minimum, PII and classified information. If no information is identified as requiring such protection, this is not a finding. Review the configuration of MariaDB, operating system/file system, and additional software as relevant. One possible way to encrypt data within MariaDB is to use the file key management plugin. To determine if this is installed check the following variables as the Database administrator: MariaDB&gt; SHOW PLUGINS; Confirm the file_key_management.so is listed. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'file_key%'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'aria_en%'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_tables'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'innodb_encrypt_log'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'innodb_tablespace%'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'encrypt%'; Confirm that these are ON. If any of the information defined as requiring cryptographic protection from modification is not encrypted in a manner that provides the required level of protection, this is a finding.

Fix: F-57143r841744_fix

Configure MariaDB, operating system/file system, and additional software as relevant, to provide the required level of cryptographic protection for information requiring cryptographic protection against disclosure. Secure the premises, equipment, and media to provide the required level of physical protection. One possible way to encrypt data within MariaDB is: How to Set Up and Configure MariaDB for Data-at-Rest Encryption Generate random encryption keys using openssl rand command. $ mkdir -p /etc/mysql/encryption $ for i in {1..5}; do openssl rand -hex 32 >> /etc/mysql/encryption/keyfile; done; Open and edit the file /etc/mysql/encryption/keyfile and add the key IDs that will be referenced when creating encrypted tables as the encryption key id. See ENCRYPTION_KEY_ID for more details. The format will be as follows: <encryption_key_id1>;<hex-encoded_encryption_key1> <encryption_key_id2>;<hex-encoded_encryption_key2> In the example keyfile, this looks similar to the following: $ cat keyfile 1;687a90b4423c10417f2483726a5901007571c16331d2ee9534333fef4e323075 2;e7bf20f1cbde9632587c2996871cff74871890d19b49e273d13def123d781e17 3;9284c9c80da9a323b3ac2c82427942dfbf1718b57255cc0bc0e2c3d6f15ac3ac 4;abf80c3a8b10643ef53a43c759227304bcffa263700a94a996810b0f0459a580 5;bdbc5f67d34a4904c4adc9771420ac2ab2bd9c6af1ec532e960335e831f02933 Create or generate a random password using the similar command from step 1: $ openssl rand -hex 128 > /etc/mysql/encryption/keyfile.key Before proceeding to the next step, it is important to take note of the following details about encrypting the key file: The only algorithm that MariaDB currently supports to encrypt the key file is Cipher Block Chaining (CBC) mode of Advanced Encryption Standard (AES). The encryption key size can be 128-bits, 192-bits, or 256-bits. The encryption key is created from the SHA-1 hash of the encryption password. The encryption password has a max length of 256 characters. To encrypt the key file using openssl enc command, run the following command: $ openssl enc -aes-256-cbc -md sha1 -pass file:/etc/mysql/encryption/keyfile.key -in /etc/mysql/encryption/keyfile -out /etc/mysql/encryption/keyfile.enc Add the following variables in the MySQL configuration file (i.e., /etc/my.cnf on RHEL-based Linux OS or /etc/mysql/my.cnf in Debian/Ubuntu Linux based OS) [mysqld] … #################### DATABASE ENCRYPTION ############################## plugin_load_add = file_key_management file_key_management_filename = /etc/mysql/encryption/keyfile.enc file_key_management_filekey = FILE:/etc/mysql/encryption/keyfile.key file_key_management_encryption_algorithm = aes_cbc encrypt_binlog = 1 innodb_encrypt_tables = ON innodb_encrypt_log = ON innodb_encryption_threads = 4 innodb_encryption_rotate_key_age = 0 # Do not rotate key Restart MariaDB Server now $ systemctl start mariadb Once the File Key Management Plugin is enabled, use it by creating an encrypted table: CREATE TABLE t (i int) ENGINE=InnoDB ENCRYPTED=YES Table t will be encrypted using the encryption key from the key file.

b
MariaDB must maintain the confidentiality and integrity of information during preparation for transmission.
SC-8 - Medium - CCI-002420 - V-253741 - SV-253741r961638_rule
RMF Control
SC-8
Severity
Medium
CCI
CCI-002420
Version
MADB-10-008900
Vuln IDs
  • V-253741
Rule IDs
  • SV-253741r961638_rule
Information can be either unintentionally or maliciously disclosed or modified during preparation for transmission, including, for example, during aggregation, at protocol transformation points, and during packing/unpacking. These unauthorized disclosures or modifications compromise the confidentiality, or integrity of the information. Use of this requirement will be limited to situations where the data owner has a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process. When transmitting data, MariaDB associated applications and infrastructure must leverage transmission protection mechanisms.
Checks: C-57193r841746_chk

If the data owner does not have a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process, this is not a finding. First, as the database administrator, verify the following settings: MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'ssl_ca'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'ssl_cert'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'ssl_key'; If SSL is not enabled, this is a finding. If MariaDB does not employ protective measures against unauthorized disclosure and modification during preparation for transmission, this is a finding.

Fix: F-57144r841747_fix

Configure the DBMS and related system components to use NSA-approved cryptography to protect classified information in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards. Configure MariaDB to use TLS. Details for this procedure can be found here: https://mariadb.com/docs/security/encryption/in-transit/enable-tls-server/

b
MariaDB must maintain the confidentiality and integrity of information during reception.
SC-8 - Medium - CCI-002422 - V-253742 - SV-253742r961641_rule
RMF Control
SC-8
Severity
Medium
CCI
CCI-002422
Version
MADB-10-009000
Vuln IDs
  • V-253742
Rule IDs
  • SV-253742r961641_rule
Information can be either unintentionally or maliciously disclosed or modified during reception, including, for example, during aggregation, at protocol transformation points, and during packing/unpacking. These unauthorized disclosures or modifications compromise the confidentiality, or integrity of the information. This requirement applies only to those applications that are either distributed or can allow access to data nonlocally. Use of this requirement will be limited to situations where the data owner has a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process. When receiving data, MariaDB-associated applications and infrastructure must leverage protection mechanisms.
Checks: C-57194r841749_chk

If the data owner does not have a strict requirement for ensuring data integrity and confidentiality is maintained at every step of the data transfer and handling process, this is not a finding. First, as the database administrator, verify the following settings: MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'ssl_ca'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'ssl_cert'; MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'ssl_key'; If SSL is not enabled, this is a finding. If MariaDB, associated applications, and infrastructure do not employ protective measures against unauthorized disclosure and modification during reception, this is a finding.

Fix: F-57145r841750_fix

Configure the DBMS and related system components to use NSA-approved cryptography to protect classified information in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards. Configure MariaDB to use TLS. Details for this procedure can be found here: https://mariadb.com/docs/security/encryption/in-transit/enable-tls-server/

b
When invalid inputs are received, MariaDB must behave in a predictable and documented manner that reflects organizational and system objectives.
SI-10 - Medium - CCI-002754 - V-253743 - SV-253743r961656_rule
RMF Control
SI-10
Severity
Medium
CCI
CCI-002754
Version
MADB-10-009100
Vuln IDs
  • V-253743
Rule IDs
  • SV-253743r961656_rule
A common vulnerability is unplanned behavior when invalid inputs are received. This requirement guards against adverse or unintended system behavior caused by invalid inputs, where information system responses to the invalid input may be disruptive or cause the system to fail into an unsafe state. The behavior will be derived from the organizational and system requirements and includes, but is not limited to, notification of the appropriate personnel, creating an audit record, and rejecting invalid input. This calls for inspection of application source code, which will require collaboration with the application developers. It is recognized that in many cases, the database administrator (DBA) is organizationally separate from the application developers, and may have limited, if any, access to source code. Nevertheless, protections of this type are so important to the secure operation of databases that they must not be ignored. At a minimum, the DBA must attempt to obtain assurances from the development organization that this issue has been addressed and must document what has been discovered.
Checks: C-57195r841752_chk

As the database administrator, make a small SQL syntax error by running the following: MariaDB&gt; CREAT TABLEincorrect_syntax(id INT) ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near CREAT TABLEincorrect_syntax(id INT) at line 1 Now verify the syntax error was logged (change the log file name and part to suit the circumstances): $ cat $DATADIR/sql_errors.log 2019-09-05 14:31:22 root[root] @ localhost [] ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near CREAT TABLEincorrect_syntax(id INT) at line 1 : CREAT TABLEincorrect_syntax(id INT) Review security guide to determine how input errors from application to MariaDB are to be handled in general and if any special handling is defined for specific circumstances. If it does not implement the documented behavior, this is a finding.

Fix: F-57146r841753_fix

All errors and denials are logged to the sql errorlog. If the sql error log does not exist, install the sql error log plugin as follows: MariaDB> INSTALL SONAME 'sql_errlog'; The error log should by default be located as sql_errors.log within the data directory (/var/lib/mysql by default).

b
When updates are applied to the MariaDB software, any software components that have been replaced or made unnecessary must be removed.
SI-2 - Medium - CCI-002617 - V-253744 - SV-253744r961677_rule
RMF Control
SI-2
Severity
Medium
CCI
CCI-002617
Version
MADB-10-009200
Vuln IDs
  • V-253744
Rule IDs
  • SV-253744r961677_rule
Previous versions of MariaDB components that are not removed from the information system after updates have been installed may be exploited by adversaries. MariaDB may remove older versions of software automatically from the information system. In other cases, manual review and removal will be required. In planning installations and upgrades, organizations must include steps (automated, manual, or both) to identify and remove the outdated modules. A transition period may be necessary when both the old and the new software are required. This should be taken into account in the planning.
Checks: C-57196r841755_chk

If updating through a repository using yum, apt, etc., all MariaDB packages should be updated/upgraded at the same time. Use the package manager to verify no outdated packages remain. Example: $ sudo yum list installed | grep -i mariadb If older packages remain, this is a finding.

Fix: F-57147r841756_fix

If after the upgrade outdated packages remain, update them if needed or remove. Example: $ sudo yum remove package_name

b
Security-relevant software updates to MariaDB must be installed within the time period directed by an authoritative source (e.g., IAVM, CTOs, DTMs, and STIGs).
SI-2 - Medium - CCI-002605 - V-253745 - SV-253745r961683_rule
RMF Control
SI-2
Severity
Medium
CCI
CCI-002605
Version
MADB-10-009300
Vuln IDs
  • V-253745
Rule IDs
  • SV-253745r961683_rule
Security flaws with software applications, including database management systems, are discovered daily. Vendors are constantly updating and patching their products to address newly discovered security vulnerabilities. Organizations (including any contractor to the organization) are required to promptly install security-relevant software updates (e.g., patches, service packs, and hot fixes). Flaws discovered during security assessments, continuous monitoring, incident response activities, or information system error handling must also be addressed expeditiously. Organization-defined time periods for updating security-relevant software may vary based on a variety of factors including, for example, the security category of the information system or the criticality of the update (i.e., severity of the vulnerability related to the discovered flaw). This requirement will apply to software patch management solutions that are used to install patches across the enclave and also to applications themselves that are not part of that patch management solution. For example, many browsers today provide the capability to install their own patch software. Patch criticality, as well as system criticality, will vary. Therefore, the tactical situations regarding the patch management process will also vary. This means that the time period utilized must be a configurable parameter. Time frames for application of security-relevant software updates may be dependent upon the Information Assurance Vulnerability Management (IAVM) process. The application will be configured to check for and install security-relevant software updates within an identified time period from the availability of the update. The specific time period will be defined by an authoritative source (e.g., IAVM, CTOs, DTMs, and STIGs).
Checks: C-57197r841758_chk

If new packages are available for MariaDB, they can be reviewed in the package manager appropriate for the server operating system. To list the version of installed MariaDB, run the following Linux commands as the system administrator: MariaDB&gt; SELECT @@version; Check the list of installed packages: $ sudo yum list installed | grep -i mariadb All versions of MariaDB will be listed on: https://mariadb.com/downloads/#mariadb_platform-mariadb_server All security-relevant software updates for MariaDB will be listed on: https://mariadb.com/kb/en/library/security/ If MariaDB is not at the latest version, this is a finding. If MariaDB is not at the latest version and the evaluated version has CVEs (IAVAs), this is a CAT I finding.

Fix: F-57148r841759_fix

Institute and adhere to policies and procedures to ensure that patches are consistently applied to MariaDB within the time allowed.

b
MariaDB must be able to generate audit records when security objects are accessed.
AU-12 - Medium - CCI-000172 - V-253746 - SV-253746r961791_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-009400
Vuln IDs
  • V-253746
Rule IDs
  • SV-253746r961791_rule
Changes to the security configuration must be tracked. This requirement applies to situations where security data is retrieved or modified via data manipulation operations, as opposed to via specialized security functionality. In an SQL environment, types of access include, but are not necessarily limited to: SELECT CREATE INSERT UPDATE DELETE EXECUTE ALTER DROP
Checks: C-57198r841761_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events includes ALL in corresponding audit filters. If not, this is a finding.

Fix: F-57149r841762_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when unsuccessful attempts to access security objects occur.
AU-12 - Medium - CCI-000172 - V-253747 - SV-253747r961791_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-009500
Vuln IDs
  • V-253747
Rule IDs
  • SV-253747r961791_rule
Changes to the security configuration must be tracked. This requirement applies to situations where security data is retrieved or modified via data manipulation operations, as opposed to via specialized security functionality. In an SQL environment, types of access include, but are not necessarily limited to: SELECT CREATE INSERT UPDATE DELETE EXECUTE ALTER DROP To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-57199r841764_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events includes ALL in corresponding audit filters. If not, this is a finding.

Fix: F-57150r841765_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when categories of information (e.g., classification levels/security levels) are accessed.
AU-12 - Medium - CCI-000172 - V-253748 - SV-253748r961797_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-009600
Vuln IDs
  • V-253748
Rule IDs
  • SV-253748r961797_rule
Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-57200r841767_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events includes ALL in corresponding audit filters. If not, this is a finding.

Fix: F-57151r841768_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when unsuccessful attempts to access categories of information (e.g., classification levels/security levels) occur.
AU-12 - Medium - CCI-000172 - V-253749 - SV-253749r961797_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-009700
Vuln IDs
  • V-253749
Rule IDs
  • SV-253749r961797_rule
Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-57201r841770_chk

If category tracking is not required in the database, this is not applicable. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events includes ALL in corresponding audit filters. If not, this is a finding.

Fix: F-57152r841771_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when privileges/permissions are added.
AU-12 - Medium - CCI-000172 - V-253750 - SV-253750r961800_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-009800
Vuln IDs
  • V-253750
Rule IDs
  • SV-253750r961800_rule
Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users. In MariaDB, adding permissions is done via the GRANT command, or, in the negative, the REVOKE command.
Checks: C-57202r841773_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events includes DCL or ALL in corresponding audit filters. If not, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) Open a new terminal and connect to the database. As the database administrator, create a user without special permissions: MariaDB&gt; CREATE USER 'user_name_here'@'localhost' IDENTIFIED BY 'password_here'; As the database administrator, create a role by running the following SQL: MariaDB&gt; CREATE ROLE 'role_name_here'; As the database administrator, GRANT role to testuser: MariaDB&gt; GRANT 'role_name_here' TO 'user_name_here'@'localhost'; As the database administrator, add privileges to user_role for testdb, and add GRANT role to testuser: MariaDB&gt; GRANT SELECT ON db_name_here TO 'user_name_here'@'localhost'; MariaDB&gt; GRANT SELECT ON db_name_here TO 'role_name_here'; As the database administrator, modify privileges for testuser and user_role: MariaDB&gt; GRANT DELETE ON db_name_here TO 'user_name_here'@'localhost'; MariaDB&gt; GRANT DELETE ON db_name_here TO 'role_name_here'; If the audit records are not produced for successful attempts to modify privileges/permissions and roles in the first terminal, this is a finding.

Fix: F-57153r841774_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when unsuccessful attempts to add privileges/permissions occur.
AU-12 - Medium - CCI-000172 - V-253751 - SV-253751r961800_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-009900
Vuln IDs
  • V-253751
Rule IDs
  • SV-253751r961800_rule
Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected. In MariaDB, adding permissions is done via the GRANT command, or, in the negative, the REVOKE command. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-57203r841776_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events includes DCL or ALL in corresponding audit filters. If not, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) Open a new terminal and connect to the database. As the database administrator, create a user without special permissions: MariaDB&gt; CREATE USER 'user_name_here'@'localhost' IDENTIFIED BY 'password_here'; As the database administrator, create a role by running the following SQL: MariaDB&gt; CREATE ROLE 'role_name_here'; As the database administrator, GRANT role to testuser: MariaDB&gt; GRANT 'role_name_here' TO 'user_name_here'@'localhost'; As the database administrator, add privileges to user_role for testdb, and add GRANT role to testuser : MariaDB&gt; GRANT SELECT ON db_name_here TO 'user_name_here'@'localhost'; MariaDB&gt; GRANT SELECT ON db_name_here TO 'role_name_here'; As a regular user, modify privileges for testuser and user_role: MariaDB&gt; GRANT DELETE ON db_name_here TO 'user_name_here'@'localhost'; MariaDB&gt; GRANT DELETE ON db_name_here TO 'role_name_here'; If the audit records are not produced for unsuccessful attempts to modify privileges/permissions and roles in the first terminal, this is a finding.

Fix: F-57154r841777_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when privileges/permissions are modified.
AU-12 - Medium - CCI-000172 - V-253752 - SV-253752r961800_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010000
Vuln IDs
  • V-253752
Rule IDs
  • SV-253752r961800_rule
Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users. In the MariaDB environment, modifying permissions is done via the GRANT, and REVOKE commands.
Checks: C-57204r841779_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events includes DCL or ALL in corresponding audit filters. If not, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) Open a new terminal and connect to the database. As the database administrator, create a user without special permissions: MariaDB&gt; CREATE USER 'user_name_here'@'localhost' IDENTIFIED BY 'password_here'; As the database administrator, create a role by running the following SQL: MariaDB&gt; CREATE ROLE 'role_name_here'; As the database administrator, GRANT role to testuser: MariaDB&gt; GRANT 'role_name_here' TO 'user_name_here'@'localhost'; As the database administrator, add privileges to user_role for testdb, and add GRANT role to testuser: MariaDB&gt; GRANT SELECT ON db_name_here TO 'user_name_here'@'localhost'; MariaDB&gt; GRANT SELECT ON db_name_here TO 'role_name_here'; As the database administrator, modify privileges for testuser and user_role: MariaDB&gt; GRANT DELETE ON db_name_here TO 'user_name_here'@'localhost'; MariaDB&gt; GRANT DELETE ON db_name_here TO 'role_name_here'; If the audit records are not produced for successful attempts to modify privileges/permissions and roles in the first terminal, this is a finding.

Fix: F-57155r841780_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when unsuccessful attempts to modify privileges/permissions occur.
AU-12 - Medium - CCI-000172 - V-253753 - SV-253753r961800_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010100
Vuln IDs
  • V-253753
Rule IDs
  • SV-253753r961800_rule
Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected. In the MariaDB environment, modifying permissions is typically done via the GRANT, and REVOKE commands. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-57205r841782_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events includes DCL or ALL in corresponding audit filters. If not, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) Open a new terminal and connect to the database. As the database administrator, create a user without special permissions: MariaDB&gt; CREATE USER 'user_name_here'@'localhost' IDENTIFIED BY 'password_here'; As the database administrator, create a role by running the following SQL: MariaDB&gt; CREATE ROLE 'role_name_here'; As the database administrator, GRANT role to testuser: MariaDB&gt; GRANT 'role_name_here' TO 'user_name_here'@'localhost'; As the database administrator, add privileges to user_role for testdb, and add GRANT role to testuser: MariaDB&gt; GRANT SELECT ON db_name_here TO 'user_name_here'@'localhost'; MariaDB&gt; GRANT SELECT ON db_name_here TO 'role_name_here'; As a regular user, modify privileges for testuser and user_role: MariaDB&gt; GRANT DELETE ON db_name_here TO 'user_name_here'@'localhost'; MariaDB&gt; GRANT DELETE ON db_name_here TO 'role_name_here'; If the audit records are not produced for unsuccessful attempts to modify privileges/permissions and roles in the first terminal, this is a finding.

Fix: F-57156r841783_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when security objects are modified.
AU-12 - Medium - CCI-000172 - V-253754 - SV-253754r961803_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010200
Vuln IDs
  • V-253754
Rule IDs
  • SV-253754r961803_rule
Changes in the database objects (tables, views, procedures, functions) that record and control permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized changes to the security subsystem could go undetected. The database could be severely compromised or rendered inoperative.
Checks: C-57206r841785_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.

Fix: F-57157r841786_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when unsuccessful attempts to modify security objects occur.
AU-12 - Medium - CCI-000172 - V-253755 - SV-253755r961803_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010300
Vuln IDs
  • V-253755
Rule IDs
  • SV-253755r961803_rule
Changes in the database objects (tables, views, procedures, functions) that record and control permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized changes to the security subsystem could go undetected. The database could be severely compromised or rendered inoperative. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-57207r841788_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.

Fix: F-57158r841789_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when categories of information (e.g., classification levels/security levels) are modified.
AU-12 - Medium - CCI-000172 - V-253756 - SV-253756r961809_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010400
Vuln IDs
  • V-253756
Rule IDs
  • SV-253756r961809_rule
Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-57208r841791_chk

If category tracking is not required in the database, this is not applicable. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.

Fix: F-57159r841792_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when unsuccessful attempts to modify categories of information (e.g., classification levels/security levels) occur.
AU-12 - Medium - CCI-000172 - V-253757 - SV-253757r961809_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010500
Vuln IDs
  • V-253757
Rule IDs
  • SV-253757r961809_rule
Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-57209r841794_chk

If category tracking is not required in the database, this is not applicable. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.

Fix: F-57160r841795_fix

The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when privileges/permissions are deleted.
AU-12 - Medium - CCI-000172 - V-253758 - SV-253758r961812_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010600
Vuln IDs
  • V-253758
Rule IDs
  • SV-253758r961812_rule
Changes in the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized elevation or restriction of privileges could go undetected. Elevated privileges give users access to information and functionality that they should not have; restricted privileges wrongly deny access to authorized users. In MariaDB, deleting permissions is typically done via the REVOKE command.
Checks: C-57210r841797_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. As the database administrator, create a user without special permissions: MariaDB&gt; CREATE USER testuser IDENTIFIED BY password ; In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) As the database administrator, create a role by running the following SQL: MariaDB&gt; CREATE ROLE user_role As the database administrator, GRANT user_role to testuser: MariaDB&gt; GRANT user_role to testuser As the database administrator, add 2 privileges to user_role for testdb and then delete one of the privileges: MariaDB&gt; GRANT SELECT,DELETE on testdb to testuser MariaDB&gt; GRANT SELECT on testdb to testuser As the database administrator, revoke grant from testuser: MariaDB&gt; REVOKE user_role to testuser If the audit records for REVOKE and the second SELECT are not produced in the first terminal, this is a finding.

Fix: F-57161r841798_fix

No super/administrative users should not have access to modify tables within the mysql database. Verify users do not have access and revoke as necessary. Example: View user grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; If user has INSERT, UPDATE, and/or DELETE on the mysql database or all databases, modify the user privileges as necessary. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when unsuccessful attempts to delete privileges/permissions occur.
AU-12 - Medium - CCI-000172 - V-253759 - SV-253759r961812_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010700
Vuln IDs
  • V-253759
Rule IDs
  • SV-253759r961812_rule
Failed attempts to change the permissions, privileges, and roles granted to users and roles must be tracked. Without an audit trail, unauthorized attempts to elevate or restrict privileges could go undetected. In MariaDB, deleting permissions is typically done via the REVOKE command. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-57211r841800_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. As the database administrator, create a user without special permissions: MariaDB&gt; CREATE USER testuser IDENTIFIED BY password ; In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) As the database administrator, create a role by running the following SQL: MariaDB&gt; CREATE ROLE user_role As the database administrator, GRANT user_role to testuser: MariaDB&gt; GRANT user_role to testuser As the database administrator, add two privileges to user_role for testdb and then delete one of the privileges: MariaDB&gt; GRANT SELECT,DELETE on testdb to testuser As the testuser, remove the users delete privilege by granting only SELECT, and revoke grant from test user: MariaDB&gt; GRANT SELECT on testdb to testuser MariaDB&gt; REVOKE user_role to testuser If the audit records for REVOKE and the second SELECT are not produced in the first terminal, this is a finding.

Fix: F-57162r841801_fix

No super/administrative users should not have access to modify tables within the mysql database. Verify users do not have access and revoke as necessary. Example: View user grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; If user has INSERT, UPDATE, and/or DELETE on the mysql database or all databases, modify the user privileges as necessary. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when security objects are deleted.
AU-12 - Medium - CCI-000172 - V-253760 - SV-253760r961818_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010800
Vuln IDs
  • V-253760
Rule IDs
  • SV-253760r961818_rule
The removal of security objects from the database/DBMS would seriously degrade a system s information assurance posture. If such an event occurs, it must be logged.
Checks: C-57212r841803_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) As the database administrator, create a role by running the following SQL: MariaDB&gt; CREATE ROLE user_role As the database administrator, delete the user_role: MariaDB&gt; DROP ROLE user_role If the audit records for DROP are not produced in the first terminal, this is a finding.

Fix: F-57163r841804_fix

Super/administrative users must not have access to modify tables within the mysql database. Verify users do not have access and revoke as necessary. Example: View user grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; If user has INSERT, UPDATE, and/or DELETE on the mysql database or all databases, modify the user privileges as necessary. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when unsuccessful attempts to delete security objects occur.
AU-12 - Medium - CCI-000172 - V-253761 - SV-253761r961818_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-010900
Vuln IDs
  • V-253761
Rule IDs
  • SV-253761r961818_rule
The removal of security objects from the database/DBMS would seriously degrade a system s information assurance posture. If such an action is attempted, it must be logged. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-57213r841806_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. As the database administrator, create a user without special permissions: MariaDB&gt; CREATE USER testuser IDENTIFIED BY password ; In one terminal, tail the audit log file. For example: $ tail -F /var/lib/mysql/server_audit.log (default location) As the database administrator, create a role by running the following SQL: MariaDB&gt; CREATE ROLE user_role As the database administrator, GRANT user_role to testuser: MariaDB&gt; GRANT user_role to testuser As the database administrator, add two privileges to user_role for testdb and then delete one of the privileges: MariaDB&gt; GRANT SELECT,DELETE on testdb to testuser MariaDB&gt; GRANT SELECT on testdb to testuser As the database administrator, revoke grant from testuser: MariaDB&gt; REVOKE user_role to testuser If the audit records for REVOKE and the second SELECT are not produced in the first terminal, this is a finding.

Fix: F-57164r841807_fix

Super/administrative users must not have access to modify tables within the mysql database. Verify users do not have access and revoke as necessary. Example: View user grants: MariaDB> SHOW GRANTS FOR 'username'@'host'; If user has INSERT, UPDATE, and/or DELETE on the mysql database or all databases, modify the user privileges as necessary. The MariaDB Enterprise Audit plugin can be configured to audit these changes. Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when categories of information (e.g., classification levels/security levels) are deleted.
AU-12 - Medium - CCI-000172 - V-253762 - SV-253762r961821_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011000
Vuln IDs
  • V-253762
Rule IDs
  • SV-253762r961821_rule
Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-57214r841809_chk

If category tracking is not required in the database, this is not applicable. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.

Fix: F-57165r841810_fix

Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when unsuccessful attempts to delete categories of information (e.g., classification levels/security levels) occur.
AU-12 - Medium - CCI-000172 - V-253763 - SV-253763r961821_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011100
Vuln IDs
  • V-253763
Rule IDs
  • SV-253763r961821_rule
Changes in categories of information must be tracked. Without an audit trail, unauthorized access to protected data could go undetected. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones. For detailed information on categorizing information, refer to FIPS Publication 199, Standards for Security Categorization of Federal Information and Information Systems, and FIPS Publication 200, Minimum Security Requirements for Federal Information and Information Systems.
Checks: C-57215r841812_chk

If category tracking is not required in the database, this is not applicable. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify query_events ALL is included in corresponding audit filters. If not, this is a finding.

Fix: F-57166r841813_fix

Update necessary audit filters to include query_event ALL. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ], "query_event": [ "ALL" ] }' ));

b
MariaDB must generate audit records when successful logons or connections occur.
AU-12 - Medium - CCI-000172 - V-253764 - SV-253764r961824_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011200
Vuln IDs
  • V-253764
Rule IDs
  • SV-253764r961824_rule
For completeness of forensic analysis, it is necessary to track who/what (a user or other principal) logs on to the DBMS.
Checks: C-57216r844266_chk

Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify connect_events include connect in audit filters. If not, this is a finding. Log in to and out of the MariaDB database server. Verify the connect is logged in the audit logfile or syslog depending on how it is configured. If connect is not logged this is a finding.

Fix: F-57167r841816_fix

Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ] }' ));

b
MariaDB must generate audit records when unsuccessful logons or connection attempts occur.
AU-12 - Medium - CCI-000172 - V-253765 - SV-253765r961824_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011300
Vuln IDs
  • V-253765
Rule IDs
  • SV-253765r961824_rule
For completeness of forensic analysis, it is necessary to track failed attempts to log on to MariaDB. While positive identification may not be possible in a case of failed authentication, as much information as possible about the incident must be captured.
Checks: C-57217r841818_chk

Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify connect_events include connect in audit filters. If not, this is a finding. Log in to and out of the MariaDB database server with both valid and invalid users. Verify the connect and disconnect are logged in the audit logfile or syslog depending on how it is configured. If connect/disconnect and invalid logins are not logged, this is a finding.

Fix: F-57168r841819_fix

Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ] }' ));

b
MariaDB must generate audit records for all privileged activities or other system-level access.
AU-12 - Medium - CCI-000172 - V-253766 - SV-253766r961827_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011400
Vuln IDs
  • V-253766
Rule IDs
  • SV-253766r961827_rule
Without tracking privileged activity, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. System documentation should include a definition of the functionality considered privileged. A privileged function in this context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to: CREATE ALTER DROP GRANT REVOKE There may also be Data Manipulation Language (DML) statements that, subject to context, should be regarded as privileged. Possible examples in SQL include: TRUNCATE TABLE; DELETE, or DELETE affecting more than n rows, for some n, or DELETE without a WHERE clause; UPDATE or UPDATE affecting more than n rows, for some n, or UPDATE without a WHERE clause; any SELECT, INSERT, UPDATE, or DELETE to an application-defined security table executed by other than a security principal. Depending on the capabilities of the DBMS and the design of the database and associated applications, audit logging may be achieved by means of DBMS auditing features, database triggers, other mechanisms, or a combination of these. Note that it is particularly important to audit, and tightly control, any action that weakens the implementation of this requirement itself, since the objective is to have a complete audit trail of all administrative activity.
Checks: C-57218r841821_chk

Review the security plan to obtain the definition of the database/DBMS functionality considered privileged in the context of the system in question. If audit logging covers at least all of the actions defined as privileged, this is not a finding, otherwise, this is a finding. Review the MariaDB audit settings. Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the MariaDB Enterprise Audit plugin is not active, this is a finding. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Review the filters to verify TABLE and QUERY are included. If QUERY and TABLE are not included, this is a finding.

Fix: F-57169r841822_fix

Edit the necessary filters to include the desired logging actions. Exact steps vary depending on desired logging. Example named audit filter assigned to specific user: MariaDB> INSERT INTO mysql.server_audit_users (host, user, filtername) VALUES ("%", "user1", "filter_example"); MariaDB> SET GLOBAL server_audit_reload_filters=ON;

b
MariaDB must generate audit records when unsuccessful attempts to execute privileged activities or other system-level access occur.
AU-12 - Medium - CCI-000172 - V-253767 - SV-253767r961827_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011500
Vuln IDs
  • V-253767
Rule IDs
  • SV-253767r961827_rule
Without tracking privileged activity, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. System documentation should include a definition of the functionality considered privileged. A privileged function in this context is any operation that modifies the structure of the database, its built-in logic, or its security settings. This would include all Data Definition Language (DDL) statements and all security-related statements. In an SQL environment, it encompasses, but is not necessarily limited to: CREATE ALTER DROP GRANT REVOKE Note that it is particularly important to audit, and tightly control, any action that weakens the implementation of this requirement itself, since the objective is to have a complete audit trail of all administrative activity. To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-57219r841824_chk

Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify audit filters are correctly configured to log desired actions per user. If not, this is a finding.

Fix: F-57170r841825_fix

Edit the necessary filters to include the desired logging actions. Exact steps vary depending on desired logging. Example named audit filter assigned to specific user: MariaDB> INSERT INTO mysql.server_audit_users (host, user, filtername) VALUES ("%", "user1", "filter_example"); MariaDB> SET GLOBAL server_audit_reload_filters=ON;

b
MariaDB must generate audit records showing starting and ending time for user access to the database(s).
AU-12 - Medium - CCI-000172 - V-253768 - SV-253768r961830_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011600
Vuln IDs
  • V-253768
Rule IDs
  • SV-253768r961830_rule
For completeness of forensic analysis, it is necessary to know how long a user's (or other principal's) connection to MariaDB lasts. This can be achieved by recording disconnections, in addition to logons/connections, in the audit logs. Disconnection may be initiated by the user or forced by the system (as in a timeout) or result from a system or network failure. To the greatest extent possible, all disconnections must be logged.
Checks: C-57220r841827_chk

Log in to and out of the MariaDB database server. Verify the connect and disconnect are logged in the audit logfile or syslog depending on how it is configured. If connect and disconnect are not logged, this is a finding.

Fix: F-57171r841828_fix

Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event": [ "CONNECT", "DISCONNECT" ] }' ));

b
MariaDB must generate audit records when concurrent logons/connections by the same user from different workstations occur.
AU-12 - Medium - CCI-000172 - V-253769 - SV-253769r961833_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011700
Vuln IDs
  • V-253769
Rule IDs
  • SV-253769r961833_rule
For completeness of forensic analysis, it is necessary to track who logs on to MariaDB. Concurrent connections by the same user from multiple workstations may be valid use of the system; or such connections may be due to improper circumvention of the requirement to use the CAC for authentication; or they may indicate unauthorized account sharing; or they may be because an account has been compromised. (If the fact of multiple, concurrent logons by a given user can be reliably reconstructed from the log entries for other events (logons/connections; voluntary and involuntary disconnections), then it is not mandatory to create additional log entries specifically for this.)
Checks: C-57221r841830_chk

Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify connect_events include connect in audit filters. If not, this is a finding.

Fix: F-57172r841831_fix

Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event":"CONNECT" }' ));

b
MariaDB must be able to generate audit records when successful accesses to objects occur.
AU-12 - Medium - CCI-000172 - V-253770 - SV-253770r961836_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011800
Vuln IDs
  • V-253770
Rule IDs
  • SV-253770r961836_rule
Without tracking all or selected types of access to all or selected objects (tables, views, procedures, functions, etc.), it would be difficult to establish, correlate, and investigate the events relating to an incident, or identify those responsible for one. In an SQL environment, types of access include, but are not necessarily limited to: SELECT INSERT UPDATE DELETE EXECUTE
Checks: C-57222r841833_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; Default Audit Filter is applied to all users by default. Named Audit Filters are assigned to specific users. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Check what Named Audit Filters are assigned to what users: MariaDB&gt; SELECT sau.host, sau.user, saf.filtername, JSON_DETAILED(saf.rule) FROM mysql.server_audit_filters saf JOIN mysql.server_audit_users sau ON saf.filtername = sau.filtername WHERE saf.filtername != 'default'\G If the MariaDB Enterprise Audit plugin is not active and/or necessary auditing is not in place, this is a finding.

Fix: F-57173r841834_fix

If the MariaDB Enterprise Audit plugin is not active, enable it in one of the two following ways. 1. Config file (requires restart): [mariadb] server_audit_logging = ON 2. SQL (does not require restart): MariaDB> SET GLOBAL server_audit_logging=ON; Once the MariaDB Enterprise Audit plugin is loaded, verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the necessary auditing is not in place for all or specific users, modify the filters. To modify the default filter, delete, and recreate: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "logging":"ON", "connect_event":"ALL", "query_event":"ALL", "table_event":"ALL" }' )); Specific objects can be added to filters with inclusion or exclusion. ignore_databases: Do not log actions on these databases. ignore_tables: Do not log actions on these tables. databases: Log actions on these databases. tables: Log actions on these tables. Example: MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ( 'reporting', JSON_COMPACT( '{ "tables": [ "production.*", "reporting.*", { "table_event": [ "WRITE", "CREATE", "DROP", "RENAME", "ALTER" ], "query_event": [ "DML", "DDL", { "ignore_tables": [ "production.customer_profiles", "production.customer_addresses" ] } ] } ] }' ) );

b
MariaDB must generate audit records when unsuccessful accesses to objects occur.
AU-12 - Medium - CCI-000172 - V-253771 - SV-253771r961836_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-011900
Vuln IDs
  • V-253771
Rule IDs
  • SV-253771r961836_rule
Without tracking all or selected types of access to all or selected objects (tables, views, procedures, functions, etc.), it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. In an SQL environment, types of access include, but are not necessarily limited to: SELECT INSERT UPDATE DELETE EXECUTE To aid in diagnosis, it is necessary to keep track of failed attempts in addition to the successful ones.
Checks: C-57223r841836_chk

Verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB&gt; SHOW GLOBAL STATUS LIKE 'Server_audit_active'; Default Audit Filter is applied to all users by default. Named Audit Filters are assigned to specific users. Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Check what Named Audit Filters are assigned to what users: MariaDB&gt; SELECT sau.host, sau.user, saf.filtername, JSON_DETAILED(saf.rule) FROM mysql.server_audit_filters saf JOIN mysql.server_audit_users sau ON saf.filtername = sau.filtername WHERE saf.filtername != 'default'\G If the MariaDB Enterprise Audit plugin is not active and/or necessary auditing is not in place, this is a finding.

Fix: F-57174r841837_fix

If the MariaDB Enterprise Audit plugin is not active, enable it in one of the two following ways. 1. Config file (requires restart): [mariadb] server_audit_logging = ON 2. SQL (does not require restart): MariaDB> SET GLOBAL server_audit_logging=ON; Once the MariaDB Enterprise Audit plugin is loaded, verify the MariaDB Enterprise Audit plugin is loaded and actively logging: MariaDB> SHOW GLOBAL STATUS LIKE 'Server_audit_active'; If the necessary auditing is not in place for all or specific users, modify the filters. To modify the default filter, delete and recreate: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "logging":"ON", "connect_event":"ALL", "query_event":"ALL", "table_event":"ALL" }' )); Specific objects can be added to filters with inclusion or exclusion. ignore_databases: Do not log actions on these databases. ignore_tables: Do not log actions on these tables. databases: Log actions on these databases. tables: Log actions on these tables. Example: MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ( 'reporting', JSON_COMPACT( '{ "tables": [ "production.*", "reporting.*", { "table_event": [ "WRITE", "CREATE", "DROP", "RENAME", "ALTER" ], "query_event": [ "DML", "DDL", { "ignore_tables": [ "production.customer_profiles", "production.customer_addresses" ] } ] } ] }' ) );

b
MariaDB must generate audit records for all direct access to the database(s).
AU-12 - Medium - CCI-000172 - V-253772 - SV-253772r961839_rule
RMF Control
AU-12
Severity
Medium
CCI
CCI-000172
Version
MADB-10-012000
Vuln IDs
  • V-253772
Rule IDs
  • SV-253772r961839_rule
In this context, direct access is any query, command, or call to MariaDB that comes from any source other than the application(s) that it supports. Examples would be the command line or a database management utility program. The intent is to capture all activity from administrative and nonstandard sources.
Checks: C-57224r841839_chk

Check what filters are in place by running the following as an administrative user: MariaDB&gt; SELECT * FROM mysql.server_audit_filters; Verify connect_events include connect in audit filters. If not, this is a finding.

Fix: F-57175r841840_fix

Edit the necessary filters to include connect_events connect. Example: MariaDB> DELETE FROM mysql.server_audit_filters WHERE filtername = 'default'; MariaDB> INSERT INTO mysql.server_audit_filters (filtername, rule) VALUES ('default', JSON_COMPACT( '{ "connect_event":"CONNECT" }' ));

b
MariaDB must implement NIST FIPS 140-2 validated cryptographic modules to provision digital signatures.
SC-13 - Medium - CCI-002450 - V-253773 - SV-253773r961857_rule
RMF Control
SC-13
Severity
Medium
CCI
CCI-002450
Version
MADB-10-012100
Vuln IDs
  • V-253773
Rule IDs
  • SV-253773r961857_rule
Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated. For detailed information, refer to NIST FIPS Publication 140-2, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.
Checks: C-57225r841842_chk

As the system administrator, run the following at the Linux commands: # openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 If fips is not included in the openssl version, this is a finding. # sysctl crypto.fips_enabled crypto.fips_enabled = 1 If crypto.fips_enabled = 0, this is a finding. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE ‘%have_openssl%'; If the value of have_openssl is not YES, this is a finding. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE ‘%version_ssl_library%'; If the value of version_ssl_library does not contain fips, this is a finding. Examine the application's code to ensure is does not make calls using libmysqlclient. If code uses libmysqlclient  this is a finding.

Fix: F-57176r841843_fix

If crypto.fips_enabled = 0, configure operating system per operating system documentation: RedHat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations Ubuntu: https://security-certs.docs.ubuntu.com/en/fips

b
MariaDB must implement NIST FIPS 140-2 validated cryptographic modules to generate and validate cryptographic hashes.
SC-13 - Medium - CCI-002450 - V-253774 - SV-253774r961857_rule
RMF Control
SC-13
Severity
Medium
CCI
CCI-002450
Version
MADB-10-012200
Vuln IDs
  • V-253774
Rule IDs
  • SV-253774r961857_rule
Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated. For detailed information, refer to NIST FIPS Publication 140-2, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.
Checks: C-57226r841845_chk

As the system administrator, run the following at the Linux commands: # openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 If fips is not included in the openssl version, this is a finding. # sysctl crypto.fips_enabled crypto.fips_enabled = 1 If crypto.fips_enabled = 0, this is a finding. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE ‘%have_openssl%'; If the value of have_openssl is not YES, this is a finding. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE ‘%version_ssl_library%'; If the value of version_ssl_library does not contain fips this is a finding. Examine the application's code to ensure is does not make calls using libmysqlclient. If code uses libmysqlclient, this is a finding.

Fix: F-57177r841846_fix

If crypto.fips_enabled = 0, configure operating system per operating system documentation: RedHat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations Ubuntu: https://security-certs.docs.ubuntu.com/en/fips

b
MariaDB must implement NIST FIPS 140-2 validated cryptographic modules to protect unclassified information requiring confidentiality and cryptographic protection, in accordance with the data owners requirements.
SC-13 - Medium - CCI-002450 - V-253775 - SV-253775r961857_rule
RMF Control
SC-13
Severity
Medium
CCI
CCI-002450
Version
MADB-10-012300
Vuln IDs
  • V-253775
Rule IDs
  • SV-253775r961857_rule
Use of weak or untested encryption algorithms undermines the purposes of utilizing encryption to protect data. The application must implement cryptographic modules adhering to the higher standards approved by the federal government since this provides assurance they have been tested and validated. It is the responsibility of the data owner to assess the cryptography requirements in light of applicable federal laws, Executive Orders, directives, policies, regulations, and standards. For detailed information, refer to NIST FIPS Publication 140-2, Security Requirements For Cryptographic Modules. Note that the product's cryptographic modules must be validated and certified by NIST as FIPS-compliant.
Checks: C-57227r841848_chk

As the system administrator, run the following at the Linux commands: # openssl version OpenSSL 1.0.2k-fips 26 Jan 2017 If fips is not included in the openssl version, this is a finding. # sysctl crypto.fips_enabled crypto.fips_enabled = 1 If crypto.fips_enabled = 0, this is a finding. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE ‘%have_openssl%'; If the value of have_openssl is not YES, this is a finding. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE ‘%version_ssl_library%'; If the value of version_ssl_library does not contain fips, this is a finding. Examine the application's code to ensure is does not make calls using libmysqlclient. If code uses libmysqlclient, this is a finding.

Fix: F-57178r841849_fix

If crypto.fips_enabled = 0, configure operating system per operating system documentation: RedHat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations Ubuntu: https://security-certs.docs.ubuntu.com/en/fips

b
MariaDB must off-load audit data to a separate log management facility; this must be continuous and in near real time for systems with a network connection to the storage facility and weekly or more often for stand-alone systems.
AU-4 - Medium - CCI-001851 - V-253776 - SV-253776r961860_rule
RMF Control
AU-4
Severity
Medium
CCI
CCI-001851
Version
MADB-10-012400
Vuln IDs
  • V-253776
Rule IDs
  • SV-253776r961860_rule
Information stored in one location is vulnerable to accidental or incidental deletion or alteration. Off-loading is a common process in information systems with limited audit storage capacity. MariaDB writes audit records to files in the file system, to other kinds of local repository, or directly to a centralized log management system. Whatever the method used, it must be compatible with off-loading the records to the centralized system.
Checks: C-57228r841851_chk

Check if the variable server_audit_output_type is set to syslog, and verify the operating system is using a centralized syslog utility such as rsyslogd. MariaDB&gt; SHOW GLOBAL VARIABLES LIKE 'server_audit_output_type'; If not, this is a finding.

Fix: F-57179r841852_fix

To set up the audit logs to write to sylog: Edit the mariadb-enterprise.cnf file. Add the following under the [mariadb] section: server_audit_output_type = 'syslog' After the .cnf file is updated and saved, the mariadb database service must be restarted.

b
MariaDB must be configured in accordance with the security configuration settings based on DoD security configuration and implementation guidance, including STIGs, NSA configuration guides, CTOs, DTMs, and IAVMs.
CM-6 - Medium - CCI-000366 - V-253777 - SV-253777r961863_rule
RMF Control
CM-6
Severity
Medium
CCI
CCI-000366
Version
MADB-10-012500
Vuln IDs
  • V-253777
Rule IDs
  • SV-253777r961863_rule
Configuring the DBMS to implement organization-wide security implementation guides and security checklists ensures compliance with federal standards and establishes a common security baseline across DoD that reflects the most restrictive security posture consistent with operational requirements. In addition to this STIG, sources of guidance on security and information assurance include NSA configuration guides, CTOs, DTMs, and IAVMs. The DBMS must be configured in compliance with guidance from all such relevant sources.
Checks: C-57229r841854_chk

Review the MariaDB documentation and configuration to determine if MariaDB is configured in accordance with DoD security configuration and implementation guidance, including STIGs, NSA configuration guides, CTOs, DTMs, and IAVMs. If MariaDB is not configured in accordance with security configuration settings, this is a finding.

Fix: F-57180r841855_fix

Configure MariaDB in accordance with DoD security configuration and implementation guidance, including STIGs, NSA configuration guides, CTOs, and DTMs and IAVMs. If MariaDB is not configured in accordance with security configuration settings, this is a finding.

c
MariaDB products must be a version supported by the vendor.
SA-22 - High - CCI-003376 - V-253778 - SV-253778r997401_rule
RMF Control
SA-22
Severity
High
CCI
CCI-003376
Version
MADB-10-012600
Vuln IDs
  • V-253778
Rule IDs
  • SV-253778r997401_rule
Unsupported commercial and database systems should not be used because fixes to newly identified bugs will not be implemented by the vendor. The lack of support can result in potential vulnerabilities. Systems at unsupported servicing levels or releases will not receive security updates for new vulnerabilities, which leaves them subject to exploitation. When maintenance updates and patches are no longer available, the database software is no longer considered supported and should be upgraded or decommissioned.
Checks: C-57230r841857_chk

Review the version and release information. Verify the MariaDB Enterprise Server version via one of the following methods: MariaDB&gt; SELECT VERSION(); # mariadb --version Verify the version is supported per the MariaDB support policy: https://mariadb.com/engineering-policies/ If the installed version of MariaDB is not supported by the vendor, this is a finding.

Fix: F-57181r841858_fix

Remove or decommission all unsupported software products. Upgrade MariaDB Enterprise to a supported version of the product.