2.2 Ensure extension directory has appropriate ownership and permissions

Information

The extension directory is the location of the PostgreSQL extensions. Extensions are storage engines or user defined functions (UDFs).

Limiting the accessibility of these objects will protect the confidentiality, integrity, and availability of the PostgreSQL database. If someone can modify extensions, then these extensions can be used to execute illicit instructions.

Solution

If needed, correct the permissions on the extension dir by executing:

# whoami
root
# chown -c root:root $(/usr/pgsql-17/bin/pg_config --sharedir)/extension
# chmod -c 0755 $(/usr/pgsql-17/bin/pg_config --sharedir)/extension

If the permissions needed correct, it is

imperative

that all extensions found in $(/usr/pgsql-17/bin/pg_config --sharedir)/extension are evaluated to ensure they have not been modified!

See Also

https://workbench.cisecurity.org/benchmarks/19478

Item Details

Category: ACCESS CONTROL, MEDIA PROTECTION

References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|MP-2

Plugin: Unix

Control ID: 59798b71308020dac9a33f3939a5938753e14d015b3e928c6694a001fb2e5936