{"description": "To set the runtime status of the <code>kernel.dmesg_restrict</code> kernel parameter, run the following command: <pre>$ sudo sysctl -w kernel.dmesg_restrict=1</pre>\nTo make sure that the setting is persistent, add the following line to a file in the directory <tt>/etc/sysctl.d</tt>: <pre>kernel.dmesg_restrict = 1</pre>", "rationale": "Unprivileged access to the kernel syslog can expose sensitive kernel\naddress information.", "severity": "low", "references": {"cui": ["3.1.5"], "hipaa": ["164.308(a)(1)(ii)(D)", "164.308(a)(3)", "164.308(a)(4)", "164.310(b)", "164.310(c)", "164.312(a)", "164.312(e)"], "nist": ["SI-11(a)", "SI-11(b)"], "ospp": ["FMT_SMF_EXT.1"], "srg": ["SRG-OS-000132-GPOS-00067", "SRG-OS-000138-GPOS-00069", "SRG-APP-000243-CTR-000600"], "anssi": ["R9"], "ism": ["1546"], "stigid": ["UBTU-22-213010"], "stigref": ["SV-260472r958524_rule"]}, "control_references": {"anssi": ["R9"], "ism": ["1546"], "stigid": ["UBTU-22-213010"]}, "components": [], "identifiers": {}, "ocil_clause": "the correct value is not returned", "ocil": "The runtime status of the <code>kernel.dmesg_restrict</code> kernel parameter can be queried\nby running the following command:\n<pre>$ sysctl kernel.dmesg_restrict</pre>\n<code>1</code>.\n", "oval_external_content": null, "fixtext": "Configure Ubuntu 22.04 to restrict access to the dmesg bus.\nAdd or edit the following line in a system configuration file in the \"/etc/sysctl.d/\" directory:\nkernel.dmesg_restrict = 1\n\nLoad settings from all system configuration files with the following command:\n\n$ sudo sysctl --system", "checktext": "", "vuldiscussion": "", "srg_requirement": "Ubuntu 22.04 must restrict access to the kernel message buffer.", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "Ubuntu 22.04 must restrict access to the kernel message buffer.", "vuldiscussion": "Preventing unauthorized information transfers mitigates the risk of information, including encrypted representations of information, produced by the actions of prior users/roles (or the actions of processes acting on behalf of prior users/roles) from being available to any current users/roles (or current processes) that obtain access to shared system resources (e.g., registers, main memory, hard disks) after those resources have been released back to information systems. The control of information in shared resources is also commonly referred to as object reuse and residual information protection.\n\nThis requirement generally applies to the design of an information technology product, but it can also apply to the configuration of particular information system components that are, or use, such products. This can be verified by acceptance/validation processes in DOD or other government agencies.\n\nThere may be shared resources with configurable protections (e.g., files in storage) that may be assessed on specific information system components.\n\nRestricting access to the kernel message buffer limits access to only root. This prevents attackers from gaining additional system information as a nonprivileged user.", "checktext": "Verify Ubuntu 22.04 is configured to restrict access to the kernel message buffer with the following commands:\n\nCheck the status of the kernel.dmesg_restrict kernel parameter.\n\n$ sudo sysctl kernel.dmesg_restrict\n\nkernel.dmesg_restrict = 1\n\nIf \"kernel.dmesg_restrict\" is not set to \"1\" or is missing, this is a finding.\n\nCheck that the configuration files are present to enable this kernel parameter.\n\n$ sudo /usr/lib/systemd/systemd-sysctl --cat-config | egrep -v '^(#|;)' | grep -F kernel.dmesg_restrict | tail -1\n\nkernel.dmesg_restrict = 1\n\nIf \"kernel.dmesg_restrict\" is not set to \"1\" or is missing, this is a finding.", "fixtext": "Configure Ubuntu 22.04 to restrict access to the kernel message buffer.\n\nAdd or edit the following line in a system configuration file, in the \"/etc/sysctl.d/\" directory:\n\nkernel.dmesg_restrict = 1\n\nLoad settings from all system configuration files with the following command:\n\n$ sudo sysctl --system"}}, "platform": "system_with_kernel", "platforms": ["system_with_kernel"], "sce_metadata": {"check-import": "stdout", "platform": ["multi_platform_all"], "environment": "any", "filename": "sysctl_kernel_dmesg_restrict.sh", "relative_path": "ubuntu2204/checks/sce/sysctl_kernel_dmesg_restrict.sh"}, "inherited_platforms": [], "cpe_platform_names": ["system_with_kernel"], "inherited_cpe_platform_names": [], "bash_conditional": null, "fixes": {}, "title": "Restrict Access to Kernel Message Buffer", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/permissions/restrictions/sysctl_kernel_dmesg_restrict/rule.yml", "template": {"name": "sysctl", "vars": {"sysctlvar": "kernel.dmesg_restrict", "sysctlval": "1", "datatype": "int"}, "backends": {}}}