{"description": "System-wide shared library files, which are linked to executables\nduring process load time or run time, are stored in the following directories\nby default:\n<pre>/lib\n/lib64\n/usr/lib\n/usr/lib64\n</pre>\nKernel modules, which can be added to the kernel during runtime, are also\nstored in <tt>/lib/modules</tt>. All files in these directories should be\ngroup-owned by the <tt>root</tt> user. If the  directories, is found to be owned\nby a user other than root correct its\nownership with the following command:\n<pre>$ sudo chgrp root <i>DIR</i></pre>", "rationale": "Files from shared library directories are loaded into the address\nspace of processes (including privileged ones) or of the kernel itself at\nruntime. Proper ownership of library directories is necessary to protect\nthe integrity of the system.", "severity": "medium", "references": {"nist": ["CM-5(6)", "CM-5(6).1"], "srg": ["SRG-OS-000259-GPOS-00100"], "stigid": ["UBTU-22-232065"], "stigref": ["SV-260498r991560_rule"]}, "control_references": {"stigid": ["UBTU-22-232065"]}, "components": [], "identifiers": {}, "ocil_clause": "any system-wide shared library directory is returned and is not group-owned by a required system account", "ocil": "Verify the system-wide shared library directories are group-owned by \"root\" with the following command:\n\n$ sudo find /lib /lib64 /usr/lib /usr/lib64 ! -group root -type d -exec stat -c \"%n %G\" '{}' \\;\n\nIf any system-wide shared library directory is returned and is not group-owned by a required system account, this is a finding.", "oval_external_content": null, "fixtext": "Configure the system-wide shared library directories (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access.\n\nRun the following command, replacing \"[DIRECTORY]\" with any library directory not group-owned by \"root\".\n\n$ sudo chgrp root [DIRECTORY]", "checktext": "", "vuldiscussion": "", "srg_requirement": "Ubuntu 22.04 library directories must be group-owned by root or a system account.", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "Ubuntu 22.04 library directories must be group-owned by root or a system account.", "vuldiscussion": "If Ubuntu 22.04 allowed 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.\n\nThis requirement applies to Ubuntu 22.04 with software libraries that are accessible and configurable, as in the case of interpreted languages. Software libraries also include privileged programs that execute with escalated privileges.", "checktext": "Verify the systemwide shared library directories are group-owned by \"root\" with the following command:\n\n$ sudo find /lib /lib64 /usr/lib /usr/lib64 ! -group root -type d -exec stat -c \"%G %n\" {} \\;\n\nIf any systemwide shared library directory is returned and is not group-owned by a required system account, this is a finding.", "fixtext": "Configure the systemwide shared library directories (/lib, /lib64, /usr/lib and /usr/lib64) to be protected from unauthorized access.\n\nRun the following command, replacing \"[DIRECTORY]\" with any library directory not group-owned by \"root\".\n\n$ sudo chgrp root [DIRECTORY]"}}, "platform": null, "platforms": [], "sce_metadata": {}, "inherited_platforms": [], "cpe_platform_names": [], "inherited_cpe_platform_names": [], "bash_conditional": null, "fixes": {}, "title": "Verify that Shared Library Directories Have Root Group Ownership", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/permissions/files/permissions_within_important_dirs/dir_group_ownership_library_dirs/rule.yml", "template": {"name": "file_groupowner", "vars": {"filepath": ["/lib/", "/lib64/", "/usr/lib/", "/usr/lib64/"], "recursive": "true", "gid_or_name": "0"}, "backends": {}}}