{"description": "To set the runtime status of the <code>kernel.perf_event_max_sample_rate</code> kernel parameter, run the following command: <pre>$ sudo sysctl -w kernel.perf_event_max_sample_rate=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.perf_event_max_sample_rate = 1</pre>", "rationale": "The <tt>kernel.perf_event_max_sample_rate</tt> parameter configures maximum\nfrequency of collecting of samples for the Perf system. It is expressed in\nsamples per second. Restricting usage of <tt>Perf</tt> system decreases risk\nof potential availability problems.", "severity": "medium", "references": {"anssi": ["R9"]}, "control_references": {"anssi": ["R9"]}, "components": [], "identifiers": {}, "ocil_clause": "the correct value is not returned", "ocil": "The runtime status of the <code>kernel.perf_event_max_sample_rate</code> kernel parameter can be queried\nby running the following command:\n<pre>$ sysctl kernel.perf_event_max_sample_rate</pre>\n<code>1</code>.\n", "oval_external_content": null, "fixtext": "", "checktext": "", "vuldiscussion": "", "srg_requirement": "", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {}, "platform": "system_with_kernel", "platforms": ["system_with_kernel"], "sce_metadata": {"check-import": "stdout", "platform": ["multi_platform_all"], "environment": "any", "filename": "sysctl_kernel_perf_event_max_sample_rate.sh", "relative_path": "ubuntu2204/checks/sce/sysctl_kernel_perf_event_max_sample_rate.sh"}, "inherited_platforms": [], "cpe_platform_names": ["system_with_kernel"], "inherited_cpe_platform_names": [], "bash_conditional": null, "fixes": {}, "title": "Limit sampling frequency of the Perf system", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/permissions/restrictions/sysctl_kernel_perf_event_max_sample_rate/rule.yml", "template": {"name": "sysctl", "vars": {"sysctlvar": "kernel.perf_event_max_sample_rate", "sysctlval": "1", "datatype": "int"}, "backends": {}}}