1.2.1.7 Ensure access to /usr/share/keyrings directory is configured

Information

The /usr/share/keyrings directory contains trusted gpg keyring files used by APT to verify package signatures from repositories. It provides a centralized, read-only location for system-wide keys that ensures package integrity and authenticity.

A non-root user should not be able to add or remove keys from this directory. Misconfiguring could allow a non-root user to add repositories containing malicious packages.

Solution

Run the following commands to set permissions on /usr/share/keyrings Uid and Gid both 0/root and access is 0755 or more restrictive:

# chown root:root /usr/share/keyrings
# chmod u=rwx,g=rx,o=rx /usr/share/keyrings

See Also

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

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-3

Plugin: Unix

Control ID: fef3e6af797f256753730ca5aefeb86624082e1158748651f72db19d729b3ca8